Android Question NB6 LargeIcon for OldNotification

designer2k2

Member
Licensed 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...
 

Erel

Administrator
Staff member
Licensed User
You don't need to change anything inside NB6. Just use NB6 for Android 6+ devices and use NotificationBuilder for older devices.

Please post the full error message from the logs if you aren't able to solve it.
 
Last edited:

designer2k2

Member
Licensed 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
 
Top