Write on internal storage, in two different apps

Hi everyone,

I’m currently developping two mobile apps.
I’d like to know if it’s possible that one app write some files in the the other app’s internal storage. (Considering that both apps know the path of the other app’s internal storage)
On Android ?
On IOS ?

All my researches have ended to the answer NO. But please please tell me it’s possible :slight_smile:

FYI :

  • For all my tries, I’ve been using Sytem.IO.File.Create()
  • I get very logically an “access denied”.

I was wondering if there could be some kind of “crossdomain” -if you know what I mean- or something similar that allows me to tell an app to accept access writing from other apps.

Thank you all.

Not possible on iOS. Android, being more powerful than iOS, allows you to do that just like a full-fledged desktop OS: Files.

You just create a file within one app, and open it with the other. You need to be careful with your file handles though. Make sure that the access is synchronized.

You’ll want to create the files on the internal storage (/sdcard/ on Andoird 5 - if memory serves).

Yep,

Actually I need to create and write (not only open and read) in the other app.
And it’s gotta be in the internal storage (not sdcard).

But thanks :wink:

Also, I came up with an idea : Is there a possibility , considering my two apps A and B, that A “asks” B to write in B’s internal storage ? (Wether B is running or not)

You can’t edit another app’s internal storage as far as I know, but you might be able to save the file to a common external path.

As for your alternative idea, it could be done, but you’ll likely need to learn to write native plugins. Read up on that, Intent on Android (Intents e filtros  |  Android Developers) and URL schemes on iOS (http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html)

OK cool,
I’ll dig into that :slight_smile: