在Phonegap应用程序中打开Google Play / Rate App
Open Google Play / Rate App in Phonegap App
我想打开一个确认窗口,该窗口在应用程序启动时弹出。如果您单击确定,您应该被重定向到谷歌Play商店以对应用程序进行评级。InAppView是一个非常糟糕的解决方案,可以对它真正应该在本机应用商店应用程序中打开的应用程序进行评级。
我试过这个,但它不起作用:
window.open("market://details?id=com.publishername.myapp");
还有这个:
window.open("https://play.google.com/store/apps/details?id=com.YourApp", "_system");
我已经阅读了其他一些线程,但"解决方案"不起作用。
有没有办法将用户重定向到 Play 商店以对应用进行评分?
感谢您的帮助!
基本上评级代码应该从安卓端处理。下面是代码:
public static void showRateDialog(final Context mContext) {
AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
builder.setMessage(
"If you enjoy using "
+ APP_TITLE
+ ", please take a moment to rate it. Thanks for your support!")
.setTitle("Rate " + APP_TITLE)
.setCancelable(false)
.setIcon(R.drawable.ic_launcher)
.setPositiveButton("Rate TempleRun2",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
mContext.startActivity(new Intent(
Intent.ACTION_VIEW,
Uri.parse("https://play.google.com/store/apps/details?id=com.imangi.templerun2")));
dialog.dismiss();
}
})
.setNegativeButton("Remind me later",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
})
.setNeutralButton("No'nThanks",
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
}
});
AlertDialog alert = builder.create();
alert.show();
}
希望这有帮助。
相关文章:
- 使用Scala Play Framework视图中的键检索映射值
- Play 2.5 for Java中的Javascript路由
- 我如何防止错误“;未捕获(在promise中)DOMException:play()请求被对pause()的调用中断&”
- 无法使用 $('input[name=“rate”]').focus() 聚焦文本框;方法
- 使用带有jQuery或JavaScript的Play 2框架下拉列表
- audio.play() 和多个效果播放
- Javascript HTML5 更改图标用于 fa-play
- 移动设备上的 HTML 5 音频 .play() 延迟
- 当前 Play 应用程序的 Heroku 部署错误
- jQuery .play() 在移动 Safari 上不起作用
- Scala + Play + Akka. Is there a need for Backbone.js?
- .play();不适用于HTML5媒体元素
- 如何将值从jQuery菜单传递到Play框架
- 在iPhone上,Vimeo Javascript API.play()函数没有'播放完视频后才能工作
- 在Cocos2d JS中使用Google Play服务
- 如何在 Play 框架中将字典对象从 AJAX 传递到控制器类
- 在Play Framework 2中从Java调用javascript函数
- XMLHttpRequest错误仅在从google play下载时发生
- play framework - ajax call
- 在Phonegap应用程序中打开Google Play / Rate App