Android App request permission little knowledge point

Source: Internet
Author: User

In the Google Play App Store, the number of permissions is used to show at least the number of supported devices. Other places are of little use.

The Android system provides a permission request for the program, which is to use uses-permission to apply in manifest. It's very simple to implement, but some of the problems will come to the surface. A common phenomenon is that sometimes new permissions are added, and the supported devices shown by the program (on Google Play) are reduced.

Why more permissions, fewer support devices

Because some permissions implicitly require feature, that is, when you display the use of uses-permission, you will default to adding uses-featureto the program.
Android and Google Play are judged to be installable and realistic based on whether the device contains a system features that fully contains all the features the program requested. It can only be displayed and installed on feature devices that meet the needs of the program .

How to see which features the program uses

Using the aapt dump badging your_apk_file_path, you can refer to the features required by the acquisition program.

How to view the features that the device has

Android provides this API, specific reference to get system-supported features

As an example,

We add a line to the program manifest permission to request a webcam.

Extended Reading
    • Http://developer.android.com/guide/topics/manifest/uses-feature-element.html#permissions

Transferred from: http://droidyue.com/blog/2014/07/04/attentions-when-adding-permission-for-android-application/

Android App request permission little knowledge point

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.