I have created (i'm a noob!!!!) a good app that use a service开发者_JS百科 to do some periodic operations.
When the phone is connected to pc via USB (using eclipse with device connected) during test, the service run even in stadby, in the best way possible.
I can see it in logcat and by the result operation...
But when the phone is disconnected the service is running only if the phone is wake up!
How i can solve it without wakelock ?
I mean obtain something like RADIO FM, understand? ;-)
Thanx to all friends!
When the phone is connected to pc via USB (using eclipse with device connected) during test, the service run even in stadby, in the best way possible.
That is probably because the device is not actually in "standby".
How i can solve it without wakelock ?
You can't.
I have created (i'm a noob!!!!) a good app that use a service to do some periodic operations.
Use AlarmManager
and something like my WakefulIntentService
for this.
I mean obtain something like RADIO FM, understand? ;-)
Android does not have "RADIO FM".
精彩评论