Good day,
In my simple Andorid app which is really just a webview app, I added android:exported="false"
in Android Manifest to avoid the Exported service without permissions
warning / vulnerability. However when I run it on my device it would give App is not installed
error, unless I change it to android:exported="true"
, then the app would launch fine on my device.
I then tried to add a permission tag as follows to avoid the "Exported service without permissions" warning but the app would not run again. What would be best to have the app running correctly? I don't really need to export any service. The internet permissions is for some annotation links in my app which would open in an external browser.
Sorry if I'm missing something basic as I'm new to Android development, thanks for any pointers.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package=com.mymundane.app">
<uses-permission android:name="android.permission.INTERNET" />
<permission android:name=com.mymundane.app.mypermission"
android:label="mypermission" android:protectionLevel="signature">
</permission>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label=com.mymundane.app"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:fullBackupContent="@xml/backup_descriptor">
<activity android:name=com.mymundane.app.MainActivity"
android:exported="true" android:screenOrientation="portrait"
android:permission=com.mymundane.app.mypermission">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>