Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: Exported activity does not require permission

I recently created a project and added a splash and a main activity. I edited the manifest file and added the splash activity and the main activity in to it. After adding the main activity, it gives me a warning "Exported Activity Does not Require Permission". What is this warning that it gives me? my API version is android:15.

Please help, Thank you!

this is my manifest file!

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sliit.droidman"
android:versionCode="1"
android:versionName="1.0">

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="15" />

<application android:label="@string/app_name"
    android:icon="@drawable/ic_launcher"
    android:theme="@style/AppTheme">
    <activity
        android:name=".SplashActivity"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>        
    <activity
        android:name="com.sliit.droidman.main.MainActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="com.sliit.droidman.main.MAINACTIVITY" />
            <category android:name="android.intent.category.DEFAULT"/>
        </intent-filter>
    </activity>
</application>

</manifest>
like image 910
Imesh Chandrasiri Avatar asked Jul 04 '12 18:07

Imesh Chandrasiri


3 Answers

add this to your activity definition

android:exported="false"
like image 101
lomec Avatar answered Nov 03 '22 01:11

lomec


This warning means that your activities are exposed to different-process apps that might instantiate them without any required permission.

for details see: http://developer.android.com/guide/topics/manifest/activity-element.html http://developer.android.com/guide/topics/manifest/activity-element.html#prmsn

like image 40
furykid Avatar answered Nov 03 '22 03:11

furykid


It could be due to the <action android:name="com.sliit.droidman.main.MAINACTIVITY" />. I don't know why you add that intent filter?

You normally don't need an intent-filter for other normal activities.

like image 26
Peterdk Avatar answered Nov 03 '22 01:11

Peterdk