'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="19" android:targetSdkVersion="31"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@mipmap/ic_launcher")
CreateResource(mipmap-anydpi-v26, ic_launcher.xml,
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/background"/>
<foreground android:drawable="@mipmap/foreground"/>
</adaptive-icon>
)
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.LightTheme)
'End of default text.
'**** Preferences
SetActivityAttribute(Main, android:windowSoftInputMode, adjustResize|stateHidden)
'****
'sdk24 - theme
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values-v20, theme.xml,
<resources>
<style
name="LightTheme" parent="@android:style/Theme.Material.Light">
</style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
<style
name="LightTheme" parent="@android:style/Theme.Holo.Light">
</style>
</resources>
)
'sdk 26 - FileProvider
AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
)
AddApplicationText(
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="$PACKAGE$.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
)
CreateResource(xml, provider_paths,
<files-path name="name" path="shared" />
)
'http
SetApplicationAttribute(android:usesCleartextTraffic, "true")
'do not kill if in background
AddPermission(android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS)
'sdk 31
AddPermission(android.permission.SCHEDULE_EXACT_ALARM)