Permission for android app

Asked

Viewed 1,079 times

2

I created an app in eclipse for android, when the phone install it does not give permission, in case it was an APK of web streaming radio, on Samsung devices works 100%, but in Motorola do not work.

When we install an application like Whatsapp at the time of installing it appears some questions asking permission. So here comes my question, how to put this code in my APK so when to open it ask the same questions before you start using it?

Thanks for your help.

2 answers

0

0

Assuming you haven’t created permissions yet, you should go to AndroidMainfest.xml and set the permissions you want:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.app.myapp" >
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    ...
</manifest>

To know what permissions you should use refer to this page: Permissions list - Android


Starting with Android 6.0 (API level 23), users grant permissions to applications while they are running, not when they are installed.

This may be the case with your Torola, so I would advise you to take a look at another page: Request for runtime permissions


I hope it helps.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.