Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

specify valid wake lock level

working an an app with GCM support, no problems there. But when I push the notification, the app crashes an LogCat says the following:

03-21 14:32:13.276: E/AndroidRuntime(4457): java.lang.RuntimeException: Unable to start activity ComponentInfo{de.yanniks.cm_updatechecker/de.yanniks.cm_updatechecker.UpdateChecker}: java.lang.IllegalArgumentException: Must specify a valid wake lock level.

How do I define the valid wake lock level?

Please help!

like image 461
yanniks Avatar asked Mar 21 '13 18:03

yanniks


Video Answer


1 Answers

You must specify one of

  • PARTIAL_WAKE_LOCK
  • FULL_WAKE_LOCK
  • SCREEN_DIM_WAKE_LOCK
  • SCREEN_BRIGHT_WAKE_LOCK

when you call newWakeLock

like image 99
Robby Pond Avatar answered Sep 22 '22 05:09

Robby Pond