android - Sending SMS in background from service while phone is sleeping -> RESULT_ERROR_NO_SERVICE -



android - Sending SMS in background from service while phone is sleeping -> RESULT_ERROR_NO_SERVICE -

i'm developing gps tracking app sends geo-positions sms in conditions (time, distance).

it works well, when there no gsm activity minutes (e.g. receiving sms or phone calls), sending sms fails smsmanager.result_error_no_service. not problem of bad signal, happens in areas signal contineously strong.

for me seems phones (android 2.3 , 4.0.4) set sending hardware kind of sleep mode after several minutes when screen off , when phone call smsmanager.sendtextmessage android doesn't awake them.

weird: when receive (unanswered) phone phone call or sms, sending sms works (i retry every 2 minutes in case of errors). sufficient unlock screen without doing anything.

is there workaround? can tell android wake gsm before sending sms?

(i haven't tried powermanager.partial_wake_lock because cpu running obviously.)

android sms android-service gsm

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -