Android Question NB6 LargeIcon for OldNotification

designer2k2

Member
Licensed User
Longtime User
Hello,
im working on recovering a app to Android 8.
For this i updated to B4A 8.0 and replaced the Notificationbuilder Lib with the NB6.

But im missing LargeIcon for the OldNotification, is there a way to bring this to work? :confused:

I looked into replacing the OldNotification inside NB6 with the Notificationbuilder, but no luck, just got "Exeption must call Setinfo or SetInfo2" what makes no sense to me as this does not exist there...
 

designer2k2

Member
Licensed User
Longtime User
ok, i have made it like this.

Some functions i missed in NB6, and added them:
B4X:
'Sets the ongoing status of the notification, the user cannot close it.
Public Sub setOngoing (ongoing As Boolean) As NB6
    If IsOld Then
        OldNotification.OnGoingEvent = ongoing
    Else
        NotificationBuilder.RunMethod("setOngoing", Array(ongoing))
    End If
    Return Me
End Sub

'Sets if the timestamp is shown inside the notification.
Public Sub setShowWhen (bshow As Boolean) As NB6
    If IsBuilder Then
        NotificationBuilder.RunMethod("setShowWhen", Array(bshow))
    End If
    Return Me
End Sub
 
Upvote 0
Top