Phone SMS example

fdx12345

Active Member
Licensed User
Longtime User
Does anyone have a basic example of sending a SMS text message from the phone, verifing it was sent, and getting the response? I realize it information is arround but not in one place and not as a complete, functioning, example. I am time limited right now and a working basic example would be a great help.

Bill
 

fdx12345

Active Member
Licensed User
Longtime User
Getting the response

Sorry, not so great choice of words but an example would be sending a text message to ones bank and getting the response to the message. One could send a "bal" for balance or "his" for history. In a nut shell, it is just basic sending and recieving only this recieving is expected and the program is waiting for a response.

Bill
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
It shouldn't be complicated to create such a project. Try it, and if you encounter any issue then please post the issue you encounter and we will help you.

- Sending SMS is simple with PhoneSms.
- Use PhoneEvents to intercept the SmsDelivered event.
- See this tutorial about SMS interception: Intent Filters - Intercepting SMS messages in the background
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
Hi Bill,
By response, do you mean acknowledge of receipt like "message sent", or
a response from the bank server like when you send "Bal" and you receive
"Balance as of today is 10 Million Dollars and no cents".. it is very difficult to
find a working example of the later because it requires many things including
server side programming, SQL queries and so on... however, if you don't want
to parse and process the response , and only want to see your
balance... etc, then the job is much easier, because you will only send a simple
sms message like you send to your friends, and the computer will process it and
send you back the response. I would suggest using VS in the server side and
specially Visual Basic paired with MySQL or even Ms Access.
 
Upvote 0

fdx12345

Active Member
Licensed User
Longtime User
Response

I was looking for something much simpler. Specifically two things:

1. Just sending a sms text message.
2. Identfying when any kind of text message arrives. It would be nice if this can be done without software polling as constant polling can be a resource hog. However, if polling is the only way it can be done, then polling it shall be.

The source and content of the incoming text message is not important for the requested example.

Bill
 
Upvote 0

fdx12345

Active Member
Licensed User
Longtime User
Question about permissions

In the phone library, I noticed permissions are required for certain activities such as

android.permission.SEND_SMS


In one of the examples on this site called SendSMS, does not use the "android.permission.SEND_SMS". I am now confused if it is needed or when it is needed.

Bill
 
Upvote 0
Top