使用-权限VS用途特征 [英] Uses-Permission vs Uses-Feature

查看:130
本文介绍了使用-权限VS用途特征的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过的人,要求和人民解释两者的区别许多具体情况,但我不能,似乎不明白一般的差别。是两个同义?另做一件意味着什么呢?


解决方案

  

是两个代名词?


没有。 <使用许可权> 说:哎,机器人(以及相关的分销渠道),请向用户允许我做X。 <使用特征方式> 说:哎,机器人(以及相关的分销渠道),我感兴趣的是与特征量y的硬件上运行

<使用特征> 可以过滤你从Play商店(和其他渠道),如果硬件不能满足您的要求,但用户没有按'吨得到参与。


  

做一件意味着其他?


有时。 如果您要求某些权限,如 CAMERA ,Android的假设默认情况下,你需要相应的硬件。您可以使用<使用特征> 的android:要求=假,如果来覆盖默认行为,必要的。

I've seen many specific cases of people asking and people explaining the difference between the two but I can't and don't seem to understand the general difference. Are the two synonymous? Does one imply the other?

解决方案

Are the two synonymous?

No. <uses-permission> says "hey, Android (and associated distribution channels), please ask the user to allow me to do X". <uses-feature> says "hey, Android (and associated distribution channels), I am interested in running on hardware with feature Y".

<uses-feature> may filter you out of the Play Store (and other channels), if the hardware does not meet your requirements, but the user doesn't get involved.

Does one imply the other?

Sometimes. If you request certain permissions, like CAMERA, Android assumes by default that you need the corresponding hardware. You can use <uses-feature> and android:required="false" to override that default behavior, if needed.

这篇关于使用-权限VS用途特征的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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