'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.basic4ppc.com/forum/showthread.php?p=78136
AddManifestText(
'<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
'SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddPermission(android.permission.READ_CONTACTS)
AddPermission(android.permission.WRITE_CONTACTS)
AddPermission(android.permission.READ_SMS)
AddPermission(android.permission.WRITE_SMS)
AddPermission(android.permission.SMS_DELIVER)
AddPermission(android.permission.SEND_SMS)
'Einstellung für Adaptive-icon
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>
)
'************ Android-Themen ************
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#3f51b5</item>
<item name="colorPrimaryDark">#303f9f</item>
<item name="colorAccent">#448aff</item>
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
</style>
<style name="ToolbarMenu" parent="Base.ThemeOverlay.AppCompat.ActionBar">
<item name="android:textColorPrimary">#fff</item>
<item name="android:colorBackground">#0098FF</item>
</style>
</resources>
)
'********* 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>)
'******************************************
'Turns out you need to manage all the options or it will not be listed. You need to have three services and add this code:
AddPermission(android.permission.RECEIVE_SMS)
AddReceiverText(svSMS,
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>)
SetReceiverAttribute(service1, android:permission, "android.permission.BROADCAST_SMS")
AddReceiverText(service1, <intent-filter>
<action android:name="android.provider.Telephony.SMS_DELIVER" />
</intent-filter>
)
SetReceiverAttribute(service2, android:permission, "android.permission.BROADCAST_WAP_PUSH")
AddReceiverText(service2, <intent-filter>
<action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" />
<data android:mimeType="application/vnd.wap.mms-message" />
</intent-filter>
)
SetServiceAttribute(service3, android:permission, "android.permission.SEND_RESPOND_VIA_MESSAGE")
SetServiceAttribute(service3, android:exported, "true")
AddServiceText(service3, <intent-filter>
<action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
)
AddActivityText(main,
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
)