我想在用户触摸通知时关闭我的应用程序

时间:2017-02-03 09:56:51

标签: android push-notification

我想在用户触摸通知时关闭我的应用程序,这是我在主要活动中通知代码的代码

here

    NotificationCompat.Builder builder=new           NotificationCompat.Builder(this);
    builder.setSmallIcon(R.drawable.earth);
    builder.setContentTitle("RadioPlanet");
    builder.setContentText("Touch here to stop");
    int mll=001;
    NotificationManager mNotification=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
    mNotification.notify(mll,builder.build());

0 个答案:

没有答案