Comments (10)
Thanks! Ok, we’ll chat about this and think about fixes.
from android-about-box.
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
from android-about-box.
@unix14 What’s the benefit? Do you know if the custom web view is available back to Android 15? Thanks!
from android-about-box.
Well im not sure about backwards compabilities issues, but i was talking about this:
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.
@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.
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
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.
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.
Lol
The code is the same code you entered here above, which is the same code in documentation,
I will try to make it simple.
Whenever i override this function :
and do whatever i want inside of the implementation,
And then click on either of this :
It's working the overrided function i provided and works correctly, but if i click on this:
It's just opens a regular browser intent, basically it's working this implementation:
Instead of running my implementation of open URL function
Hope everything is clear now
from android-about-box.
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.
instead of line 212 you should enter the same as in here
from android-about-box.
Related Issues (20)
- Fix "show publisher" for Amazon
- Fix crash for Facebook link
- Fix email subject line
- Change string "app_name" to something like "app_name_aboutbox" HOT 2
- Theme support HOT 2
- Add Guide as an option first item on the menu
- Force close on launching AboutActivity HOT 3
- Remove dependancy on Branch.io
- Copyright & Author & About Company HOT 2
- Update to latest Materal About Library HOT 3
- Which activity to add in launch()? HOT 2
- Adding other categories in the activity HOT 3
- Open about box with a button HOT 9
- Twitter profile doesn't opens HOT 2
- Remove cards from About Activity HOT 3
- Privacy policy is not shown HOT 1
- Facebook link do not open HOT 5
- Check for leaks
- Add accessibility labels
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-about-box.