When you received sms, you can start your service using the broadcast receiver
@Override public void onReceive(Context context, Intent intent) { try { context.startService(new Intent(context, YourService.class)); } catch (Exception e) { Log.d("Unable to start ", "Service on "); }
and pls make sure you specify permission on your AndroidManifest.xml file
<uses-permission android:name="android.permission.RECEIVE_SMS">
and to send and receive sms you can check this tutorial Sending sms in android
source share