Permission on android Marshmallow?


#1

Hi everyone,

I’m facing a problem with my app, and I need your help…

I’m using cordovaFileTransfer plugin and works fine, the problem is when I’m test it on android >6.0… give me the next error: > "Open failed: EACCES (Permission denied)" when I try download a file.
I read about it and seems like a new security permissions in the marshmallow…
I tried insert in the config.xml file the next:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

But didn’t work, how I can enable the permissions?
Thank you alll


#2

Please somebody help me with this, there is a lack of information in the web about ionic + Marshmallow permissions!


#3

I did use this plugin in an Ionic app a couple times running in android Marshmallow.
And I didn’t have this problem. Are you sure that you have the latest version of the plugin? and make sure that you did accept the storage access permission in the app.


#4

@haytam Yes I have the latest version, I installed by doing this cordova plugin add cordova-plugin-file-transfer
where I accept the storage permission? Because I tested with ionic run android and nothing show me, the same occurs when I install the apk in my phone.


#5

Can anybody help me please?


#6

Nobody? I really need help for this problem :frowning:


#7

Have you tried to reinstall fresh plugin? may be that plugin have update for this issue?


#8

Thanks for your reply @umardraz!

I have the last version cordova-plugin-file-transfer 1.5.1


#9

@leugim_ohlavrac any news on this? I’m having exactly the same problem.


#10

I tried yesterday with a smartphone 6.0 and works fine, the marshmallow pop-up permissions showed up!
I really don´t know why suddenly works fine!

Make sure you have the last version of the plugin, and try to add the code that I quoted in my first post.
Try to reinstall the app again, maybe it is the problem.


#11

Where are you storing the file? For Android if I use cordova.file.externalRootDirectory it gives me the EACCESS error, but if I use cordova.file.externalDataDirectory apparently downloads the file but I can’t find it anywhere.


#12

I’m using externalRootDirectory… For cordova.file.externalDataDirectory, try this path sdcard/Android/data/“app-id”/files`


#13

facing same issue, checked with compatibility version of platform and plugin,but to no avail.