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:
Madhur Gupta 2020-03-11 23:02:30 +01:00 committed by GitHub
parent 57ddc6af10
commit d925e32d2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 113 additions and 5 deletions

View file

@ -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));
}
}