'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="18" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
'SetApplicationAttribute(android:theme, "@android:style/Theme")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddPermission(android.permission.READ_PHONE_STATE)
AddManifestText(<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
)
'End of default text.
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#FF99B4D1</item>
<item name="colorPrimaryDark">#007CF5</item>
<item name="colorAccent">#AAAA00</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
</resources>
)
SetApplicationAttribute(android:usesCleartextTraffic, "true")
CreateResourceFromFile(Macro, GooglePlayBilling.GooglePlayBilling)
'********* TabStrip ***********************
CreateResource(drawable, background_tab.xml,
<selector xmlns:android="http://schemas.android.com/apk/res/android"
android:exitFadeDuration="@android:integer/config_shortAnimTime">
<item android:state_pressed="true" android:drawable="@color/background_tab_pressed" />
<item android:state_focused="true" android:drawable="@color/background_tab_pressed"/>
<item android:drawable="@android:color/transparent"/>
</selector>)
CreateResource(values, colors.xml,
<resources>
<color name="background_tab_pressed">#6633B5E5</color>
</resources>)
'******************************************
'************ Google Play Services Base ************
AddApplicationText(
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="false"/>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
)
AddApplicationText(<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<meta-data
android:name="com.google.android.gms.vision.DEPENDENCIES"
android:value="ocr" />)
'************ Google Play Services Base (end) ************
'CreateResourceFromFile(Macro, Core.NetworkClearText)
'************ Firebase Base ************
CreateResourceFromFile("google-services", "google-services.json")
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(android.permission.INTERNET)
AddPermission(android.permission.WAKE_LOCK)
AddPermission(com.google.android.c2dm.permission.RECEIVE)
AddPermission(${applicationId}.permission.C2D_MESSAGE)
AddPermission(android.permission.CAMERA) ' Required to be able to access the camera device.
AddPermission(android.permission.GET_TASKS)
AddPermission("android.hardware.camera")
'AddPermission("android.permission.FLASHLIGHT")
'CreateResourceFromFile(Macro, Themes.LightTheme)
AddManifestText( <permission android:name="${applicationId}.permission.C2D_MESSAGE"
android:protectionLevel="signature" />)
AddApplicationText(
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD"/>
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false"/>
<provider
android:authorities="${applicationId}.firebaseinitprovider"
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:exported="false"
android:initOrder="100" />
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD"/>
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false"/>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
android:exported="false" />
<service
android:name="com.google.firebase.iid.FirebaseInstanceIdService"
android:exported="true">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
)
'************ Firebase Base (end) ************
AddApplicationText(
<provider
android:name="com.crashlytics.android.CrashlyticsInitProvider"
android:authorities="$PACKAGE$.crashlyticsinitprovider"
android:exported="false"
android:initOrder="100" />
)
CreateResource(values, com_crashlytics_build_id.xml,
<resources xmlns:tools="http://schemas.android.com/tools">
<string tools:ignore="UnusedResources,,TypographyDashes" name="com.crashlytics.android.build_id"
translatable="false">cc7c8eddb7024f38a1b4491ef214b8f7</string>
</resources>)
'************ Firebase Notifications ************
AddApplicationText(
<service
android:name="com.google.firebase.messaging.FirebaseMessagingService"
android:exported="true">
<intent-filter android:priority="-500">
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
<service android:name="anywheresoftware.b4a.objects.FirebaseNotificationsService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
)
'************ Firebase Notifications (end)************
'************ Firebase Analytics ************
AddApplicationText(
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD"/>
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false"/>
<service android:name="com.google.firebase.crash.internal.service.FirebaseCrashReceiverService"
android:process=":background_crash"/>
<service android:name="com.google.firebase.crash.internal.service.FirebaseCrashSenderService"
android:process=":background_crash"/>
)
'************ Firebase Analytics (end) ************
'************ Firebase Auth ************
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" />
)
'************ Firebase Auth (end) ************
'AddApplicationText(<activity android:name="anywheresoftware.b4a.objects.preferenceactivity"/>)
'SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(keyview, android:windowSoftInputMode, adjustResize|stateHidden)
SetActivityAttribute(vehicleonly, android:windowSoftInputMode, adjustResize|stateHidden)
'SetActivityAttribute(vehicleonly, android:windowSoftInputMode, "stateHidden|adjustPan")
AddApplicationText(<activity android:name="de.amberhome.objects.preferenceactivity"/>)
AddApplicationText(<activity android:name="anywheresoftware.b4a.objects.preferenceactivity"/>)
AddPermission(android.permission.GET_ACCOUNTS)
AddApplicationText(
AddApplicationText(<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:launchMode="singleTask" >
<intent-filter>
<data android:scheme="db-slpb7bvrule9j5n" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>)