Android SecurityException READ_SMS Failure Resolution
I am really working on a simple application that reads SMS from a phone and then sends one of them to another phone.
That I have recreated this project in Android Studio. There are no errors of anything like this in the code, but if I run it, then the following warning is thrown in my logic:
java.lang.RuntimeException:
Unable to start activity ComponentInfo{com.example.android.fetchinboxsms/
com.example.android.fetchinboxsms.MainActivity}:
java.lang.SecurityException: Permission Denial:
opening provider com.android.providers.telephony.SmsProvider from
ProcessRecord{ebd2075 2443:com.example.android.fetchinboxsms/u0a59} (pid=2443, uid=10059)
requires android.permission.READ_SMS or android.permission.WRITE_SMS
I have given permission READ_SMS
in my manifest file, so why is this error occurring? Any suggestions?
+3
source to share
No one has answered this question yet
See similar questions:
or similar: