当前位置: 代码迷 >> Android >> Android开发片断–Notification
  详细解决方案

Android开发片断–Notification

热度:92   发布时间:2016-05-01 19:29:50.0
Android开发片段–Notification

NotificationManager mn =( NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);		notification = new Notification(iconImage,statusBarText, System.currentTimeMillis());		notification.defaults |= Notification.DEFAULT_LIGHTS;		notification.sound = Uri.parse("android.resource://" + context.getPackageName()				+ "/" + R.raw.message);        PendingIntent contentIntent=PendingIntent.getActivity(context,                0, null, 0);        notification.setLatestEventInfo(context,title, content, contentIntent);        mn.notify(1, notification);
?
  相关解决方案