问答详情
源自:2-1 channelApi的介绍

我没有getManeger方法

我没有getManeger方法是为啥呢

提问者:qq_北城痞子_0 2018-11-14 14:20

个回答

  • 精慕门9177950
    2019-05-04 12:38:40

    // 加上这个方法
    private NotificationManager getManager(){
        if (manager == null){
            manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
        }
        return manager;
    }


  • 路随行
    2018-11-22 15:05:18

    自己写的,

    NotificationManager manager;
    manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);