Dim channel As NotificationChannelBuilder
If channel.ChannelsSupported = True Then
channel.Initialize("Status updates", "Status updates", channel.IMPORTANCE_LOW)
channel.EnableLights = False
channel.EnableVibration = False
channel.Build
End If
NB1.Initialize("Status updates")
NB1.smallIcon="notify"
NB1.AutoCancel = False
NB1.OnGoingEvent = True
NB1.DefaultLight = False
NB1.DefaultSound = False
NB1.DefaultVibrate = False
NB1.ContentTitle = "Custom title"
NB1.ContentText = "Custom text"
NB1.setActivity(Main)
Service.AutomaticForegroundMode = Service.AUTOMATIC_FOREGROUND_ALWAYS
Service.AutomaticForegroundNotification = NB1.GetNotification