How to change SMS class to 0? - android

Is there any possible way in Android OS or external library to send SMS with class 0 (send flash SMS), which is immediately displayed on recipient phone ?
I know that SMS class is saved in SMS Message Headers, maybe I should change them ?

Related

Reading class 0 sms in android

My backend service sends a Type 0 sms (PID 0x40) to authenticate the android client. My app is suppose to read the sms and authenticate itself with the information. Is there a way to verify the Type 0 sms is being received by the client. I have added logs in the broadcast receiver that logs sms. I can see logs that tells normal sms received, but nothing for Type 0 sms.
My target device is android 10, and the buildsdk version is 29
First of all, don't confuse type zero and class 0. Those are different types of SMS. Type zero isn't saved or seen by user, class 0 of 'flash' sms is.
Having said that, if you are in the US, keep in mind that Type Zero SMS are automatically blocked unless sent by a mobile stations or Telecomm.

Android - why the "content://sms/sent" only return one result?

When trying to retrieve the sent sms I see that the uri sms/sent only return 1 sms (although the device has more) and it seems that it's the first sent sms. How can I get all the sms in the sent box? I can't use the Telephony class because it's API level 19.

Sending a Silent SMS

How would one go about sending a silent sms (SMS class 0)? Preferably from an android device, but any input would be helpful.
AFAIK is a class 0 a instantly shown sms, but you can send a silent (user doesn't recognize that an sms is sent) sms via SmsManager
See here: SmsManager reference

What is the difference between text sms and data sms?

Can anyone tell me what the difference is between 'data sms' and 'text sms'? I think I know pretty well what a 'text sms' is, but what is a 'data sms'?
This question arose while developing an android app that receives incoming sms. Using the android api, one can choose whether the incoming sms is 'data' (android.intent.action.DATA_SMS_RECEIVED) or 'text' (android.provider.Telephony.SMS_RECEIVED).
And, is this differentiation only in android api or is it rather general?
Thank you.
no, "Data SMS" is not "SMS over a 3G/4G data connection". Data SMS is just a kind of SMS message where the message is not encoded as a text string but binary.
Data SMS messages are sent through the data network, over your 2G / 3G data connection, just like all other data such as internet traffic. Normally SMS messages have their own method of transport.

How to change sender mobile number in Android SMS service

I'm sending SMS in my Android App,
SmsManager sm = SmsManager.getDefault();
String number = "1234567890";
sm.sendTextMessage(number, null, "Test SMS Message--Successful", null, null);
It is working fine. My Question is, Is it possible to add string/text instead of Sender Mobile Number? so that in the recipient mobile, the sender's mobile number will be appeared as that string/text.
Yes, it is possible to change the sender phone number, but you need to use a third party SMS Gateway. You can reroute the SMS to come from a phone number that you register for your app.
Twilio - http://www.twilio.com/help/faq/sms/can-i-specify-the-phone-number-a-recipient-sees-when-getting-an-sms-from-my-twilio-app
TextMagic - http://www.textmagic.com/app/pages/en/products/bulk-sms-gateway-api
No. It is not possible. Here are multiple reasons why:
When you send an sms, using SmsManager you encode it with the content - the actual text message itself. You also encode it with the phone number you are sending it to. And you encode the message center number to the message. That is all you get to encode. Then Android/hardware handles sending it over to the cell phone tower where it is then out of your hands.
If you somehow tried to encode the recipient phone number as text, then the carrier would have no idea how to handle the message. It wouldn't have anywhere to send it too.
Cell phones do not have inbound Caller (or sms) ID - unless the number is already programmed, of course.
When the carrier network is sending an sms, it goes through a message center. The message center determines what data is forwarded to the recipient phone. The message centers currently available just do not support what you're wanting - at least not to the consumer.

Categories

Resources