달력

22025  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
Notification noti = new Notification(R.drawable.icon,
						"새글이 있습니다.", System.currentTimeMillis());
				noti.defaults |= Notification.DEFAULT_VIBRATE;
				noti.flags |= Notification.FLAG_AUTO_CANCEL;

				Intent intent = new Intent(NewTalkService.this, ChatView.class);
				intent.putExtra("UserName", "1234");
				intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
						| Intent.FLAG_ACTIVITY_CLEAR_TOP
						| Intent.FLAG_ACTIVITY_SINGLE_TOP);				PendingIntent content =
					PendingIntent.getActivity(NewTalkService.this, 0, intent, 0);
				noti.setLatestEventInfo(NewTalkService.this,
						"새글알림", "새로운 글이 있습니다.", content);
				m_NotiManager.notify(NewTalkService.NEWNOTI, noti);
Posted by 위너즈
|