Android Question NB6 LargeIcon for OldNotification

Discussion in 'Android Questions' started by designer2k2, May 16, 2018.

  1. designer2k2

    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...
     
  2. Erel

    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: Jul 12, 2018
    MarcoRome likes this.
  3. designer2k2

    designer2k2 Member Licensed User

    ok, i have made it like this.

    Some functions i missed in NB6, and added them:
    Code:
    '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
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice