I'm using eclipse and trying to get the android emulator to let me write to the sdcard.
when I install the app on my phone it prompts to accept the permission required... and the program works. When I try using the emulator to test the app I don't get prompted and using the program results in permission denied.
I've tried recreating my avd... and have the sdcard size set to 4Gb. Obviously I have the uses permission line in the AndroidManifest.xml... and here it is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="j**.B********.App"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:icon="@drawable/icon" android:label="@string/app_name" android:permission="android.permission.WRITE_EXTERNAL_STORAGE">
<activity android:name=".NotesActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
So how do I get the emulator to give me the permission to write to the sdcard? What I've done works on the phone... so why not in the emulator?
Just now in the dev tools terminal in the emulator I tried to navigate to the sdcard... permission denied.
Looking at permissions in eclipse DDMS perspective and they are d---------
Edit: I got it to work.
I had to manually start the emulator from the avd manager. Letting eclipse start the emulator when you hit run seems to short circuit something.