Anila
Anila

Reputation: 1136

Android: cannot access sdcard files from device

I'm working on an android app that writes and reads .PNG files from sdcard. I've already tried it on a device (htc) and it was working fine. Then I had to modify some code to correct some errors (Note that changes made had nothing to do with save/open function). But now just like that I can no longer save/open files on sdcard.

I've tried to open sdcard folder in DDMS File Explorer view (eclipse) but it appears empty and the permissions are d---------. I think it has something to do with the permissions but I have no idea what exactly is causing this problem and how to solve it.

To see if the problem was in my app I tested it on an emulator and it's working fine. So the problem is definitely related to the device.

Any suggestions?

Upvotes: 1

Views: 2337

Answers (2)

Caner
Caner

Reputation: 59168

Make sure you didn't connect the phone to your PC in "disk drive" mode.

Upvotes: 2

Davos555
Davos555

Reputation: 2004

I recall that in order to be able to view contents of certain directories with ddms you need to have rooted your phone to get the permissions.

Upvotes: 0

Related Questions