specify valid wake lock level

android, google-cloud-messaging, google-play-services, java

Solution

You must specify one of

- PARTIAL_WAKE_LOCK

- FULL_WAKE_LOCK

- SCREEN_DIM_WAKE_LOCK

- SCREEN_BRIGHT_WAKE_LOCK

when you call newWakeLock

Problem

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!

Original source