Run in emulator or any other device which do not have Google Play installed.
Call forceShow(). The apprate is shown.
Press on AppRate to get a crash
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.myproject flg=0x10000000 }
Fix 1:
In forceShow() should be
if (!Utils.isGooglePlayInstalled(activity)) {
if (debug) LogD("Play Store is not installed. Won't do anything");
return;
}
instead of
if (!Utils.isGooglePlayInstalled(activity)) {
if (debug) LogD("Play Store is not installed. Won't do anything");
}
Fix 2:
Use try {} catch (Exception e) {} in onClick() while calling
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + packageName));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
activity.startActivity(intent);
Steps to reproduce:
Fix 1: In forceShow() should be if (!Utils.isGooglePlayInstalled(activity)) { if (debug) LogD("Play Store is not installed. Won't do anything"); return; }
instead of if (!Utils.isGooglePlayInstalled(activity)) { if (debug) LogD("Play Store is not installed. Won't do anything"); }
Fix 2: Use try {} catch (Exception e) {} in onClick() while calling Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + packageName)); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); activity.startActivity(intent);