How do I Write file on android

Get help using Construct 2

Post » Tue Oct 25, 2016 3:23 pm

Hi,
I made Tile2map , an tile editor to create game. http://www.tile2map.com

It work great in browser, chromeos and event in android using the browser but when I compile it to .apk for android, the save fonction stop working.

It's create the file with the name download.bin and is empty. I'm using the invoke download of a string (object browser). with the filename "Downloads/tile2map.json"

I also try with the cranberry cordova-plugin-file to write and nothing work. I'm using construct 237. I try with XDK intel and phonegap. Same Problem.

The permission WRITE_EXTERNAL_STORAGE is already config.

I try on many phone and tablet.

I try many things on internet and nothing work, really need help.

Thanks
B
15
S
4
G
1
Posts: 15
Reputation: 2,103

Post » Wed Oct 26, 2016 12:31 pm

Hello,
Check the permissions of your app on your phone. (Go to [settings>Apps>YourApp>Permissions] and check that the permission is checked)
B
17
S
10
G
19
Posts: 140
Reputation: 11,457

Post » Wed Oct 26, 2016 12:41 pm

The permission is ok, write is enable. the file is written empty on the disk. Seem to be an URI compatibility problem with the android browser item.
B
15
S
4
G
1
Posts: 15
Reputation: 2,103

Post » Thu Oct 27, 2016 3:21 pm

After tons of test, i finally able to save file on android with the plugin cordova-plugin-file. The only way i found is change the Cordova CLI version in intel xdk and choose 5.1.1.

I make some other test to find better option because cli 5.1.1 have some vulnerability.
B
15
S
4
G
1
Posts: 15
Reputation: 2,103

Post » Wed Nov 02, 2016 2:25 pm

After another batch of tests, I change the Cordova CLI version in intel xdk and choose 5.1.1. after that change to 5.4.4 but update only the cli.
Now it's work great and no vulnerability.

https://play.google.com/store/apps/details?id=gaminster.tile2map070

Some phone need to add permission manually. Setting-> App -> Tile2Map -> permissions and enable storage.

I test it on some phone and it's work great:

LG G3 (android 6.0

Samsung Galaxy s7 edge (android 6.0.1)

Asus Zenfone 2 Laser (android 6.0.1)

Acer iconia 7 (android 4.4.4)

Chinese model UM-A75 with a20 cpu (android 4.2.2)

have fun
B
15
S
4
G
1
Posts: 15
Reputation: 2,103


Return to How do I....?

Who is online

Users browsing this forum: AndreasR and 19 guests