I tried to read email from the emailprovider, but from StackOverflow I read that it’s impossible. The error also couldn’t be fix.
|
1 |
java.lang.SecurityException: Permission Denial: reading com.android.email.provider.EmailProvider uri content://com.android.email.provider/account from pid=278, uid=10003 requires com.android.email.permission.ACCESS_PROVIDER |
here is the code
|
1 2 3 4 5 |
Cursor c = null; Uri CONTENT_URI = Uri.parse("content://com.android.email.provider/account"); String RECORD_ID = "_id"; String[] ID_PROJECTION = new String[] {RECORD_ID }; c = getContentResolver().query(CONTENT_URI,ID_PROJECTION,null, null, null); |
AND I also add the “permission” which is none of the permission list.
|
1 |
<uses-permission android:name="android.permission.ACCESS_PROVIDER" /> |
here the url I found from stackOverflow http://stackoverflow.com/questions/5547352/how-can-i-read-inbox-in-android-mobile http://androidbridge.blogspot.com/2011/03/reading-emails-in-android.html I really appreciate for …
Recent Comments