Reading class 0 sms in android - 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.

Related

Content Observer for RCS/ "Advanced messaging" type messages

As the title reads, I'm trying to figure out a way to also read RCS(Rich Communication Service) type OUTGOING messages.
I currently have SMS outgoing messages logged but when it comes to a conversation that has RCS type messages, I'm not sure how to obtain the Uri.Parse. I've searched on google for the correct method of obtaining this information, but I only see items for SMS/MMS (Which neither of these log RCS messages).
EDIT: I recently bought a S9 + and found out that their "RCS" messages are showing up as "Advanced Messages". But my application still doesn't see these advanced type messages.

GCM XMPP scaling connections limitations

Hi anyone has some experience on scaling GCM XMPP ?
https://developer.android.com/google/gcm/ccs.html
Im reading docs there but Im not sure about this 100 pending msgs on 1 connection. I read somewhere that there is limit to 10 connections on server, is it right ? What f I will run 5 servers, each will open 10 connections, should it work well ?
Regarding 100 pending messages:
So apps can use "messages with payload" " to deliver messages of up to 4 Kb. This would be useful in a chat application, for example. To use this feature, simply omit the collapse_key parameter and messages will not be collapsed. GCM will store up to 100 messages. If you exceed that number, all messages will be discarded but you will receive a special message. If an application receives this message, it needs to sync with the server.
Regarding Server connection limit:
You can allow your server to send up to 4000 messages per second on the persistent connection. Knowing you are allowed up to 10 connections, you can possibly send many notifications fast (up to 40k notifications per second).
So you can speed up the message delivery on a device without eventually increasing the number of connections or number of servers but rather splitting your array of devices.
For faster delivery try these methods: 1. delay_while_idle - set to false 2. time_to_live - set to zero (but we have set to 30 for just in case) 3. Canonical IDs - Make sure Canonical IDs returned by GCM replace the old PushID in database 4. collapse_key - The most important factor - set it to random or TOD to avoid Google to throttle notifications.
In extreme case you can always airpush.

Android SMS originating address issue

I have an app published that handles SMS messages. I have received some feedback about users wanting the app to handle SMS messages that come from a sender with letters instead of a plain old phone number. That is, if I understand it right, they sometimes receive messages not only from a sender number like "123-456-1234" but also from a sender like "LETTERED". I have never seen this before. In the emulator I tried emulating an SMS with such a sender using a command like sms send TESTSENDER MessageContent and the emulator says that it only accepts numbers +[0-9]*. Does any one else have any idea of what my users are talking about?
Your users are talking about companies that change their Sender ID to an alphanumeric number. Some examples of this are when your carrier texts you (i.e. my carrier texts me from 'Vodafone'), or when my dentist texts me about my upcoming appointment from 'DENTIST'.
Take a look at this answer for some info about how they do it: How do some SMS messages transmit the senders name?
If your app sorts texts or something similar, I imagine that you could just filter them the same way you would a standard telephone number.

How to change SMS class to 0?

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 ?

Send message to a server from android device without internet connection

Basically I want to create an application on Android device which able to send a message to my third-party server without being connected to internet through wi-fi or 3G service.
Is there anyway to achieve this?
Sure, if by 'message' you mean text message/SMS or phone call. You could setup a server to send and respond to SMS messages, but that's not exactly trivial.
Some years ago I played around with remotely setting a TV recording on my PC-based PVR using SMS.
My phone provider had an SMS to email gateway service that allowed me to send an SMS message in the format someone#somewhere.com subject message.
My email provider allowed me multiple POP3 addresses so I set one up for pvr#mydomain.com and I could send a message to it using 'Do record' as subject and a message body of something like...
4 20100109 1900 2000
...which meant record channel 4 from 7pm to 8pm on the 9th Jan 2010.
I wrote some code on my server to check the POP3 account for pvr#mydomain.com every 5 minutes and check for any messages with the subject 'Do record'. If it found any, it downloaded the full message and processed the body.
Google for RFC 1939 which explains the POP3 protocol.

Categories

Resources