Search code examples
androidsmstelephonymanager

Android SMS Not Sending Internationally


I live in Turkey. I can send sms to local numbers with this method:

public void sendSMS(String phoneNumber, String message) {
Log.i("NO", phoneNumber);
        PendingIntent sentPI = PendingIntent.getBroadcast(this, 0, new Intent(
                SENT), 0);

        PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0,
                new Intent(DELIVERED), 0);

        SmsManager sms = SmsManager.getDefault();
        sms.sendTextMessage(phoneNumber, null, message, sentPI, deliveredPI);

    }

But when I change the number to international number, SMS seems to be sent like before, but does not reach to that international number. I dont get any exception neither.

Note: I have tried sending manually from Android default messaging application. Message was received then. So I dont think it is because of the operator.

What do you think? How is this possible?

UPDATE: Tried sending sms to a friends Greek number, sms was received. Problem goes on with Iraq number. If you have non-turkish, non-greek number and wish to volunteer please send me a message/mail including your number so I can check with yours.


Solution

  • After few tests, it turns out nothing wrong with the code, well at least with Android part. It was because of SMS receiver software on the target device which means I had been sending the SMS for sure.

    Thanks