android - 购买: AcquireActivity Intent denied

标签 android android-intent android-permissions android-billing

因此,我设置了用于测试 Android 应用内计费的环境。

  • 我的应用程序 key 存储为原始字符串,以避免暂时出现任何问题
  • 我的应用程序拥有BILLING权限
  • 我的应用程序已在封闭测试版中发布
  • 我的所有产品(均不是订阅)都标记为 ACTIVE
  • 我的 Activity (调用结算功能的 Activity )会覆盖onActivityResult
  • 我使用IABv3实现应用内结算
  • 我可以成功获取我的产品的 SkuDetails

问题出在调用:bp.purchase(activity, ProductId);(即启动购买流程)时,我收到以下日志:


ActivityManager:START u0 {act=com.google.android.finsky.ACQUIRE dat=iabData:inapp:my .package:productId pkg=com.android.vending cmp=com.android.vending/com.google.android。 finsky.billing.acquire.AcquireActivity(有额外内容)},显示 0 上的 uid 10131

D/com.android.server.am.ExtraActivityManagerService:MIUILOG-权限被拒绝的 Activity : Intent {act=com.google。 android.finsky.ACQUIRE dat=iabData:inapp:my.package:productId pkg=com.android。 vending cmp=com.android.vending/com.google.android.finsky.billing.acquire.AcquireActivity(有额外内容)} pkg : com.android.vending uid:10131 tuid:10170


据我所知,一切正常,直到PurchaseFlow 启动(即当AcquireActivity Intent 启动时)。因此,权限是DENIED,但我不明白为什么或如何修复它,因为唯一的强制权限是BILLING并且它已启用。

注意:由于IAB只能通过真实设备进行测试,这可能是MIUI的问题,但我不拥有任何其他设备,因此我无法测试这是否是问题所在。

最佳答案

只需开启“Google Play 商店”的“在后台启动”权限即可

enter image description here

关于android - 购买: AcquireActivity Intent denied,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47020280/

相关文章:

android - 谷歌地图 API v2 : Prevent scrolling over the map border

android - 从联系人列表中获取电子邮件地址

android - SendBroadcast Intent 具有空额外内容

Android 6 权限访问互联网

android - android studio无限启动(Gradle : Resolve dependencies ':app:_debugCompile' )

android - 找不到以下类 : android. support.constraint.RelativeLayout

android - Cordova - 由于联系人许可,Android 应用程序在启动时崩溃

Android 权限助手函数

android - Kotlin如何添加数据类从何时返回列表

android - 访问 fragment 内部的数据库处理程序