Capture Android SMS

I want to develop such an application. when installing which I will have two options when sending SMS through the application or sms application by default.

Is there any way we can collect outgoing SMS?

+3
source share
2 answers

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.

+2
source
0

Source: https://habr.com/ru/post/1762318/


All Articles