How do I request permissions/access filesystem on Android?

  • Hello again! I have a feature in my app that lets users download their custom made levels in .json format, as well as record and download .webms of gameplay. It functions on PC and in android browsers, but when I run the apk, I'm unable to use the filesystem.

    I'm assuming this is because the app hasn't requested access to media and files, but I don't know how to do that. Any ideas? Thanks!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • For acces to the filesystem you should to buy the Cordova Plugins in the Scirra store, then you install the Cordova Plugin "cranberrygame_CordovaFile.c2addon". Well al this point you should to reconstruct the "filesystem save" with the "cordova-plugin-file". Once you finish, you should to export the project to Cordova and use Phonegap or Cordova CLI to compile the APK, but before, you should install the plugin in your project from Cordova CLI or Phonegap and add this code to request acces to the filesystem <preference name="AndroidPersistentFileLocation" value="Compatibility" /> <preference name="AndroidExtraFilesystems" value="files,files-external,documents,sdcard,cache,cache-external,root" /> Then, you compile the apk and try it in your phone. I hope I had been helpful!!!

    PD.: Sorry for my english!!!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)