Sub CreateNotificationChannel(ImportanceLevel As Int)
Dim p As Phone
If p.SdkVersion >= 26 Then
Dim ctxt As JavaObject
ctxt.InitializeContext
Dim channelId As String = "channel_" & ImportanceLevel
Dim channel As JavaObject
channel.InitializeNewInstance("android.app.NotificationChannel", Array(channelId, Application.LabelName, ImportanceLevel))
'modify the channel
'For example: disable the badge feature
channel.RunMethod("setShowBadge", Array(False))
'set it
Dim manager As JavaObject = ctxt.RunMethod("getSystemService", Array("notification"))
manager.RunMethod("createNotificationChannel", Array(channel))
End If
End Sub