Git Product home page Git Product logo

Comments (10)

mikemee avatar mikemee commented on July 18, 2024 2

Thanks! Ok, we’ll chat about this and think about fixes.

from android-about-box.

unix14 avatar unix14 commented on July 18, 2024 1

updated now to 2.0.1, and I still see leaks reports (am using LeakCanary),
Also i would make the DarkMode optional, and maybe even with a black(ish) background and white textColor and icon's tint.. because the traditional dark mode should not be with a white background, obviously 😄

Keep up the great work!

edit::::

Web link STILL opens in general browser intent INSTEAD of using the custom implementation i provided
image

from android-about-box.

mikemee avatar mikemee commented on July 18, 2024

@unix14 What’s the benefit? Do you know if the custom web view is available back to Android 15? Thanks!

from android-about-box.

unix14 avatar unix14 commented on July 18, 2024

Well im not sure about backwards compabilities issues, but i was talking about this:
image
Once you overrided open Url function, it works for only some of the links, but whenever you click on "Web" link it's using the default and not overrided implementations, also called webHomePage.

from android-about-box.

mikemee avatar mikemee commented on July 18, 2024

@unix14 Sorry, it's been a long time since I worked with this code. Perhaps you can add code to show me. FWIW, this is what we typically have in our apps to use this library. Not sure this helps to be honest, but I see it's a different override on open compared to the README:

    public void initAboutBox() {
        final AboutConfig aboutConfig = AboutConfig.getInstance();
        aboutConfig.appName = getString(R.string.app_name);
        aboutConfig.appIcon = R.mipmap.ic_launcher;
        aboutConfig.version = BuildConfig.VERSION_NAME + " (" + BuildConfig.VERSION_CODE + ")";
        aboutConfig.aboutLabelTitle = getString(R.string.about_egghead_games);
        aboutConfig.packageName = getApplicationContext().getPackageName();
        aboutConfig.buildType = "google".equalsIgnoreCase(BuildConfig.FLAVOR_appstore)
                ? AboutConfig.BuildType.GOOGLE : AboutConfig.BuildType.AMAZON;

        aboutConfig.logUiEventName = LOG_UI_EVENT_NAME;
        aboutConfig.facebookUserName = FACEBOOK_USER_NAME;
        aboutConfig.twitterUserName = TWITTER_USER_NAME;
        aboutConfig.webHomePage = WEB_HOME_PAGE;
        aboutConfig.appPublisher = APP_PUBLISHER;
        aboutConfig.guideHtmlPath = GUIDE_HTML_PATH;
        aboutConfig.companyHtmlPath = COMPANY_HTML_PATH;
        aboutConfig.privacyHtmlPath = PRIVACY_HTML_PATH;
        aboutConfig.acknowledgmentHtmlPath = ACKNOWLEDGMENT_HTML_PATH;

        aboutConfig.emailAddress = EMAIL_ADDRESS;
        aboutConfig.emailSubject = getResources().getString(R.string.app_name) + " Question";
        aboutConfig.emailBody = "";
        aboutConfig.shareMessage = getString(R.string.share_message);
        aboutConfig.sharingTitle = getString(R.string.sharing_title);

        aboutConfig.dialog = new IDialog() {
            @Override
            public void open(AppCompatActivity appCompatActivity, String url, String tag) {
                GuideDialog guideDialog = GuideDialog.createDialog(url, tag, true);
                guideDialog.show(appCompatActivity.getSupportFragmentManager(), tag);
            }
        };
    }

Our GuideDialog extends DialogFragment and it uses a WebView with the passed url (within a view that adds a toolbar at the top with an "X" to handle closing).

from android-about-box.

unix14 avatar unix14 commented on July 18, 2024

Well i didn't used GuideDialog but implemented my own open URL imlepemntation.. and it does work with all of the links, but "Web" link
image

if im still being not clear i can provide code but it's using CustomTabs in order to launch a mini in-app browser, and it's kinda out-of-scope of the About Box.

from android-about-box.

mikemee avatar mikemee commented on July 18, 2024

So it works ok PrivacyPolicy but not for an external web page? Interesting. Perhaps because of the CustomTabs need? Yes, perhaps provide a PR that demonstrates what you need (code is often easier than English!), and if it's general enough we can add it.

FWIW, the relevant code is this (from here, though I suspect you know that:

    public static void openHTMLPage(Activity context, String htmlPath) {
        context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(htmlPath)));
    }

That same code is used in both the PrivacyPolicy and view web page scenarios, so I'm a bit confused. Sorry!

from android-about-box.

unix14 avatar unix14 commented on July 18, 2024

Lol
The code is the same code you entered here above, which is the same code in documentation,
image
I will try to make it simple.
Whenever i override this function :
image
and do whatever i want inside of the implementation,
And then click on either of this :
image
It's working the overrided function i provided and works correctly, but if i click on this:
image
It's just opens a regular browser intent, basically it's working this implementation:
image
Instead of running my implementation of open URL function

Hope everything is clear now

from android-about-box.

unix14 avatar unix14 commented on July 18, 2024

BTW - I'd recommend to use LeakCanary to detect leaks in this library, because I've found it to leak without even starting the AboutActivity...

from android-about-box.

unix14 avatar unix14 commented on July 18, 2024

AboutUsActivity:
image

instead of line 212 you should enter the same as in here
image

from android-about-box.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.