问题描述
我正在尝试通过深度链接将评分(1-5 星)传递给 Play 商店,这可能吗?
val uriBuilder = Uri.parse("https://play.google.com/store/apps/details")
.buildUpon()
.appendQueryParameter("id",PACKAGE_NAME)
val intent = Intent(Intent.ACTION_VIEW).apply {
data = uriBuilder.build()
setPackage("com.android.vending")
}
startActivity(context,intent,bundleOf())
解决方法
不,这种注入是不可能的,但您可以使用官方Google Play In-App Review API
,您始终可以使用 Google Play Review API 来允许用户通过显示对话框来评价您的应用。您可以在此处了解更多信息:https://developer.android.com/guide/playcore/in-app-review