mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Added AboutActivityTest (#3475)
* Added AboutActivityTest * Changes made as per suggestions * Removed File to resolve conflict * Removed hardcoded packagename * Changes as per suggestion * Removed Unrelated changes * Fixed Build Issues
This commit is contained in:
parent
57ddc6af10
commit
d925e32d2f
4 changed files with 113 additions and 5 deletions
|
|
@ -115,12 +115,12 @@ public class Utils {
|
|||
* @param context
|
||||
*/
|
||||
public static void rateApp(Context context) {
|
||||
final String appPackageName = BuildConfig.class.getPackage().getName();
|
||||
final String appPackageName = context.getPackageName();
|
||||
try {
|
||||
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
|
||||
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(Urls.PLAY_STORE_PREFIX + appPackageName)));
|
||||
}
|
||||
catch (android.content.ActivityNotFoundException anfe) {
|
||||
handleWebUrl(context, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName));
|
||||
handleWebUrl(context, Uri.parse(Urls.PLAY_STORE_URL_PREFIX + appPackageName));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue