Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/210.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 解析API推送通知,打开play store上的应用程序页面_Android_Parse Platform_Push Notification - Fatal编程技术网

Android 解析API推送通知,打开play store上的应用程序页面

Android 解析API推送通知,打开play store上的应用程序页面,android,parse-platform,push-notification,Android,Parse Platform,Push Notification,我们的应用程序有解析API,发送推送通知和管理后端内容,我们发送并更新应用程序,点击通知打开应用程序,我们希望它打开应用程序的商店页面,有可能吗?到目前为止,我已经使用了此代码。您可以检查是否安装了Google Play Store应用程序,如果是这种情况,您可以使用“market://”协议。只需从通知面板中尝试打开应用程序Activity的位置编写代码即可 final String my_package_name = "........." // <- HERE YOUR PACKA

我们的应用程序有解析API,发送推送通知和管理后端内容,我们发送并更新应用程序,点击通知打开应用程序,我们希望它打开应用程序的商店页面,有可能吗?

到目前为止,我已经使用了此代码。您可以检查是否安装了Google Play Store应用程序,如果是这种情况,您可以使用“market://”协议。只需从通知面板中尝试打开应用程序Activity的位置编写代码即可

final String my_package_name = "........."  // <- HERE YOUR PACKAGE NAME!!
String url = "";

try {
    //Check whether Google Play store is installed or not:
    this.getPackageManager().getPackageInfo("com.android.vending", 0);

    url = "market://details?id=" + my_package_name;
} catch ( final Exception e ) {
    url = "https://play.google.com/store/apps/details?id=" + my_package_name;
}


//Open the app page in Google Play store:
final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
startActivity(intent);

final String my_package_name=“……”//如果您似乎对我的答案,请接受答案。谢谢。