jcaruso
jcaruso

Reputation: 2494

Android App monitoring incoming calls keeps phone awake

I have an android app that is monitoring incoming and outgoing calls. The app has a service, a PhoneStateListener, and to detect how long the call was sets a start time and end time. However, what I've noticed is that the phones screen starts to flash from bright to dim and back again. Now sure why, any idea's?

Upvotes: 4

Views: 532

Answers (1)

Akshit Rewari
Akshit Rewari

Reputation: 941

Although much can't be said without studying the code, your background service may acquire a wakelock to do the job . If you are doing any background work in your code, You should modify your code to take full advantage of the wakelocks provided by android(like using "partial wakelock" "screen dim wakelock" "screen bright wakelock" )

This page should provide the relevant information on wakelock

http://developer.android.com/reference/android/os/PowerManager.html

http://developer.android.com/reference/android/os/PowerManager.WakeLock.html

Upvotes: 1

Related Questions