Receiver dynamically or in manifest?

by Manfred » Thu, 05 Mar 2009 20:50:23 GMT

Sponsored Links

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

this.registerReceiver(smslistener, new IntentFilter

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

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??


Other Threads

1. Disable the screen lock when the Android OS startup

HI all,
I want to make my app launched when the Android OS startup.
I can make it, but when the Android OS startup, the screen lock is
how can I remove the screen lock launch so that I can get into my app
I am doing this in my embedded system.Thanks


2. Application not scrolling

Ok this is probably a stupid question but,
i have an activity in my application, its a form with lots of
editTexts and buttons
and it is longer than the screen can show in one time...
and in my emulator when a click the down button to move to the next
editText the screen does now scroll with it...

I have confirmed that i can input in the text filed and even click the
buttons...but hte screen does not move down to show these
elements ...?
is there any setting i have to do to make this happen???


3. Move Image View to new location

4. who can tell me the source code that comes with android app

5. Back Button doesn't go to previous activity

6. Start service

7. "content://sms/"