Android在应用内购买:你需要检查com.android.vending.BILLING许可瞄准Android的6当? [英] Android in-app purchases: do you need to check for the com.android.vending.BILLING permission when targeting Android 6?

查看:1377
本文介绍了Android在应用内购买:你需要检查com.android.vending.BILLING许可瞄准Android的6当?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在实现应用内结算,或IAB的文档说你要添加到您的清单:

 <使用许可权的android:NAME =com.android.vending.BILLING/>

由于Android的6,应用程序是有望在运行时检查是否用户已授予那些不属于正常的权限权限范畴。需要注意的是,截至API级别23, com.android.vending.BILLING 不被任何这一类下。所以......


  1. 如果这是不正常的,这是否意味着这是危险的?

  2. 我是否需要使用IAB之前检查的权限?

  3. 如果我这样做,怎么样?我找不到IAB的任何实例集成了全新的Andr​​oid 6权限模型。似乎没有要承受 结算相关的任何许可Manifest.permission 为例。


解决方案

您无法找到正常的或危险的列表 com.android.vending.BILLING 许可的Andr​​oid 6.0的权限,因为它不是一个系统的权限。

这是由包 com.android.vending声明(又名谷歌Play商店)。你可以找到它在他的的Andr​​oidManifest.xml

 <许可
    机器人:名字=com.android.vending.BILLING
    机器人:说明=@字符串/ perm_billing_desc
    机器人:标签=@字符串/ perm_billing_label
    机器人:permissionGroup =android.permission-group.NETWORK
    安卓的ProtectionLevel =正常/>

您不必检查在运行时权限,因为它仅需要在系统的权限。

您可以找到更多有关应用程序中声明权限的位置:
http://developer.android.com/guide/topics/manifest/permission -element.html

When implementing in-app billing, or IAB, the docs say you have to add this to your manifest:

<uses-permission android:name="com.android.vending.BILLING" />

As of Android 6, apps are expected to check at runtime if users have granted permissions that don't belong to the 'normal' permissions category. Note that, as at API level 23, com.android.vending.BILLING isn't listed anywhere under this category. So...

  1. If it isn't normal, does that mean it's dangerous?
  2. Do I need to check for permission before using IAB?
  3. If I do, how? I can't find any examples of IAB integrated with the new Android 6 permissions model. There doesn't appear to be any permission related to billing under Manifest.permission for example.

解决方案

You can't find com.android.vending.BILLING permission in the list of normal or dangerous permissions of Android 6.0 because it isn't a system permission.

It is declared by the package com.android.vending (a.k.a. Google Play Store). You can find it in his AndroidManifest.xml:

<permission
    android:name="com.android.vending.BILLING"
    android:description="@string/perm_billing_desc"
    android:label="@string/perm_billing_label"
    android:permissionGroup="android.permission-group.NETWORK"
    android:protectionLevel="normal"/>

You don't need to check the permission at runtime because it is necessary only to the system permissions.

You can find more information about application declared permission here: http://developer.android.com/guide/topics/manifest/permission-element.html

这篇关于Android在应用内购买:你需要检查com.android.vending.BILLING许可瞄准Android的6当?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆