Sheldon
Sheldon

Reputation: 276

Permissions are not recognized

I have a problem with permissions in android. I want to track if my device sent or received a sms. For this, I use a service that runs in background.

Permissions in mainfest.xml:

<uses-permssion android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permssion android:name="android.permission.WRITE_SMS"/>

Here is the errorlog:

java.lang.SecurityException: Permission Denial: opening provider 
com.android.providers.telephony.MmsSmsProvider from ProcessRecord{2c9f3ff 
1676:mypackagename.myappname/u0a54} (pid=1676, uid=10054) requires
android.permission.READ_SMS or android.permission.WRITE_SMS

Thanks for help!

Upvotes: 0

Views: 664

Answers (1)

Melquiades
Melquiades

Reputation: 8598

requires android.permission.READ_SMS or android.permission.WRITE_SMS

You don't actually use those permissions, because of the typo. Instead of:

uses-permssion

you should have

uses-permission

Upvotes: 3

Related Questions