Please help Ukrainian armed forces! Official Fundraising
How to fix Android warning: Exported activity does not require permission
Go to your project and open Android Manifest file. Lets assume that your manifest file contains an activity that has the details as follows
<activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <data android:scheme="http" android:host="example.com" /> </intent-filter> </activity>
Add the following lines as shown below.
<activity
android:name=".MainActivity"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.MAIN" /> <data android:scheme="http" android:host="example.com" />
</intent-filter>
</activity>
Wonder why we did this? Well… It means that other (arbitrary) applications the user has on his phone can bind to your Service and call whatever method they please that is exposed through your AIDL interface.