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