0

I know, this is very easy question. But this time, I am using the services and receivers in my project. Thats why, maybe some crushes. I can't understand why it doesn't work "permission" tags. It does't ask requirements of permissions when installing my app-debug.apk. Thank you for helping.

--- manifest.xml ---

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tommy.jess"
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="14"
    android:targetSdkVersion="25"/>

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_LOGS" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

    <activity android:name=".Main">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <receiver
        android:name=".recev_main"
        android:description="@string/device_admin_description"
        android:label="@string/device_admin"
        android:permission="android.permission.BIND_DEVICE_ADMIN">
        <meta-data
            android:name="android.app.device_admin"
            android:resource="@xml/device_admin" />

        <intent-filter>
            <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
        </intent-filter>
    </receiver>

    <receiver android:name=".recev_sec">
        <intent-filter>
            <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
            <action android:name="com.bir.button" />
        </intent-filter>

        <meta-data
            android:name="android.appwidget.provider"
            android:resource="@xml/widget_st" />
    </receiver>

    <service
        android:name=".Service_one"
        android:process=":my_process" />

    <service
        android:name=".Service_two"
        android:process=":by_process"/>

    <service
        android:name=".Service_three"
        android:process=":by_process2"/>

</application>
</manifest>
  • The storage permissions are qualified as dangerous, so you need to implement the request permission dialog to ask the user if he allows your app to access those permissions. See this link: https://developer.android.com/guide/topics/security/permissions.html – Jonathan Aste Mar 23 '17 at 15:41

1 Answers1

0

Maybe your using android OS version above Kitkat. where you have to give permissions programmatically. see below mentioned link https://developer.android.com/training/permissions/requesting.html

Atif Mukhtiar
  • 1,186
  • 9
  • 11