check and delete the sms in inbox in android application
<p>I am working on android chat application. I am bit confused in a small issue. I have a home screen in android application. There i need to give the mobile number of the user who is installing the the application in his mobile. Once i give the mobile number i will send a text message to the mobile number entered. I need to check if the mobile number entered has got the message correctly. But i should not allow the user to go back to inbox and check the message. Ie. once the mobile number gets the message i need to move to next screen. If the mobile has not got the message, i have to pop up the message saying MSISDN number doesnot match. How can i achive this task. Any help will be of great use to me.</p>

<p>Note: MObile number  (MSISDN) number is the number of the mobile number in which the Android application is being installed.</p>

<p>if(Mobile number = MSISDN number)</p>

<p>check for the message and delete it (user should not view the message)</p>

<p>elseif(Mobile number != msisdn number)</p>

<p>Alert box(Please enter the correct MSISDN number)</p>

<p>Thanks in Advance.</p>
