0

Hi I am trying to get sending sms to work. However when I try it says that I dont have permission to send sms and I have moved it all over my manifest and it still doesn't work. what am i missing? `

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.flegmann.annoyingsms">
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-sdk
    android:minSdkVersion="19"
    android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" /
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name="com.flegmann.annoyingsms.MainActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <!-- Enables various aspects of handling messages -->
</application>

</manifest>

`

Igal Flegmann
  • 582
  • 1
  • 8
  • 19
  • If you're using Android Studio, check your `build.gradle` file for the `targetSdkVersion`. If it's listed there, then it's overriding the manifest value, and if it's >=23 and you're running on API 23+, then you're probably running into Marshmallow's [new permissions model](http://stackoverflow.com/questions/32635704/android-permission-doesnt-work-even-if-i-have-declared-it). – Mike M. Jun 08 '16 at 01:00

1 Answers1

0

As of android M The user has to grant you these permissions by your application follow standards standard as defined @ https://developer.android.com/training/permissions/requesting.html

JoxTraex
  • 13,423
  • 6
  • 32
  • 45