Android Tutorial android.jar / targetSdkVersion / minSdkVersion

Status
Not open for further replies.

Erel

Administrator
Staff member
Licensed User
Instructions for targetSdkVersion 28 were added to first post:
- 28 - Foreground services require a new non-dangerous permission. It is added automatically if using B4A v9+. Developers using older versions can add it with
- 28 - The old http SDK is not available by default. This will cause problems with native libraries such as Google Maps who rely on the old SDK. To enable it: https://www.b4x.com/android/forum/t...ar-error-in-android-9-pie.103247/#post-649875
- 28 - Non-ssl (non-https) communication is not permitted by default. It can be enabled in B4A v9+ by adding this line to the manifest editor:
B4X:
CreateResourceFromFile(Macro, Core.NetworkClearText)
If you are not using B4A v9+:

Add the foreground permission with:
B4X:
AddPermission(android.permission.FOREGROUND_SERVICE)
If non-ssl communication is required: replace CreateResourceFromFile(Macro, Core.NetworkClearText) with:
B4X:
SetApplicationAttribute(android:networkSecurityConfig, @xml/network_security_config)
CreateResource(xml, network_security_config.xml,
<network-security-config>
<base-config cleartextTrafficPermitted="true">
    <trust-anchors>
        <certificates src="system" />
    </trust-anchors>
</base-config>
</network-security-config>

)
 
Status
Not open for further replies.
Top