i am attempting to launch an intent to open a link to the android market.
android manifest portion looks like this:
Better solution would be to try to open uri in Google Play app, but if there is no such app (no Activity to handle this intent) - you can just try to open uri in browser like in this example:
public static void rateApp(Context context) {
try {
context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + context.getPackageName())));
} catch (android.content.ActivityNotFoundException anfe) {
viewInBrowser(context, "https://play.google.com/store/apps/details?id=" + context.getPackageName());
}
}
public static void viewInBrowser(Context context, String url) {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
if (null != intent.resolveActivity(context.getPackageManager())) {
context.startActivity(intent);
}
}