'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="21" android:targetSdkVersion="31"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(Main, android:configChanges, "orientation|keyboard|keyboardHidden|screenSize|uiMode")
'SetActivityAttribute(Main, android:configChanges, "orientation|keyboard|keyboardHidden|screenSize")
'SetActivityAttribute(activityname, android:configChanges,"keyboard|keyboardHidden|navigation")
'The "orientation" value prevents restarts when the screen orientation changes.
'The "screenSize" value also prevents restarts when orientation changes, but only for Android 3.2 (API level 13) and above.
'The "screenLayout" value is necessary to detect changes that can be triggered by devices such as foldable phones and convertible Chromebooks.
'The "keyboardHidden" value prevents restarts when the keyboard availability changes
'The user interface mode has changed — the user has placed the device into a desk or car dock, or the night mode has changed.
'SetActivityAttribute(Main, android:windowSoftInputMode, "adjustNothing")
'SetActivityAttribute(main, android:windowSoftInputMode, adjustNothing|stateHidden)
SetApplicationAttribute(android:largeHeap,"true")
'---------------------------------------------------------------
' No longer needed with Adaptive Icons
'---------------------------------------------------------------
SetApplicationAttribute(android:icon, "@drawable/icon")
'---------------------------------------------------------------
SetApplicationAttribute(android:label, "$LABEL$")
'---------------------------------------------------------------------------------------
' Android 10 and above does not like these 2 lines.
'=======================================================================================
' BOTH of the below lines will have to be changed someday
'=======================================================================================
' Took both lines out 6/6/2021 for SDK 30 testing
'---------------------------------------------------------------------------------------
SetApplicationAttribute(android:requestLegacyExternalStorage, true)
SetApplicationAttribute(android:usesCleartextTraffic, "true")
'SetActivityAttribute(Main, "android:excludeFromRecents", "true")
'---------------------------------------------------------------------------------------
'SetApplicationAttribute(android:resizeableActivity, "true")
'AddApplicationText(<meta-data android:name="android.max_aspect" android:value="10"/>)
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" />
)
SetApplicationAttribute(android:theme, "@style/BBSTheme")
CreateResource(values-v20, theme.xml,
<resources>
<style
name="BBSTheme" parent="@android:style/Theme.Material.NoActionBar.Fullscreen">
</style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
<style
name="BBSTheme" parent="@android:style/Theme.Holo.NoActionBar.Fullscreen">
</style>
</resources>
)
AddApplicationText(
<activity android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:excludeFromRecents="true"
android:exported="false" />
<service
android:name="com.google.android.gms.auth.api.signin.RevocationBoundService"
android:exported="true"
android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
)
AddPermission(android.permission.INTERNET)
AddPermission(android.permission.READ_PHONE_STATE)
AddPermission(android.permission.READ_PHONE_NUMBERS)
'AddPermission(android.permission.READ_SMS)
AddPermission(android.permission.VIBRATE)
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
AddManifestText(<uses-feature android:name="android.hardware.telephony" android:required="false"/>)
CreateResourceFromFile(Macro, GooglePlayBilling.GooglePlayBilling)
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
''------------------------------------------------------------------------------------------------
'' Just Added 11/1/2020
''------------------------------------------------------------------------------------------------
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAuth.FirebaseAuth)