简体   繁体   English

正确的 Android 应用内购买权限

[英]Correct permissions for Android in-app puchases

When trying to create the subscription within Google Play Console I get a message To add in-app products, you need to add the BILLING permission to your APK which I believe I've done.尝试在 Google Play Console 中创建订阅时,我收到一条消息To add in-app products, you need to add the BILLING permission to your APK ,我相信我已经完成了。

I've added the following to my config.xml:我已将以下内容添加到我的 config.xml 中:

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
  <uses-permission android:name="com.android.vending.BILLING" />
</edit-config>

And I've installed the the in-app-purchase-2 plugin ( https://ionicframework.com/docs/native/in-app-purchase-2 ) and added the billing key as mentioned here: https://github.com/j3k0/cordova-plugin-purchase/wiki/Setup-for-Android-Google-Play#add-android-billing-key yet google play console still gives the error.我已经安装了 in-app-purchase-2 插件( https://ionicframework.com/docs/native/in-app-purchase-2 )并添加了此处提到的计费密钥: https://github .com/j3k0/cordova-plugin-purchase/wiki/Setup-for-Android-Google-Play#add-android-billing-key但 google play 控制台仍然给出错误。

When I view the upload APK in App Bundle Explorer (within Google Play Console) I can see com.android.vending.BILLING listed in the permissions (image attached below).当我在 App Bundle Explorer(在 Google Play Console 中)查看上传 APK 时,我可以看到权限中列出了com.android.vending.BILLING (下附图片)。 This leads me to believe I've granted the permission correctly.这让我相信我已经正确地授予了权限。 However, other permissions in the list don't have the com.android.vending prefix.但是,列表中的其他权限没有com.android.vending前缀。 Instead they have android.permission yet I haven't seen any cordova documentation to use anything other than com.android.vending .相反,他们有android.permission但我还没有看到任何cordova文档可以使用除com.android.vending之外的任何东西。

在此处输入图片说明

How can I resolve this issue?我该如何解决这个问题?

I'm using Ionic 5 with cordova-android ^9.1.0我正在使用带有cordova-android ^9.1.0的Ionic 5

I performed the following tasks and the issue has resolved itself:我执行了以下任务,问题已自行解决:

  1. Uploaded a "release" APK (not "debug" APK)上传了“发布”APK(不是“调试”APK)
  2. Released the new APK as "Closed testing" not "Internal testing"将新的 APK 发布为“封闭测试”而非“内部测试”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM