我希望开发这样一个应用程序,在安装时,我发送短信时可以选择使用我的应用程序或默认短信应用程序。
有没有办法捕获即将发送的短信?
有没有办法捕获即将发送的短信?
<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>
这段代码传递了一个数据uri,格式为smsto://目标号码,你的应用需要处理短信输入和发送工作,可以使用SMSManager实现。