当前位置: 代码迷 >> Android >> android 发送揭示消息
  详细解决方案

android 发送揭示消息

热度:77   发布时间:2016-05-01 12:58:01.0
android 发送提示消息
NotificationManager notificationManager    = (NotificationManager) context				.getSystemService(Context.NOTIFICATION_SERVICE); notification.defaults = Notification.DEFAULT_LIGHTS;          notification.icon = R.drawable.ic_action_search ;                  notification.flags |= Notification.FLAG_AUTO_CANCEL;         notification.when = System.currentTimeMillis();         notification.tickerText = message;  // 弹出消息提示信息Intent in = new Intent(context,                 Test.class);         PendingIntent contentIntent = PendingIntent.getActivity(context, 0,                 in, PendingIntent.FLAG_UPDATE_CURRENT);         notification.setLatestEventInfo(context, "0.0.", message,                 contentIntent);         notificationManager.notify(new Random().nextInt(), notification);

?

  相关解决方案