안녕하세요.
GCM 테스트를 하고 있습니다.
안드로이드 디벨로퍼 사이트를 보고 추가를 했습니다.(http://developer.android.com/google/gcm/gcm.html)
-------------------
private static PowerManager.WakeLock sWakeLock;
private static final Object LOCK = MyIntentService.class;
static void runIntentInService(Context context, Intent intent) {
synchronized(LOCK) {
if (sWakeLock == null) {
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
sWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "my_wakelock");
}
}
sWakeLock.acquire();
intent.setClassName(context, MyIntentService.class.getName());
context.startService(intent);
}
그런데 실제 테스트를 해보니
푸시는 왔는데 화면은 켜지지 않습니다.
로그에는 아래와 같이 찍히고요.
04-18 17:44:17.579: V/GCMBaseIntentService(19684): Releasing wakelock
테스트 폰은 갤럭시노트1(젤리빈) 입니다.
조언 부탁드립니다.