@ Kartik ... sorry, I do not have a solution. You can use the example below to see if you can send text messages to your own phone for testing.
@Chris / Tim
1) you got to have your cell phone turned on
2) you got to install your app
3) you have to know this difficult algorithm

If you can not, I suspect it has something to do with the type of cell phone network you are in
The most commonly used radio systems are GSM (Global System for Mobile Communication) and CDMA (Code Division Multiple Access). As of September 2017, Verizon, Sprint, and US Cellular use CDMA. AT&T, T-Mobile, and most other providers around the world use GSM, making it the most widely used mobile network technology. LTE (Long-Term Evolution) is based on GSM and offers greater network capacity and speed.
or it might have something to do with the Android version (this was done with an LG 4.4.2 , Google being increasingly security concous might not allow this on devices above 5+ (I do not know as I do not have anything other than a 4.4.2 phone to test).
-- Steve