android - Android 4.4 KitKat 上的 SMS 实用程序

标签 android sms android-broadcast android-4.4-kitkat smsmanager

在 KitKat 发布之前,我开发了一个应用程序,它使用预定义的短代码通过 SMS 执行交易。例如发送

"<PIN> BAL <phone number>"

会回复您的信用余额。用户看不到短代码,而是从列表中选择所需的功能,插入他的 PIN 并按下发送。该消息由应用程序制定和发送。这里的重点是他的外发短信(其中包含他的 PIN)没有保存在任何地方。

但是,由于 KitKat,只要我的应用不是默认的短信应用,传出的短信就会保存在默认的消息应用中。我也不能要求用户将我的应用设置为默认应用,因为它不能用于正常的消息传递。

解决方案或变通办法将是救命稻草。

最佳答案

The main point here is that his outgoing SMS (which contains his PIN) is not saved anywhere. A solution or a workaround would be a lifesaver.

算了 - 没有干净的。 See docs :

Also, the system now allows only the default app to write message data to the provider, although other apps can read at any time. Apps that are not the user's default can still send messages — the system handles writing those messages to the provider on behalf of the app, so that users can see them in the default app.

关于android - Android 4.4 KitKat 上的 SMS 实用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20884847/

相关文章:

Android - 在单独的线程中发送短信

android - 当应用程序从后台清除时,AlarmManager 被丢弃

android - 类别 DEFAULT 与广播接收器有什么用?

android - 带有图像的 ListView

android - RecyclerView 不显示任何内容

android - 滚动条在 Android 中消失了?

java - 在 Android 中监控电池电量的正确优化方法

java - Android Tabhost刷新

android - 未调用广播接收器

java - 将 MMS Intent 与图像文件结合使用