HTTP call on Android Pie CLEARTEXT communication

Hi Guys,


I have a case that Outsystems mobile application use a specific plugin, and that plugin is communicating to server to get some result via HTTP call.

But for Android Pie, all request without encryption will never work (https://stackoverflow.com/questions/51902629/how-to-allow-all-network-connection-types-http-and-https-in-android-9-pie)

One of the suggestion is configuring the AndroidManifest.xml to set the 

android:usesCleartextTraffic="true"


And the other is using

<application android:networkSecurityConfig="@xml/network_security_config">

and create network_security_config.xml 

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <base-config cleartextTrafficPermitted="true">
        <trust-anchors>
            <certificates src="system" />
        </trust-anchors>
    </base-config>
</network-security-config>


Any idea on how to implement this to Outsystems ?


Thanks

Anyone have idea on this ? 

I´m facing the same problem.

I inserted the following text into my "Extensibility Configurations":

{ "preferences": { "android": [ { "name": "usesCleartextTraffic", "value": "true" } ] } }

However, It´s still not working (can´t connect to http in Android 9 Pie).

Rafael Juca wrote:

I´m facing the same problem.

I inserted the following text into my "Extensibility Configurations":

{ "preferences": { "android": [ { "name": "usesCleartextTraffic", "value": "true" } ] } }

However, It´s still not working (can´t connect to http in Android 9 Pie).

yes, I already try that too, and still looking for alternative

I got the same problem too.

Modify AndroidManifest.xml and network_security_config setting in Cordova plugin.xml does not work.

Unfortunately event after the upgrade, http links on the InAppBrowserEvents plugin still dont work. 

I got it work by add InAppBrowser Plugin to my application.

And add android config in my application extensibility configuration.

{ "preferences": { "android": [ { "name": "InAppBrowserCleartextTrafficPermitted", "value": "true" } ] } }

Which stated in the plugin details.  

For MABS 5 or upper versions

Plugin Versions

  • O10:  >= 1.1.0
  • O11: >= 2.1.0

Android P blocks the usage of HTTP requests by default, in case of need to open a URL with HTTP a preference can be specified in the application extensibility configuration:

{ "preferences": { "android": [ { "name": "InAppBrowserCleartextTrafficPermitted", "value": "true" } ] } }

https://www.outsystems.com/forge/component-overview/1558/inappbrowser-plugin

LouisT wrote:

I got it work by add InAppBrowser Plugin to my application.

And add android config in my application extensibility configuration.

{ "preferences": { "android": [ { "name": "InAppBrowserCleartextTrafficPermitted", "value": "true" } ] } }

Which stated in the plugin details.  

For MABS 5 or upper versions

Plugin Versions

  • O10:  >= 1.1.0
  • O11: >= 2.1.0

Android P blocks the usage of HTTP requests by default, in case of need to open a URL with HTTP a preference can be specified in the application extensibility configuration:

{ "preferences": { "android": [ { "name": "InAppBrowserCleartextTrafficPermitted", "value": "true" } ] } }

https://www.outsystems.com/forge/component-overview/1558/inappbrowser-plugin

Hi,


Thanks Louis,

But this only work on InAppBrowser plugin right ? because the InAppBrowserCleartextTrafficPermitted is specific for that.

In my case, because the plugin is custom based on third party, I still have no luck on this. I need general configuration for this.


Thanks 


Hi Louis,

We already tried that, unfortunately it doesn´t work on the InAppBrowserEvents plugin.

thanks

Hihi, did you found a solution for this?

Toto wrote:

LouisT wrote:

I got it work by add InAppBrowser Plugin to my application.

And add android config in my application extensibility configuration.

{ "preferences": { "android": [ { "name": "InAppBrowserCleartextTrafficPermitted", "value": "true" } ] } }

Which stated in the plugin details.  

For MABS 5 or upper versions

Plugin Versions

  • O10:  >= 1.1.0
  • O11: >= 2.1.0

Android P blocks the usage of HTTP requests by default, in case of need to open a URL with HTTP a preference can be specified in the application extensibility configuration:

{ "preferences": { "android": [ { "name": "InAppBrowserCleartextTrafficPermitted", "value": "true" } ] } }

https://www.outsystems.com/forge/component-overview/1558/inappbrowser-plugin

Hi,


Thanks Louis,

But this only work on InAppBrowser plugin right ? because the InAppBrowserCleartextTrafficPermitted is specific for that.

In my case, because the plugin is custom based on third party, I still have no luck on this. I need general configuration for this.


Thanks 




Hi Xue Li,


No, we still not found workaround for this, so we have to change the cordova application so it'll use https instead of http.


Xue Li wrote:

Hihi, did you found a solution for this?

Toto wrote:

LouisT wrote:

I got it work by add InAppBrowser Plugin to my application.

And add android config in my application extensibility configuration.

{ "preferences": { "android": [ { "name": "InAppBrowserCleartextTrafficPermitted", "value": "true" } ] } }

Which stated in the plugin details.  

For MABS 5 or upper versions

Plugin Versions

  • O10:  >= 1.1.0
  • O11: >= 2.1.0

Android P blocks the usage of HTTP requests by default, in case of need to open a URL with HTTP a preference can be specified in the application extensibility configuration:

{ "preferences": { "android": [ { "name": "InAppBrowserCleartextTrafficPermitted", "value": "true" } ] } }

https://www.outsystems.com/forge/component-overview/1558/inappbrowser-plugin

Hi,


Thanks Louis,

But this only work on InAppBrowser plugin right ? because the InAppBrowserCleartextTrafficPermitted is specific for that.

In my case, because the plugin is custom based on third party, I still have no luck on this. I need general configuration for this.


Thanks