Manifest editor:
'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(
'Postion 1: android:testonly = "true"
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
'uncomment to set as home activity
'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>
')
'AddApplicationText(<receiver android:name="anywheresoftware.b4a.objects.AdminReceiver2"
AddApplicationText(<receiver android:name="anywheresoftware.b4a.objects.AdminReceiver2"
android:permission="android.permission.BIND_DEVICE_ADMIN">
<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,
'Position 2: Should I insert the android:testonly = "true" here so that the device_admin.xml will consist this line
<device-admin xmlns:android="http://schemas.android.com/apk/res/android">
<uses-policies>
<limit-password />
<reset-password />
<force-lock />
</uses-policies>
</device-admin>
)
AddPermission(android.permission.MASTER_CLEAR)
AddPermission(android.permission.WIPE_RESET_PROTECTION_DATA)
In the kiosk app example, it was mentioned to add the attirbute android:testonly = "true" into
the {device_admin.xml} file which was created by the manifest editor file.
May I know the correct way of doing this.
If I insert that attribute in position 1 - I think this will not create the attribute in the [device_admin.xml}.
Whereas if I put it in position 2 - I will a have a compilation error as it is not a correct syntax.
Kindly advise.
Thanks
Last edited: