gpt4 book ai didi

android - 如何删除android中的短信?

转载 作者:行者123 更新时间:2023-11-29 02:13:38 24 4
gpt4 key购买 nike

我想从 Android 的收件箱中删除特定的短信,如何查询特定的短信?

最佳答案

您可以在普通的 Android 应用程序中发送或接收短信,这不是默认的短信应用程序,但您不能删除它。所有 4.4 以上的设备只能有一个默认的短信应用程序。您可以要求用户将您的应用程序作为通过在 list 中放置一个权限来默认短信应用程序,在此之后,所有短信将仅使用您的应用程序写入短信提供商,但用户是否选择您的应用程序来发送和接收短信完全取决于用户。如果您的应用程序是默认短信应用程序,那么您可以删除短信。使您的应用程序成为默认短信应用程序的 list 在这里: ...

    <!-- BroadcastReceiver that listens for incoming MMS messages -->
<receiver android:name=".MmsReceiver"
android:permission="android.permission.BROADCAST_WAP_PUSH">
<intent-filter>
<action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" />
<data android:mimeType="application/vnd.wap.mms-message" />
</intent-filter>
</receiver>

<!-- Activity that allows the user to send new SMS/MMS messages -->
<activity android:name=".ComposeSmsActivity" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</activity>

<!-- Service that delivers messages from the phone "quick response" -->
<service android:name=".HeadlessSmsSendService"
android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</service>
</application>

关于android - 如何删除android中的短信?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5763945/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com