I am using this method on a button click.
My app is not yet launched in google play so I tried using some other app’s package name in the URI. I tried many different packages but always I am getting “Activity not found exception”
public void rateApp(View v) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse("market://details?id=mobi.infolife.installer"));
startActivity(intent);
}catch (Exception e) {
Log.i("Exception", "Exception is "+e);
}
}
can anyone say what wrong is happening.
Thanks in advance
I’m guessing this is on the emulator. “market://” links only works when Google Play app is installed on the device.
If it’s not installed (you have exception) then you can launch the web browser.