'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: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="33"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light")
AddManifestText(<uses-feature android:name="android.hardware.telephony" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.flash" android:required="false" />)
' Android 31 Up
AddManifestText(<uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE"/> )
AddManifestText(<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/> )
AddManifestText(<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/> )
'End of default text.
AddPermission(android.permission.READ_PHONE_STATE)
AddPermission(android.permission.CAMERA)
AddPermission(android.permission.SEND_SMS)
AddPermission(android.permission.INTERNET)
AddPermission(android.permission.USE_BIOMETRIC)
AddPermission(android.permission.USE_FINGERPRINT)
AddPermission(android.permission.ACCESS_NETWORK_STATE) ' Allows applications to access information about networks.
AddPermission(android.permission.RECEIVE_SMS)
AddReceiverText(Starter,
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>)
'SetActivityAttribute(main,android:theme, @android:style/Theme.Holo.Light)
'******************************************
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
AddApplicationText(
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCDRdAsvOXNA-0VGODcNceSm88z2E766nA"/>
)
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#FF2196F3</item>
<item name="colorPrimaryDark">#007CF5</item>
<item name="colorAccent">#FFFF3D00</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="windowActionModeOverlay">true</item>
</style>
</resources>
)
AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
' Allow non-HTTP call
CreateResourceFromFile(Macro, Core.NetworkClearText)
' BARCODE?QR READER
AddApplicationText(<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="barcode,,face" />
)
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)