tags:

views:

143

answers:

1

Can any one help in that problem

when i try that code

File routesRoot = Environment.getExternalStorageDirectory();
            if (!routesRoot.canWrite())
                System.out.println("can't write root");
            if (!routesRoot.canRead())
                System.out.println("can't read root");

when run program both can't write /read occure

I have set permission to access sdcard what is the problem ??

+4  A: 

Do you have this in your manifest.xml??

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

From android SDK ver 4, you have to specify this in your manifest file to give the permissions.

Teja Kantamneni
yes i do it but doesn't work
Ahmed Salem