'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="24" android:targetSdkVersion="36"/>
<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.
'Icone adaptativo Inicio ------------------------------------------------------------------
'https://www.b4x.com/android/forum/threads/adaptive-icons-simple-instructions-and-tips.123843/
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>
)
'Icone adaptativo Fim ------------------------------------------------------------------
'Delete database--------------------------------------------------------------------------------
' Evita que o banco de dados permaneça no APP depois que ele for desinstalado
'https://developer.android.com/identity/data/autobackup?hl=pt-br
SetApplicationAttribute(android:allowBackup, "false")
'--------------------------------------------------------------------------------
'Set color statusbar and navigatorbar-------------------------------------------------------------------------------
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values, colors.xml,
<resources>
<color name="actionbar">@android:color/transparent</color>
</resources>
)
CreateResource(values, theme.xml,
<resources>
<style name="LightTheme" parent="@android:style/Theme.Material.Light">
<item name="android:colorPrimary">@color/actionbar</item>
<item name="android:windowActionBarOverlay">true</item>
</style>
</resources>
)
'--------------------------------------------------------------------------------
'provider--------------------------------------------------------------------------------
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" />
)
'--------------------------------------------------------------------------------
'camera service--------------------------------------------------------------------------------
SetServiceAttribute(KeepRunningService, android:foregroundServiceType, shortService)
'--------------------------------------------------------------------------------