Android - check for incoming SMS in a certain amount of time
I am new to Android development and I am developing an app that
communicates with a remote GSM phone via SMS. I have been able to send the
SMS request from Android to the remote phone.
Now what I would like to do is to check if the remote phone sends back an
SMS within 20 seconds. Within this 20s, if the SMS is received the app
will immediately proceeds to processing the data sent via SMS, otherwise
it will give the user a timeout notification.
I have read the documentation on BroadcastReceiver but it seems that the
system only allows about 10s before it kills the receiver. Also there
doesn't seem to be a way to kill the receiver as soon as the SMS is
received.
I am pretty clueless as to how this can be done.
Any help is greatly appreciated.
No comments:
Post a Comment