如何中止短信,才达到了Android 4.4.4及以上的收件箱?收件箱、达到了、短信、Android

2023-09-07 17:58:56 作者:肆意醉饮思绪清

由于安卓4.3的编程方式发送SMS是工作正常,但4.4.4编程方式发来的短信也被复制到本地的收件箱 - 如何处理这个问题。

如何从去收件箱中停止短信或删除短信的Andr​​oid 4.4.4及以上

解决方案

与Android 4.4开始,使用任何非默认SMS应用程序 SmsManager的来发送邮件会自动让他们写入提供者由系统。实在是没有办法prevent这一点,比你的应用程序作为默认的短信应用程序等。默认的应用程序是负责撰写自己的传出消息的提供者,它可以选择不这么做。此案是相同的接收短信;如果你的应用程序是不是默认的SMS应用程序,它确实没有对传入的消息是否写入提供任何控制。此链接描述什么是必要的一个应用程序,以便能够作为一个缺省SMS应用程序。

获取你的短信应用程序准备奇巧

这是说,我有一个解决方法,允许非默认的应用程序写入权限的提供商,但只对于Android 4.4系统;它不工作(但)在安卓5.0或以上。这样,将有可能删除传入和传出的消息,但他们已经被写入之后。

As of android 4.3 the programatically sent sms is working fine, but 4.4.4 programatically sent sms is also copied to native inbox - how to handle this issue.

android短信发不了图片,手机发不出短信怎么办 安卓手机发不出短信的解决方法 河东软件园...

How to stop an sms from going to inbox or delete sms in android 4.4.4 and above

解决方案

Starting with Android 4.4, any non-default SMS app using SmsManager to send messages will have them automatically written to the Provider by the system. There is really no way to prevent this, other than your app being the default SMS app. The default app is responsible for writing its own outgoing messages to the Provider, and it can opt not to do so. The case is the same for incoming SMS messages; if your app is not the default SMS app, it really doesn't have any control over whether an incoming message is written to the Provider. This link describes what is necessary for an app to be able to act as a default SMS app.

Getting Your SMS Apps Ready for KitKat

That said, I do have a workaround that allows a non-default app write access to the Provider, but only for Android 4.4; it does not work (yet) in Android 5.0 or above. With this, it would be possible to delete both incoming and outgoing messages, but only after they've been written.

 
精彩推荐
图片推荐