Skip to content

Android 9.0 not working with version 3.4.0 and {N} 5.1 #206

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mspusta78 opened this issue Mar 8, 2019 · 2 comments
Closed

Android 9.0 not working with version 3.4.0 and {N} 5.1 #206

mspusta78 opened this issue Mar 8, 2019 · 2 comments

Comments

@mspusta78
Copy link

mspusta78 commented Mar 8, 2019

On android 9.0 (Pixel 3XL)

{N} version 5.1

"nativescript-background-http": "^3.4.0"

calling session.uploadFile errors out

JS: propertyChangeData property name = status propertyValue= error
JS: error = {"eventName":"error","object":{"_observers":{"progress":[{}],"error":[{}],"complete":[{}],"propertyChange":[{}]},"_session":{"_id":"image-upload"},"_id":"image-upload{1}","_description":"{ 'uploading': 'VID_1552057929892.mp4' }","_upload":0,"_totalUpload":1,"_status":"error"},"error":{},"responseCode":-1,"response":null}

I tried to to explicitly request permission to
permissions.requestPermission(android.Manifest.permission.FOREGROUND_SERVICE

but that did not solve the issue.

Martin

@mspusta78
Copy link
Author

I found the issue that is impacting the

In my AndroidManifest.xml I have
....
<application android:networkSecurityConfig="@xml/network_security_config"

My "@xml/network_security_config" contains the following:

127.0.0.1 localhost

Removing android:networkSecurityConfig="@xml/network_security_config" from the AndroidManifest file solved the issue

Is it possible to use: android:networkSecurityConfig="@xml/network_security_config"

If so, what values do we need to add to "@xml/network_security_config" file?

@NickIliev
Copy link
Contributor

@mspusta78 see here about details on network_security_config. Basically, you can specify specific domains that can be accessed through this config (all other requests will be denied). You can also pass security certificates for additional security.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants