-
-
Notifications
You must be signed in to change notification settings - Fork 91
SMS functionality
Every SMS intended as a command must contain the signature string
;;;;;/////
in the message body
The signature indicates that the SMS is a command SMS; if absent, the SMS will not be processed
The position of the signature is irrelevant
Any command in an SMS must be written out as :
Command_code->Parameter1->Parameter2->Parameter3 ...
1. Vibrate:
Command code : 0
Command parameters : Number of repeats, String pattern of vibrations
The string pattern of vibration should follow the sequence : (Delay) (Vibrate) (Delay) (Vibrate) (Delay) ...
Example SMS:
";;;;;///// 0->3->0 100 50 100 50 100 50 300 50 100 50 100 50 100 500"
The above SMS will vibrate the phone using the specified pattern for 3 times
2. Call:
Command code : 1
Command parameters : Phone to call
Example SMS:
";;;;;///// 1->9851785478"
The above SMS will call the phone number 9851785478
3. SMS:
Command code : 2
Command parameters : Destination mobile phone number, Message body
Example SMS:
";;;;;///// 2->9851785478->Hello! This is a text message to you."
The above SMS will send the specified text message to the phone number 9851785478
4. Enable WIFI:
Command code : 3
Command parameters : Wait time in milliseconds
Example SMS:
";;;;;///// 3->10000"
The above SMS will try to enable WIFI after 10 seconds
";;;;;///// 3" OR ";;;;;///// 3->"
The above SMS will try to enable WIFI immediately
5. Retrieve Location:
Command code : 4
Command parameters : Number of times to take to location settings, Show toast or not, Send location to number
Example SMS:
";;;;;///// 4->10->1->9578512468"
The above SMS will try to retrieve device location by taking user to Location Settings a maximum of 10 times along with displaying a toast message(second parameter i.e. 1) urging the user to enable Location Services each time until the user enables Location Services. Upon successful retrieval of location coordinates, an SMS to the number 9578512468 is sent with the location.
If no toast message is to be displayed while taking the user to Location Settings, provide 0 as the second parameter.
If the user is not to be taken to Location Settings, provide 0 as the first parameter.
If the location is to be sent to the same number through which the SMS has been sent to the device, don't provide the last parameter. Both the following will be valid:
";;;;;///// 4->10->1->"
";;;;;///// 4->10->1"