Vincenzo Guglielmi
Vincenzo Guglielmi

Reputation: 41

Android - Read a file created by another app

I'm creating an Android application, where it should read a file created by another application, the file is saved in a path like this: /data/data/com.package.name/file.pdf

when I read the file, the application goes in exception, here's the error: java.io.FileNotFoundException: /data/data/com.package.name/file.pdf: open failed: EACCES (Permission denied)

The permissions are already included in the AndroidManifest.xml, the application works perfectly, if it reads a file located in the download folder, but can not read the file if it is located in this path.

Someone could help me, thanks

Upvotes: 0

Views: 1091

Answers (1)

rmdroid
rmdroid

Reputation: 899

You cant do that as you dont have read access to data/data folder. You need to have root access for that. Again it depends on device to device.

Please go through the comments here given by CommonsWare. How can i read file from data folder?

Upvotes: 2

Related Questions