i used below code but it didn't worked...?You can add an intent filter as described here: Making alternative SMS sender default in Android - Stack Overflow
See also this tutorial (about intent filters): Intent Filters - Intercepting SMS messages in the background
It will most probably not work from other SMS apps as they send the messages directly (compared to sending intents).
AddManifestText(
<activity android:name="MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
</intent-filter>
</activity>)
This is why I wrote the above sentence...It will most probably not work from other SMS apps as they send the messages directly (compared to sending intents).
can i just make app to appear in options menu when user open an contact to send sms. & also to make it as default app ?I'm sorry but I do not understand your question.
yes, I followed may be I would be wrong somewhereHave you followed the steps I wrote in post #2? The user should be able to choose your app.
Can you please explain it i am new to b4a.You will need to parse the Intent data to get any number or information passed to your application. (Activity.GetStartingIntent)
Dim tmpint As Intent
Dim su As StringUtils
tmpint=Activity.GetStartingIntent
If tmpint.Action="android.intent.action.SENDTO" Then
Dim splt() As String
splt=Regex.Split(":", tmpint.GetData)
tomobile.text=su.DecodeUrl(splt(1),"UTF8")
End If