Hi!

I have dynamically registered a receiver in a class that extends
Service to inform for incoming sms.

Code:
this.registerReceiver(smslistener, new IntentFilter
("android.provider.Telephony.SMS_RECEIVED"));

It works, but sometimes, when the phone is longer not used and the
black-screen appears, my application does not notice incoming sms
until i use the phone again.
So for example, i sent a sms at 13:23 and the G1 got it also at 13:23
but in the Logfile the entry was made at 13:43 when i used the phone
again.

I read in another article that its better for listening to incoming
sms to register the receiver not dynamically but in the manifest, then
it should work! But my problem is, if i register it in the manifest it
is running when the application starts, but i want that the user can
choose if incoming sms would be noticed.

So is there a way to register the receiver in manifest, but stop it
then dynamically and start it again? Or how could this be done??

Thanks
manfred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to