
802 Chapter 18
DelayedMessageService 코드
DelayedMessageService.java 전체 코드
다음은
DelayedMessageService
.
java
전체 코드입니다.
알림을 이용해 사용자에게 메시지를 표시하는 기능을
포함합니다. 여러분 코드도 다음처럼 바꾸세요.
package com.hfad.joke;
import android.app.IntentService;
import android.content.Intent;
import android.util.Log;
import android.support.v4.app.NotificationCompat;
import android.app.PendingIntent;
import android.app.NotificationManager;
public class DelayedMessageService extends IntentService {
public static final String EXTRA_MESSAGE = "message";
public static final int NOTIFICATION_ID = 5453;
public DelayedMessageService() {
super("DelayedMessageService");
}
@Override
protec ...