Android Tutorial android.jar / targetSdkVersion / minSdkVersion

Discussion in 'Tutorials & Examples' started by Erel, Dec 24, 2017.

Thread Status:
Not open for further replies.
  1. Erel

    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:
    Code:
    CreateResourceFromFile(Macro, Core.NetworkClearText)
    If you are not using B4A v9+:

    Add the foreground permission with:
    Code:
    AddPermission(android.permission.FOREGROUND_SERVICE)
    If non-ssl communication is required: replace CreateResourceFromFile(Macro, Core.NetworkClearText) with:
    Code:
    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>

    )
     
    Xicu, PassionDEV, mendiburen and 3 others like this.
Thread Status:
Not open for further replies.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice