3

I am actually working on a simple app, that reads the sms from the phone and later sends one of them to another phone.

That for I've recreated this project in Android Studio. The code has no errors of anything like that, but if I launch it my logical puts out the following warning:

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've given READ_SMS permission in the Manifest file, so why does this error occur? Any suggestions?

ozbek
  • 20,955
  • 5
  • 61
  • 84
rikojir
  • 115
  • 2
  • 13
  • 1
    please post your AndroidManifest.xml – Mattia Maestrini Apr 23 '15 at 21:33
  • I have a strong feeling you are experiencing the same issues as I have described here - http://stackoverflow.com/questions/32814922/why-does-android-ignore-read-sms-permission/32846384#32846384 Fix your app to support Android M permission model – michnovka Sep 29 '15 at 14:21

0 Answers0