I want to send fake sms on android, but I couldn’t do it.
My code below:
Intent a = new Intent("android.provider.Telephony.SMS_RECEIVED");
byte[] by =(byte[])(SmsMessage.getSubmitPdu("12345", "1234", "hello", false).encodedMessage);
Object[] vrs = {by};
a.putExtra("pdus",vrs);
sendBroadcast(a);
Do you have any idea?
Some broadcasts are protected and can only be sent by the System. Maybe this is one of those.
UPDATE
This snippet from the Android SMS application might help you.
In short, try asking for the BROADCAST_SMS permission
for further reference http://mobiforge.com/developing/story/sms-messaging-android