CodeNinja
CodeNinja

Reputation: 19

android external applications are not able to access file from internal location

I am creating my file inside a temporary folder in my internal memory location. I am then sending this URI in an intent to other applications and they are not able to open the file from this location. However, if I save the file in my internal memory location and pass he internal memory URI, the file is accessible. Any help on this?

Upvotes: 0

Views: 60

Answers (2)

Srikanth Roopa
Srikanth Roopa

Reputation: 1790

And while creating files in Intenal Memory make sure you use MODE_WORLD_WRITEABLE to give access to other applications to read.

openFileOutput("myfile", MODE_WORLD_READABLE ) 

Upvotes: 0

Christian
Christian

Reputation: 4641

If you want to open the file in another application you have to store (copy) it to a public location first and then send the URI of this public location to the other application. See Data Storage.

Upvotes: 1

Related Questions