Android Question APK not working on android 9.0 working on 8.1.0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Friends,

As per the requirements of google to change api level and targetSDKversion I changed my manifest file as below

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" maxSdkVersion="26" />

After doing this change app is working in older android version upto 8.1.0 but its not working in later versions.

Is the manifest file ok, Do I need to do something else also.

Pls suggest.

Thanks
Juzer Hussain
 

Juzer Hussain

Active Member
Licensed User
Longtime User
Don't get any error.
On Login button click it runs a job to connect to server.
The job is failing.The job should succeed.
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Yes i am using http site.
The link says add
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
to AndroidManifest.xml
I added in Manifest file.
Do i need to do something else also?
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
SORRY. CreateResourceFromFile(Macro, Core.NetworkClearText) to be added in manifest.
I am using B4A 8.5 will that be ok.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
i dont know. the macro is added to B4A 9+

You can try to add this to your manifest

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>

)
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Thank You, DonManfred I will recompile and check with client in a day or two if it works.
I feel it should work.
Juzer
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…