AndroidManifest.xml: Exported service does not require permission




Asked on July 20, 2015
My AndroidManifest.xml is as follows.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.mypackage"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="20" />
    <application
        android:allowBackup = "true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <service android:name=".MyService" android:process=":remote">
            <intent-filter>
                <action android:name="service.MyApp" />
            </intent-filter>
        </service>   
    </application>
</manifest>

I am getting warning in service tag as 

Exported service does not require permission

How to resolve it.



Replied on July 26, 2015
We can resolve warning "Exported service does not require permission" adding android:exported="false" in service tag.

<service android:name="com.concretepage.CalService" android:process=":remote" android:exported="false">

But then remote process will not be able to access the this process.


Write Answer










©2024 concretepage.com | Privacy Policy | Contact Us