DownloadForegroundService.java 文件源码

java
阅读 49 收藏 0 点赞 0 评论 0

项目:VBrowser-Android 作者:
@RequiresApi(Build.VERSION_CODES.O)
private String createNotificationChannel(){
    String channelId = "VBrowserNotification";
    String channelName = "前台下载通知";
    NotificationChannel chan = new NotificationChannel(channelId,
            channelName, NotificationManager.IMPORTANCE_HIGH);
    chan.setLightColor(Color.BLUE);
    chan.setImportance(NotificationManager.IMPORTANCE_NONE);
    chan.setLockscreenVisibility(Notification.VISIBILITY_PRIVATE);
    NotificationManager service = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
    service.createNotificationChannel(chan);
    return channelId;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号