Android 1.6 SMS (old app code)

I have HTC Tattoo with Android 1.6. I got a Java program to send SMS. I got a source on the Internet, I think, versions up to 1.6. The problem is that SMS is sent twice.

What is the possible cause of this problem?

If possible, just send a sample code that works fine.

+3
source share
2 answers

Cytown is 100% correct. I got HTC Tattoo with 1.6 and can confirm that it works.

My code is:

public void onClick(View v) {

            SmsManager sms = SmsManager.getDefault();
            ArrayList<String> smstext = sms.divideMessage("asdfasdf");
            sms.sendMultipartTextMessage("5556", null, smstext, null, null);
 }
+4
source

HTC Tattoo has a bug in sendTextMessage. You can use instead sendMultipartTextMessage.

+2
source

Source: https://habr.com/ru/post/1727520/


All Articles