Public Sub Build (ContentTitle As Object, ContentText As Object, Tag As String, Activity As Object, in As Intent) As Notification
If IsOld Then
'OldNotification.SetInfo2(ContentTitle, ContentText, Tag, Activity)
OldNotification.SetInfo2(ContentTitle, ContentText, Tag, in)
Return OldNotification
Else
'Dim in As Intent = CreateIntent(Activity, False)
in.Flags = Bit.Or(268435456, 131072) 'FLAG_ACTIVITY_NEW_TASK and FLAG_ACTIVITY_REORDER_TO_FRONT
in.PutExtra("Notification_Tag", Tag)
Dim PendingIntent As Object = PendingIntentStatic.RunMethod("getActivity", Array(ctxt, Rnd(0, 0x7fffffff), in, 0))
NotificationBuilder.RunMethodJO("setContentTitle", Array(ContentTitle)).RunMethodJO("setContentText", Array(ContentText))
NotificationBuilder.RunMethod("setContentIntent", Array(PendingIntent))
'NotificationBuilder.RunMethod("setContentIntent", Array(CreateReceiverPendingIntent(Activity, Tag)))
If IsChannel Then
Dim manager As JavaObject = ctxt.RunMethod("getSystemService", Array("notification"))
manager.RunMethod("createNotificationChannel", Array(Channel))
End If
Return NotificationBuilder.RunMethod("build", Null)
End If
End Sub