tags:

views:

32

answers:

1

I have boot loader listener. But After user install the application my listener does not start until first boot-up. is there any way to check whether my listener running or not?

A: 

If you added a receiver for android.intent.action.BOOT_COMPLETED that will be broadcasted after the boot is completed.

It won't be executed after the application is installed, and there i no method to get your app start automatically after install, the user must explicitly click on it.

Restart your phone and if you get the listener right, it works. To check maybe add some code to the listener, probably should start a Service or Activity or raise a Toast

Pentium10
Yes, My listener already starting at Booting. But my issue is by application listener need ti start before boot-up(After installation and before boot).
Chandana
AsI told you it cannot start after installation automatically. And I don't see such thing to start before boot neither on PC. What are you trying to launch?
Pentium10
I have ContentObserver for SMS message listening. It stating on Boot. But until first bootup my application not working. That is my issue.
Chandana
You can't start automatically after install is completed an application. You should instruct your users to click on the app after they have installed. You should make sure you start the listener when the application starts even if that is registered twice. At startup always setup any listeners, alarms that you need.
Pentium10
My listener stating on Phone boot. Not in a application start, I think Same listener starting in 2 time( Booting and App loading) it's not good. id there any way to start my listener in first application load time then it want to normally start on boot.
Chandana
Read the discussion and comments of this thread, it might help you: http://stackoverflow.com/questions/3120191/how-can-i-ensure-a-service-is-started-at-9am-and-stopped-9pm-every-day
Pentium10
Don't worry the system won't see the listener as started two times. It will simply detect if it's already present by the Intent, and it will handle it internally. So the answer is to start at Booting and App loading. There is nothing bad in this, and won't cause overhead.
Pentium10