Post [Q] Messaging based GPS app

Hello XDA,
Well I am just a Beginner in android development, basically I am a student and a task is given to me to make an simple application don't need to have great UI etc, but it should perform functionality as directed below or give and explain your reason weather it could be implemented or not.
Well i think it could be implemented but i need guidance about how to do that,

1) Built an app which can triggered by text message (could be any type of)
2) application need to have some code for gps which can be triggered by sending a simple message from my other android phone(how and on which activity)
3) than that phone have to return its location by sending coordinate or map link with its location to me (Email or just a simple text message or other messaging services like whatsapp viber etc)
4) that message should not be received by any other messaging app (how can i Limitize the broadcast receiver etc)
5) if GPS is off text message should turn it on first