214
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

Rank: #330

Anyone have idea on this ? 

Rank: #20917

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

Rank: #46863

I got the same problem too.

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

Rank: #2469
Rank: #2469

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

Rank: #46863

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

Rank: #2469

Hi Louis,

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

thanks

Staff
Rank: #696

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.