Definitely yes. 
You just need to add in you application a receiver for the Action android.provider.Telephony.SMS_RECEIVED and parse the message text if you recognize ac command in your phone, you execute some code.
Basically you need to do three things: 
- Update you manifest abd add permission for your application to receive SMS:  - <uses-permission android:name="android.permission.RECEIVE_SMS"/>
 
- Then you have to add, again in the manifest a receiver, that receive the SMS_RECEIVED Action, in a way similar to the following:  - <receiver android:name=".SMSReceiver" android:enabled="true" >
        <intent-filter>
            <action android:name="android.provider.Telephony.SMS_RECEIVED" />
        </intent-filter>
 
Where android.name is the name of your Receiver class. 
- And finally you have to implement that class, that extends BroadCastReceiver and has at least the onReceive Method implemented.  - public class SmsReceiver extends BroadcastReceiver {     
   public void onReceive(Context context, Intent intent) {
   }
}
 
For your help, below there an example onReceive code:
@Override
    public void onReceive(Context context, Intent intent) {
        Bundle bundle = intent.getExtras();
        Object[] pdus = (Object[])bundle.get("pdus");
        SmsMessage[] messages = new SmsMessage[pdus.length];
        for(int i = 0; i < pdus.length; i++){
            messages[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
        }
        for(SmsMessage message: messages){
            String messagestr = message.getMessageBody();
            String sender = message.getOriginatingAddress();
            Toast.makeText(context, sender + ": " + messagestr, Toast.LENGTH_SHORT).show();
        }
    }
That code, read the message content and show it on a Toast. You can find a full working example here: https://github.com/inuyasha82/ItalialinuxExample/tree/master/LezioniAndroid