Uses-Permission vs Uses-Feature

前端 未结 2 1332
心在旅途
心在旅途 2020-12-13 14:21

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 t

2条回答
  •  佛祖请我去吃肉
    2020-12-13 14:52

    Are the two synonymous?

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

    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 and android:required="false" to override that default behavior, if needed.

提交回复
热议问题