检查 android 包短信限制?

Check android package SMS limit?

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

在 Google 和 Whosebug 上搜索后,我找不到任何关于包如何查询其当前限制的示例,这是我们必须在自己的包中维护的东西,还是 [=7 中某处有隐藏方法=] API?

如果我们自己的包必须保持其当前限制的计数,您建议如何处理?

来自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.

所以你可以试试 Settings.Secure.SMS_OUTGOING_CHECK_MAX_COUNTSettings.Secure.SMS_OUTGOING_CHECK_INTERVAL_MS