1

I'm developing SMS application which sends a lot of SMS's. It is not default SMS app like Google suggests. I'm getting a popup "Messaging is sending a large number of SMS messages. Do you want to allow this app to continue sending messages?". But i want to avoid that and recognize the limit programmatically.

Anyone have any suggestions? Thanks!

6
  • You are "developing SMS application" and asking us here to tell you why your code pops up with "Messaging is sending a large number of SMS messages..."? I suspect that it is SMS gateway that generates this message, as you failed to disclose anything about your application I will fail to tell you what is happening... Commented Jul 2, 2014 at 8:20
  • Provide all details if asking technical question Commented Jul 2, 2014 at 8:20
  • if i remember correctly there is a limit of 160 characters per message, so all what you need to do is to check is number of characters in message divided by 160 is greater than your maximum number of messages. note that it is not exact formula, as whenever message is split between sereral messages, there are added some additional characters to it
    – user902383
    Commented Jul 2, 2014 at 8:49
  • "Messaging" popup appears when I try to break the limit. Android, JellBean I think, is limited to 30 messages in 30 minutes. SmsManager, class in android which I use to send messges, has five error codes (RESULT_OK, RESULT_ERROR_GENERIC_FAILURE, RESULT_ERROR_NO_SERVICE, RESULT_ERROR_NULL_PDU, RESULT_ERROR_RADIO_OFF), but one is hidden RESULT_ERROR_LIMIT_EXCEEDED and I can't access it forums.androidcentral.com/google-nexus-4/… @user902383 this has nothing to do with characters length:/, but thanks
    – File
    Commented Jul 2, 2014 at 9:09
  • @GermannArlington I'm not using SMS gateway. Popup is generated by Android OS
    – File
    Commented Jul 2, 2014 at 9:14

1 Answer 1

3

SMS sending limit was introduced not later than Gingerbread. As far as I know, and I investigated thoroughly, it is generally impossible to override these limits on non-rooted devices. If possible, those are rare exceptions. But, if your app is supposed to send messages from your device only or from controlled number of devices, you may get around this problem by setting SMS_OUTGOING_CHECK_MAX_COUNT to a huge number (say 99999) in:

  • /data/data/com.android.providers.settings/databases/settings.db
    1. table secure
    2. table system
  • /data/data/com.google.android.gsf/databases/gservices.db
    1. table main
4
  • 1
    @File: If you happen to have any difficulties sending messages (SMS) from Android devices, feel free to contact me. Handling status reports could be cumbersome. Android's design is far from ideal, in that matter. Anything that takes my minutes, but not hours, is free of charge. Commented Nov 1, 2014 at 20:19
  • I have the same problem. Can you provide some code on how to set the SMS_OUTGOING_CHECK_MAX_COUNT ? I've written a SMS Sending app and now that it is finished, I've encountered the problem. Commented Jul 13, 2017 at 5:30
  • Using adb shell would be the way I'd do it now. Don't know about setting it from code. Commented Jul 1, 2022 at 12:25
  • 1
    it was fun to receive a reply on a comment after 5 years :) thanks anyway Commented Jul 1, 2022 at 15:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.