Open alexeyvasilyev opened 10 years ago
Thanks for the doc. It will be added.
Let me know when you done. I will make the testing.
Correct approach to detect the app store is to use installer package name.
Say in Galaxy S4, Google Play Store / Amazon App Store and Samsung App store can coexist, and app can be downloaded from any of these app store. We are supposed to redirect to respective app stores.
public static boolean isPlayStore(Context context) {
String installer = context.getPackageManager()
.getInstallerPackageName(context.getPackageName());
if (installer == null || (installer != null && (installer.equals("com.android.vending")
|| installer.equals("com.google.android.feedback")))) {
return true;
} else {
return false;
}
}
PlayStore - com.android.vending / com.google.android.feedback Amazon App Store - com.amazon.venezia
No reliable way to find our samsung app store.
Just some notes regarding Amazon Fire TV apps. "the the ability to rate apps is not currently supported by Amazon Fire TV. Your app should not prompt the user for a rating." https://developer.amazon.com/sdk/asb/faq.html
I guess the AppRate should detect if the current model is Amazon Fire TV and should not show rate me dialog.
Q: What is the model for Amazon Fire TV (android.os.Build.MODEL)? A: "AFTB". For forward-compatibility with future devices, check only the first three characters ("AFT"). Ensure that you also check that the manufacturer (android.os.Build.MANUFACTURER) is "Amazon".
Any option to provide custom Markets? Just as add my own server checks? (Provider url, check method)...
Add support for Amazon AppStore, Blackberry AppWorld (BB10 devices), Samsung Apps.
The algorithm should be:
Intents to be used: // Amazon AppStore Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse("http://www.amazon.com/gp/mas/dl/android?p=" + packageName)); activity.startActivity(intent); // More info at https://developer.amazon.com/appsandservices/resources/marketing-tools/using-badges // Maybe using "amzn://android?p=" + packageName is better
// BlackBerry AppWorld Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse("market://details?id=" + packageName)); activity.startActivity(intent);
// Samsung Apps Intent intent = new Intent( Intent.ACTION_VIEW, Uri.parse("samsungapps://ProductDetail/" + packageName)); activity.startActivity(intent); // More info at http://developer.samsung.com/android/technical-docs/Samsung-Apps-Deeplink-Guide