282
Views
12
Comments
HTTP call on Android Pie CLEARTEXT communication
Question

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

2021-01-04 08-13-48
Toto
 
MVP

Anyone have idea on this ? 

UserImage.jpg
Rafael Aviani Juca

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).

2021-01-04 08-13-48
Toto
 
MVP

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

2019-03-26 09-46-50
Louis

I got the same problem too.

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

2020-11-20 12-13-23
pvivacqua

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

2019-03-26 09-46-50
Louis

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

2021-01-04 08-13-48
Toto
 
MVP

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 


UserImage.jpg
Xue Li

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 




2021-01-04 08-13-48
Toto
 
MVP

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 






2020-11-20 12-13-23
pvivacqua

Hi Louis,

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

thanks

2024-03-21 04-20-48
Izam Basiron

Hi Guys,

In case it's useful, I rip out the InAppBrowser script and made a standalone component to enable cleartext http traffic. Here it is https://www.outsystems.com/forge/component-overview/9109/android-usescleartexttraffic 

Hope this helps.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.