Alarm Ring via SMS code

I am trying to design one android app which gives specific alarm like battery low, device off, power failure, etc. when sms code is received. Can any one help me?
My product will send error sms from sim inserted in it as soon as error message will received the android app should activate and ring the alarm time for that specific error message.