Hi guys,

There is a private method as the following:

private void android.telephony.SmsManager.sendRawPdu(byte[],byte[],android.app.PendingIntent,android.app.PendingIntent)

And this code snippet DOES work well:

private void sendSMS(byte[] encodedAddress, byte[] encodedMessage) {
Method mtd1 = SmsManager.class.getDeclaredMethod("sendRawPdu", byte[].class, byte[].class, PendingIntent.class, PendingIntent.class);
mtd1.setAccessible(true);
mtd1.invoke(SmsManager.getDefault(), encodedAddress, encodedMessage, null, null);
}


On another device, there is another signature for this method, as below:

private void android.telephony.SmsManager.sendRawPdu([B,[B,android.app.PendingIntent,android.app.PendingIntent)

This one uses '[B' instead of 'byte[]'. I've tried the above code snippet but it does NOT work. Please help me to re-write the code.

Thanks a lot.