public static void openAppRating(Context context) { // you can also use BuildConfig.APPLICATION_ID String appId = context.getPackageName(); Intent rateIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appId)); boolean marketFound = false; // find all applications able to handle our rateIntent final List otherApps = context.getPackageManager() .queryIntentActivities(rateIntent, 0); for (ResolveInfo otherApp: otherApps) { // look for Google Play application if (otherApp.activityInfo.applicationInfo.packageName .equals("")) { ActivityInfo otherAppActivity = otherApp.activityInfo; ComponentName componentName = new ComponentName( otherAppActivity.applicationInfo.packageName, ); // make sure it does NOT open in the stack of your activity rateIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); // task reparenting if needed rateIntent.addFlags(Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); // if the Google Play was already open in a search result // this make sure it still go to the app page you requested rateIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); // this make sure only the Google Play app is allowed to // intercept the intent rateIntent.setComponent(componentName); context.startActivity(rateIntent); marketFound = true; break; } } // if GP not present on device, open web browser if (!marketFound) { Intent webIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(""+appId)); context.startActivity(webIntent); } }


oraciones y reflexiones

Oración y reflexión del día:

Consejero Espiritual · Audio Podcast -Y En Ningún Otro Hay Salvación


Y en ningún otro hay salvación; porque no hay otro nombre bajo el cielo, dado a los hombres, en que podamos ser salvos. (Hechos 4:12)


gallery/ver mas