You can add the following intent filter to your description of AndroidManifest.xml Activity, which will allow the user to select your application to send SMS when they click the "Send SMS" action in contacts and SMS application:
<intent-filter>
<action android:name="android.intent.action.SENDTO"></action>
<data android:scheme="smsto"></data>
<category android:name="android.intent.category.DEFAULT"></category>
</intent-filter>
This transmits uri data in the format smsto: // target-number, your application needs to take care of the text recording and sending SMS using SMSManager.
Frank source
share