App has stoped
TheOneMonkey opened this issue · 7 comments
FATAL EXCEPTION: main
Process: com.surya.pictactoe, PID: 10035
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://play.google.com/... pkg=com.android.vending }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1936)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1615)
at android.app.Activity.startActivityForResult(Activity.java:4472)
at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult(BaseFragmentActivityApi16.java:54)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:65)
at android.app.Activity.startActivityForResult(Activity.java:4430)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:711)
at android.app.Activity.startActivity(Activity.java:4791)
at android.app.Activity.startActivity(Activity.java:4759)
at hotchemi.android.rate.DialogManager$1.onClick(DialogManager.java:39)
at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:166)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
You're testing on a image that doesn't have google play, that's why it's crashing.
FATAL EXCEPTION: main
Process: com.surya.pictactoe, PID: 10035
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://play.google.com/... pkg=com.android.vending }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1936)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1615)
at android.app.Activity.startActivityForResult(Activity.java:4472)
at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult(BaseFragmentActivityApi16.java:54)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:65)
at android.app.Activity.startActivityForResult(Activity.java:4430)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:711)
at android.app.Activity.startActivity(Activity.java:4791)
at android.app.Activity.startActivity(Activity.java:4759)
at hotchemi.android.rate.DialogManager$1.onClick(DialogManager.java:39)
at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:166)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
@TheOneMonkey @carlos-ferreira @soheilshz @hendrawd Fix it on Vorlonsoft/AndroidRate. Works fine on the current release 1.1.7.
Hello, You don't handle in the case of the play store isn't installed?
https://github.com/Vorlonsoft/AndroidRate handles the case if the user hasn't the Google Play on the device - the library starts intent to the web URI https://play.google.com/store/apps/details?id={your.app.package} (new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id={your.app.package}"))
)
Also you can set other store than the Google Play - .setStoreType(StoreType)
Also you can use:
if (AppRate.with(this).getStoreType() == StoreType.GOOGLEPLAY) { // Checks that current app store type from library options is StoreType.GOOGLEPLAY
if (GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this) != ConnectionResult.SERVICE_MISSING) { // Checks that Google Play is available
AppRate.showRateDialogIfMeetsConditions(this); // Shows the Rate Dialog when conditions are met
} else {
// Do something
}
} else {
AppRate.showRateDialogIfMeetsConditions(this); // Shows the Rate Dialog when conditions are met
}
Latest stable version
dependencies {
implementation "com.vorlonsoft:androidrate:1.2.1"
}
Latest snapshot version
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
implementation "com.vorlonsoft:androidrate:1.2.5-SNAPSHOT"
}