title: android marshmallow - SMS_RECEIVED permission
body: <p>i recently updated my app to support android 6 marshmallow.
  i followed the instruction on <a href="https://developer.android.com/training/permissions/requesting.html" rel="nofollow noreferrer">https://developer.android.com/training/permissions/requesting.html</a> </p>
  
  <p>and added requestPermissions for Manifest.permission.RECEIVE_SMS.
  when im runing the following code :</p>
  
  <pre><code>        Log.i(TAG, "sending SMS...");
          Intent intent = new Intent("android.provider.Telephony.SMS_RECEIVED");
          intent.putExtra("pdus", data);
  
          getContext().sendOrderedBroadcast(intent, null);
  </code></pre>
  
  <p>i get </p>
  
  <blockquote>
    <p>java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.provider.Telephony.SMS_RECEIVED from pid=1999, uid=10056</p>
  </blockquote>
  
  <p>i cant send sms broadcast on the device even if i grant SMS_RECEIVED permission.</p>
  
  <p>any idea why i get this security exception on android 6.</p>
  
  <p>my goal is to generate a fake sms in my device link[<a href="https://stackoverflow.com/questions/12489716/can-i-send-sms-received-intent]">can I send &quot;SMS received intent&quot;?</a>
   . i didnt find any mentions on google that its not permitted anymore .</p>