Hard code 2 numbers (lets call them accept-numbers)
GUI: When user opens the app, it monitors incoming and outgoing messages. Status of incoming/outgoing messages should be shown using 'toast' on GUI. Nothing else is required on GUI. Let's keep GUI bare minimum.
M1: Outgoing Message: User tries to send a text message (using Android IM or Google Hangouts or any other messaging app on phone), our app will intercept the text message and checks if the reciever of that message is in "accept-numbers"; if so, it will allow that message to be sent to the target. If the number is not in "accept-numbers", our app will kill that message (kill I mean that message will be blocked for ever and user has to turn off our app to retype and resend that message to the target)
M2: Incoming Message: If the sender of the incoming message is in "accept-numbers", deliver that message. if the sender of the incoming message is NOT in "accept-numbers", deliver that message after 5 minutes (assumption: every sender will only send 1 text message to us in a 5 minute window; this keeps it simple)
1)when our app is killed, texting should work as usual (in other words, our service should be killed etc)
2)When our app is killed, if there are any incoming messages that are in queue waiting for 5 minute window to expire, they should be delivered and then exit our application (this way no messages will be lost in transit)