80,490
社区成员
发帖
与我相关
我的任务
分享
nm = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
Notification nf = new Notification( R.drawable.ic_launcher,"任务请求",System.currentTimeMillis());
nf.flags = Notification.FLAG_INSISTENT;
RemoteViews rv = new RemoteViews(this.getPackageName(),R.layout.notify_req);
Log.i( TAG, "STEP 1!" );
Intent intent = new Intent(this,PersonAtv.class);
PendingIntent pi = PendingIntent.getActivity(this, 0, intent, 0);
nf.contentIntent = pi;
nf.contentView = rv;
nm.notify(1, nf);
Log.i( TAG, "STEP 2!" );