1
샘플에서 gcm을 성공적으로 구현했으며 알림 메시지를받을 수 있지만 표시 줄에서 드래그하면 텍스트의 일부가 탭에 나타납니다.알림 드래그에서 탭을 클릭하여 (경고) 대화 상자 열기
탭을 클릭 할 때 (경고) 대화 상자를 열고 전체 메시지를 표시하는 방법을 알 수 없습니다.
누구? 네덜란드에서 감사합니다!
protected void onMessage(Context arg0, Intent arg1) {
Log.i(TAG, "new message= ");
String ticker=arg1.getExtras().getString("ticker");
String subject=arg1.getExtras().getString("subject");
String message=arg1.getExtras().getString("message");
Vibrator vibrator = (Vibrator) arg0.getSystemService(Context.VIBRATOR_SERVICE);
vibrator.vibrate(1000);
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);
int icon = R.drawable.ic_launcher;
CharSequence tickerText = ticker;
long when = System.currentTimeMillis();
Notification notification = new Notification(icon, tickerText, when);
Context context = getApplicationContext();
CharSequence contentTitle = subject;
CharSequence contentText = message;
Intent notificationIntent = new Intent(this, FragmentActivity.class);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
final int HELLO_ID = 1;
mNotificationManager.notify(HELLO_ID, notification);