Can I Modify Sms_body Before Sending Sms With Built-in Sms Application?
I know that we can send SMS via built-in SMS app in this way - Intent sendIntent = new Intent(Intent.ACTION_VIEW); sendIntent.setData(Uri.parse('sms:')); sendIntent.putExtra('sms
Solution 1:
This is not possible, since SmsManager is part of frameworks. You cannot hijack it.
Edit:
What you could do is change your app manifest to recieve ACTION_VIEW
and uri sms:
just like default messaging app and then when launched will change the body and launch the default messaging app.
Edit: Add below intent filter to your app and then "sms_body" extra from the intent and rebroadcast it this time by createChooser
<intent-filter><actionandroid:name="android.intent.action.VIEW" /><actionandroid:name="android.intent.action.SENDTO" /><categoryandroid:name="android.intent.category.DEFAULT" /><categoryandroid:name="android.intent.category.BROWSABLE" /><dataandroid:scheme="sms" /><dataandroid:scheme="smsto" /></intent-filter>
Post a Comment for "Can I Modify Sms_body Before Sending Sms With Built-in Sms Application?"