Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
238 views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...