How do I do I save file on android?

Not favoritedFavorited Favorited 0 favourites
  • 10 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • Hi Ashley !

    There are "Taking screenshots" in the examples.

    As you can see, it is designed for a mobile device. But in this example, saving the file does not work when exporting to android.

    I have 2 questions.

    1. Why do you have broken examples posted that mislead users?

    2. How can I save a file (any one) on android?

    Share I'm not satisfied at all, this is a completely different action, it is necessary to save the file on the user's device, as other engines can do.

  • It's not broken, it's just detecting what features are available. IIRC 'Save as' does work in the Chrome browser on Android but it does not yet work in Android apps due to this Cordova issue. 'Download' is a feature provided by web browsers so is not applicable inside a non-browser app (noted in the manual here). On mobile, the best option is 'Share'.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the quick reply Ashley

    But I don't understand which of the Ashleys to believe :)

    Please tell me when will FileChooser finally work on Android and when will the problem with Cordova be solved?

    My project depends on it, so it's VERY important to understand the timing.

    It's not broken, it's just detecting what features are available. IIRC 'Save as' does work in the Chrome browser on Android but it does not yet work in Android apps due to this Cordova issue. 'Download' is a feature provided by web browsers so is not applicable inside a non-browser app (noted in the manual here). On mobile, the best option is 'Share'.

  • Ashley maybe you can tell a temporary solution to save the file on Android until the Cordova issue is resolved?

    You said that "On mobile, the best option is 'Share'." But I need to save a screenshot and text file on the user's device, explain how this can be done using "Share"?

    It's not broken, it's just detecting what features are available. IIRC 'Save as' does work in the Chrome browser on Android but it does not yet work in Android apps due to this Cordova issue. 'Download' is a feature provided by web browsers so is not applicable inside a non-browser app (noted in the manual here). On mobile, the best option is 'Share'.

  • You quoted me talking about Construct's File Chooser object, which is a different kind of object that the 'Taking screenshots' example does not use. (I'd note you haven't provided a link to the context, and the date is 5 years ago so it could well be out-of-date and no longer applicable anyway.) The File Chooser object is a button that you can click to choose a file, but it provides read-only access to that file - it cannot write a file to storage. As far as I'm aware File Chooser does work fine on Android, but it doesn't help you save files.

    You could also try saving data with the Local Storage plugin instead. It doesn't save to a file, but it still saves it permanently allowing the app to later recall it. Other than that, perhaps there is a third-party plugin that may help.

  • Constant777

    You can use this addon construct.net/en/make-games/addons/1452/document-file

    I will make an example later,

    after the review is completed/approved.

    github.com/Scirra/Construct-bugs/issues/8649

  • You quoted me talking about Construct's File Chooser object, which is a different kind of object that the 'Taking screenshots' example does not use. (I'd note you haven't provided a link to the context, and the date is 5 years ago so it could well be out-of-date and no longer applicable anyway.) The File Chooser object is a button that you can click to choose a file, but it provides read-only access to that file - it cannot write a file to storage. As far as I'm aware File Chooser does work fine on Android, but it doesn't help you save files.

    You could also try saving data with the Local Storage plugin instead. It doesn't save to a file, but it still saves it permanently allowing the app to later recall it. Other than that, perhaps there is a third-party plugin that may help.

    Sorry to bring you back to this topic Ashley, but are you planning to have an option to save files like images, video and audio on the mobile while using an app, perhaps extending an existing plugin?

    I am just asking because I strongly prefer to use Construct as much vanilla as possible, but if you don't have such plans for the future I will try with a third party plugin.

    Thanks.

    P.S.:

    By the way, for anyone reading this, I tried with Share plugin and it doesn't provide to directly save the files, it might work if you have some apps like Dropbox or Google Drive, but it's not the best solution to rely on others apps to save files on your device.

  • We've already got the File System object and it should now work in Chrome on Android to save files to the local device. However to get it working in Android apps Cordova needs to add support for it, which this issue I previously mentioned is about.

  • We've already got the File System object and it should now work in Chrome on Android to save files to the local device. However to get it working in Android apps Cordova needs to add support for it, which this issue I previously mentioned is about.

    Thank you Ashley for the update, it's a shame that such plugin that will allow for greater use of Construct for app development can't be really used for one year or so. I guess I will have to find a workaround to stop my new mobile to create video with AI even if I disabled every permission...

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