How to find out what resolution Android apps require

How can I find out what permissions I need to add to the manifest for my applications? Actually, WHEN do I need to add permission to the manifest, and HOW do I know that my application really needs to add some permissions to the manifest before installing it on the device? Can I get permissions from the imported package? for example, is there a way to find out that we need to add "uses-permission android: name =" com.android.alarm.permission.SET_ALARM " permissions in the manifest, because we add import android.app.AlarmManager; in the code?

MY BIG PROBLEM: my applications are working fine, but when users update their phones to the new android, my applications arenโ€™t working, and I need to find out what resolution is lost from my manifest. (for example, we do not need permissions to access the SD card in Android 2.2, but in android 4.0 we need to add permissions to the manifest). thanks in advance

+4
android permissions
source share
2 answers

How can I find out what permissions I need to add to the manifest for my applications?

Permissions are sometimes documented, for example, in JavaDocs for classes and methods that need those permissions.

Sometimes permissions are not documented. You will find out that you need them by testing or looking at notes about them elsewhere, such as questions and answers about stack overflows.

In some cases, an IDE (e.g. Android Studio) or a build process (e.g. Gradle with Lint checks) will complain at compile time about the missing permission. They are usually intended for already registered permit requirements. However, running a manual Lint check ("Inspect Code" in Android Studio) is a good idea before submitting the application.

How do I know how my application really needs to add some permissions to the manifest before installing it on the device?

Testing.

Can I find permissions from an imported package?

Permissions are usually not tied to Java packages.

for example, is there a way to find out that we need to add permissions "uses-permission android: name =" com.android.alarm.permission.SET_ALARM to the manifest because we add "import android.app.AlarmManager;" in code?

You do not need to use SET_ALARM because you are importing AlarmManager . The import statement requires permission.

but when users update their phones to the new android, my applications do not work

Test your apps quickly with new versions of Android, as these versions are released. When you are given access to developer previews - since the developers were before Android 5.0 and 6.0 - the test for developer previews.

+4
source share

AndroidStudio logcat gives a warning when using the application in development mode, it actually asks you if you added permission to the manifest when it tries to use something that requires permission and does not work.

+1
source share

All Articles