4

I use to send build to codenameone for year, but suddenly all the newly android build apps is not working with http protocol, getting "java.io.IOException: Cleartext HTTP traffic to domainname.com not permitted."

I search through google but not finding any solutions about android for codenameone.

I understand apple had force this to https, but not android.

Can somebody help here?

Try to play around the codenameone setting page for this project to add a build hint

android.xapplication=<application android:usesCleartextTraffic="true" />

But not working as well.

Manuk
  • 301
  • 1
  • 6
  • Starting with Android 9 (API level 28), cleartext support is disabled by default: https://developer.android.com/training/articles/security-config#CleartextTrafficPermitted Couldn't you use HTTPS? – Francesco Galgani Jul 20 '19 at 12:35
  • This apps connected to servers that not having https yet. Can you advice me any method in codenameone that can allow http for the moment? – Manuk Jul 21 '19 at 02:23

1 Answers1

4

We migrated to API level 28 over the weekend as required by Google. This broke compatibility on some fronts as is typical to them... That's one such front.

What you're looking for is android.xapplication_attr but the argument isn't correct either:

android.xapplication_attr=android:usesCleartextTraffic="true"
Shai Almog
  • 51,749
  • 5
  • 35
  • 65