1

I have an app that I build using Ionic. The app work when i directly install the sign and zip APK to any device. These device include the Android 9 simulator, an Android 9 device and also an Android 6 device .

But the app failed to connect to my database/api after I upload it to Play Store. It always stuck when it is in the login authentication splash screen.

Strangely, it only affect android 9, and not in android 6 (my current phone) device but when I gave the user the signed and zip APK directly to my colleague Android 9, the app works perfectly fine. My target user are all outside my country that I'm from and it is not a very proper way to just past along the APK to them.

dMils
  • 13
  • 2

1 Answers1

0

I'm also facing the same problem, I come out from this problem following way

Go to AndroidManifest.xml in the platforms->android->app->src->main and add follwoing code in the application selector.

 android:usesCleartextTraffic="true"

the final resultant selector will be

<application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:usesCleartextTraffic="true">

and make you have the correct access to Internet

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Hope it will solve your problem !!

ram12393
  • 1,284
  • 3
  • 14
  • 29
  • Sorry I did not reply earlier. This part solve my problem. It looks like Android 9 implements more security, Thank you Sir. – dMils Nov 21 '19 at 02:31
  • 1
    sorry sir my reputation does not allow me. "Thanks for the feedback! Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score". I think its because I'm a first time poster. Sad because your solution really save me. – dMils Nov 22 '19 at 06:21