开发者

Playing ringtons in a broadcast receiver

I use pending_intents and a broadcast_receiver for pending events processing. When the broadcast_receiver receives an intent it creates an instance of a ringtone with STREAM_NOTIFICATION and `play()' it. But sounds is late for a few dozen minutes!

I have checked that the pending_intens are come in proper time and the broadcast_receiver proce开发者_开发百科sses them properly.

It seems there is a problem with playing notifications while a phone stay in sleep mode (screen is off).

Somebody know how to bypass the problem?


It seems that the PowerManager and WakeLock classes should be used to enable processor unit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜