mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Launch Rate Us Feature from AboutActivity (#1264)
* Launch Rate Us Feature from AboutActivity Rate us feature is added in Utils, But it is never used/launched. * Add LaunchRatings Method in AboutActivity * Fix Package Name to enable rate us feature The rate us feature was not working for the debug build type since getPackageName() was returning the fr.free.nrw.commons.debug. Use of this package name was leading to an error on google play. * Replace getPackageName() with BuildConfig.class.getPackage().getName() in rateApp method of Utils.java
This commit is contained in:
parent
51221f69c2
commit
cfc1449615
2 changed files with 6 additions and 3 deletions
|
|
@ -166,14 +166,13 @@ public class Utils {
|
|||
}
|
||||
|
||||
public static void rateApp(Context context) {
|
||||
final String appPackageName = context.getPackageName();
|
||||
final String appPackageName = BuildConfig.class.getPackage().getName();
|
||||
try {
|
||||
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
|
||||
}
|
||||
catch (android.content.ActivityNotFoundException anfe) {
|
||||
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
public static void handleWebUrl(Context context,Uri url){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue