检查android包的短信限制吗? [英] Check android package SMS limit?

查看:70
本文介绍了检查android包的短信限制吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IceCreamSandwch和JellyBean中,默认触发限制是30分钟内来自任何程序包的30条SMS.过去一小时内过去是100条SMS,这并不是一个问题,但是现在我们需要注意我们的应用程序发送了多少条消息.

使用Google搜索和搜索StackOverflow时,我找不到任何有关如何查询软件包当前限制的示例,这是我们必须在自己的软件包中维护的东西,还是Android API中某个隐藏的方法?

如果我们自己的程序包必须保持当前限制,那么您打算如何解决呢?

解决方案

来自萨顿的G +帖子:

OEM可以通过更改源代码或使用安全设置"Settings.Secure.SMS_OUTGOING_CHECK_MAX_COUNT"和"Settings.Secure.SMS_OUTGOING_CHECK_INTERVAL_MS"来覆盖这些限制,因此您可能会看到出现对话框,要求用户确认发送的SMS的用户.即使您遵守#AOSP默认速率限制,也可以.

因此,您可以尝试 Settings.Secure.SMS_OUTGOING_CHECK_MAX_COUNT Settings.Secure.SMS_OUTGOING_CHECK_INTERVAL_MS .

In IceCreamSandwch and JellyBean the default trigger limit is 30 SMSes from any package within a 30 minute period. This used to be 100 SMSes in an hour, which wasn't such a problem but now we need to be careful how many messages our app sends.

Having Googled and searched StackOverflow I cannot find any sample of how a package can query it's current limit, is this something that we would have to maintain in our own package or is there a hidden method somewhere in the Android API?

If our own package has to maintain a count of it's current limit how would you propose to go about it?

解决方案

From one of Al Sutton's G+ post:

The limits can be overridden by OEMs either by changing the source code or using the secure settings Settings.Secure.SMS_OUTGOING_CHECK_MAX_COUNT and Settings.Secure.SMS_OUTGOING_CHECK_INTERVAL_MS, so you may see users presented with a dialogue asking them to confirm the SMS being sent is OK even if you comply with the #AOSP default rate limits.

So you might give a try to Settings.Secure.SMS_OUTGOING_CHECK_MAX_COUNT and Settings.Secure.SMS_OUTGOING_CHECK_INTERVAL_MS.

这篇关于检查android包的短信限制吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆