0
응용 프로그램 알림을 사용하여 새 응용 프로그램을 시작하려면 어떻게합니까? NotificationManager는 생성 된 알림에 액세스 할 수있는 메소드를 제공하지 않습니다. 어떤 제안? 감사.응용 프로그램 알림을 사용하여 다른 응용 프로그램/활동 호출
응용 프로그램 알림을 사용하여 새 응용 프로그램을 시작하려면 어떻게합니까? NotificationManager는 생성 된 알림에 액세스 할 수있는 메소드를 제공하지 않습니다. 어떤 제안? 감사.응용 프로그램 알림을 사용하여 다른 응용 프로그램/활동 호출
PendingIntent
으로 알림을 만들어야합니다. Android Developers에서 :
Context context = getApplicationContext();
CharSequence contentTitle = "My notification";
CharSequence contentText = "Hello World!";
Intent notificationIntent = new Intent(this, MyClass.class);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
private static final int HELLO_ID = 1;
mNotificationManager.notify(HELLO_ID, notification);
MyClass
당신이 통지에서 시작하려는 활동이다.