In this particular app besides adding android:exported = true I keed receiving the message about it (developer.android.com/about/versions/12/behavior-changes-12#exported)
What am I missing?
What am I missing?
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="31"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
<uses-permission android:name="android.permission.INTERNET" />
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.
AddApplicationText(<activity android:name="anywheresoftware.b4a.objects.preferenceactivity"/>)
AddManifestText(<uses-feature android:name="android.hardware.telephony" android:required="false"/>)
AddManifestText(<uses-feature android:name="android.hardware.bluetooth" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.usb.accessory" android:required="true" />)
AddManifestText(<uses-feature android:name="android.hardware.usb.host" android:required="true" />)
AddManifestText(<uses-feature android:name="android.hardware.wifi" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.FAKETOUCH" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.LOCATION" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.location.GPS" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.WIFI" android:required="false"/>)
AddManifestText(<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>)
AddManifestText(<uses-feature android:name="android.hardware.touchscreen" android:required="false" />)
AddManifestText(<uses-feature android:name="android.permission.WAKE_LOCK" android:required="false" />)
RemovePermission(android.permission.ACCESS_COARSE_LOCATION)
RemovePermission(android.permission.ACCESS_FINE_LOCATION)
RemovePermission(android.permission.VIBRATE)
RemovePermission(android.permission.BLUETOOTH_PRIVILEGED)
RemovePermission(android.permission.BLUETOOTH_ADMIN)
AddManifestText(<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT"/>)
'AddActivityText(main, <intent-filter >
' <action android:name="android.intent.action.MAIN" />
' <category android:name="android.intent.category.HOME" />
' <category android:name="android.intent.category.DEFAULT" />
' </intent-filter>)
SetActivityAttribute(main, android:directBootAware, "true")
SetActivityAttribute(main, android:exported, "true")
CreateResource(xml, device_filter.xml,
<resources>
<usb-device vendor-id="5971" product-id="51458"/>
<usb-device vendor-id="1155" product-id="22337"/>
<usb-device vendor-id="1550" product-id="2400"/>
<usb-device vendor-id="6790" product-id="29987"/>
</resources>)
AddApplicationText(
<activity android:name="main" >
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" android:exported="true"/>
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" android:resource="@xml/device_filter" />
</activity>)
AddApplicationText(
<receiver android:name="anywheresoftware.b4a.objects.AdminReceiver2"
android:permission="android.permission.BIND_DEVICE_ADMIN" android:exported="true">
<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>)
CreateResource(xml, device_admin.xml,
<device-admin xmlns:android="http://schemas.android.com/apk/res/android">
<uses-policies>
<limit-password />
<reset-password />
<force-lock />
</uses-policies>
</device-admin>)