How to save files - to USB connected phone

0 favourites
  • 6 posts
From the Asset Store
Source File, music and art pack for Android Negotiator
  • Hi,

    I'm trying to save files from a desktop app onto my USB connected phone. I've tried using NWJS and also browser.invokedownload. None of these see the USB connected device. Strangly I can use NWJS and filechooser to read from the USB device.

    I've noticed that C3 can't see my phone either when i'm using the project save option too.

    Is this a fundamental problem for HTML5/C3 implementations, or am I missing something?

    thanks

    R

  • Iirc this is a security issue with USB connected phones, which don't quite work exactly the same as a simple USB drive. I forgot the details but I remember reading something about sandboxing between the operating system and the phone storage, so it doesn't have anything to do with construct or html5.

  • Hi,

    I'm trying to save files from a desktop app onto my USB connected phone. I've tried using NWJS and also browser.invokedownload. None of these see the USB connected device. Strangly I can use NWJS and filechooser to read from the USB device.

    I've noticed that C3 can't see my phone either when i'm using the project save option too.

    Is this a fundamental problem for HTML5/C3 implementations, or am I missing something?

    thanks

    R

    It has to be from desktop to mobile right? Just asking since mobile saves to mobile using just localstorage.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks Oosyrag

    I had a feeling it's what oosyrag said, a security feature. I tried with other development tools, and when they bring up savefiledialogs, they can't see the USB-connected mobile either. you can read, but you can't write. it sounds like a security feature. you can use the file explorer on windows to copy/paste to the phone, but it doesn't look like an app can do it - no matter how it's created.

    i'm sure there's a way, but it's beyond me.

    mobile reading from itself = works fine

    mobile saving to itself = works fine

    desktop reading from mobile = works fine

    desktop saving to mobile = does not.

  • Thanks Oosyrag

    I had a feeling it's what oosyrag said, a security feature. I tried with other development tools, and when they bring up savefiledialogs, they can't see the USB-connected mobile either. you can read, but you can't write. it sounds like a security feature. you can use the file explorer on windows to copy/paste to the phone, but it doesn't look like an app can do it - no matter how it's created.

    i'm sure there's a way, but it's beyond me.

    mobile reading from itself = works fine

    mobile saving to itself = works fine

    desktop reading from mobile = works fine

    desktop saving to mobile = does not.

    You could have a storage online this way both mobile and desktop save to the same location? Sorry not quite sure what you are doing, just giving tips :)

  • thanks, that is a viable solution and is o n my roadmap, but i wanted to avoid that for the moment. I'd need to make sure appropriate security was in place for the online shared space.

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