I wrote a service and I registered BroadcastReceiver in it. In the
onReceive () method of BroadcastReceiver catagory,I just wrote
Intent.ACTION_TIME_TICK.equals(intent.getAction()) to receive the
systenm time every minute and deal with everything that I should do in
it every minute.But i found a problem that when the mobile phone
screen was locked and was completely black,my service seems to be
sleep and does not work,and when I light up the screen(it is still in
locked condition),the system will automatically run my service.I do
not know the reason,I guess if it is because my service is not the
system-level service?
When the mobile screen is black,Andraid system will hibernate the
sevice which is not the system-level service,so if this,I should add
my service to system service,but I know how to use
android.permission.ADD_SYSTEM_SERVICE? If you can,please send me a
example about how to add own service to system-level service.This
problem has been troubled me for two weeks.Thank you very much and
hoping for reply asap.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---