For some reason I get null for the title and TickerText for Big Picture style notifications, particularly for Youtube
PackageName=com.google.android.youtube
TickerText=
icon=2131232750
id=99
infoText=
largeIcon=(Bitmap) Not initialized
progress=0
progressIndeterminate=false
progressMax=0
scoreModified=false
showChronometer=false
showWhen=false
subText=
text=
textLines=
title=
(Bundle) Bundle[{android.title=Digital Foundry, android.reduced.images=true, client_id=aaab797b-40c1-491e-bbde-d6cbf06cf3bd, android.subText=null, android.template=android.app.Notification$BigPictureStyle, android.showChronometer=false, android.icon=2131232750, android.text=Resident Evil Village PC Port Review: OK, But Not Quite Good Enough, android.progress=0, android.progressMax=0, interaction_screen_bundle_extra=Bundle[mParcelledData.dataSize=184], android.appInfo=ApplicationInfo{3761b8a com.google.android.youtube}, android.picture=android.graphics.Bitmap@c69f5fb, android.contains.customView=true, android.showWhen=true, android.largeIcon=android.graphics.Bitmap@d326618, android.infoText=null, android.progressIndeterminate=false, android.remoteInputHistory=null, android.summaryText=Resident Evil Village PC Port Review: OK, But Not Quite Good Enough, android.support.v4.app.extra.COMPAT_TEMPLATE=android.support.v4.app.NotificationCompat$BigPictureStyle, android.title.big=Digital Foundry, logging_directive=[B@820f871}]
PackageName=com.google.android.youtube
TickerText=
icon=2131232750
id=99
infoText=
largeIcon=(Bitmap) Not initialized
progress=0
progressIndeterminate=false
progressMax=0
scoreModified=false
showChronometer=false
showWhen=false
subText=
text=
textLines=
title=
(Bundle) Bundle[{android.title=Digital Foundry, android.reduced.images=true, client_id=aaab797b-40c1-491e-bbde-d6cbf06cf3bd, android.subText=null, android.template=android.app.Notification$BigPictureStyle, android.showChronometer=false, android.icon=2131232750, android.text=Resident Evil Village PC Port Review: OK, But Not Quite Good Enough, android.progress=0, android.progressMax=0, interaction_screen_bundle_extra=Bundle[mParcelledData.dataSize=184], android.appInfo=ApplicationInfo{3761b8a com.google.android.youtube}, android.picture=android.graphics.Bitmap@c69f5fb, android.contains.customView=true, android.showWhen=true, android.largeIcon=android.graphics.Bitmap@d326618, android.infoText=null, android.progressIndeterminate=false, android.remoteInputHistory=null, android.summaryText=Resident Evil Village PC Port Review: OK, But Not Quite Good Enough, android.support.v4.app.extra.COMPAT_TEMPLATE=android.support.v4.app.NotificationCompat$BigPictureStyle, android.title.big=Digital Foundry, logging_directive=[B@820f871}]
B4X:
Sub SBNSurrogate(SBN As StatusBarNotification) As NOTI
Dim temp As NOTI, Extras As JavaObject = GetExtras(SBN)
temp.Initialize
temp.id = SBN.id
temp.PackageName = SBN.PackageName
temp.TickerText = GetString(SBN.TickerText)
temp.Title = GetString(GetExtra(Extras, "title"))
temp.subText = GetString(GetExtra(Extras, "subText"))
temp.showChronometer = GetBoolean(Extras, "showChronometer")
temp.icon = GetDouble(Extras, "icon")
temp.text = GetString(GetExtra(Extras, "text"))
temp.textLines = GetString(GetExtra(Extras, "textLines"))
temp.progress = GetDouble(Extras, "progress")
temp.progressMax = GetDouble(Extras, "progressMax")
temp.showWhen = GetBoolean(Extras, "showWhen")
temp.infoText = GetString(GetExtra(Extras, "infoText"))
temp.progressIndeterminate = GetBoolean(Extras, "progressIndeterminate")
temp.scoreModified = GetBoolean(Extras, "scoreModified")
If temp.title.Length = 0 Then temp.title = GetString(GetExtra(Extras, "title.big"))
If temp.text.Length = 0 Then temp.text = GetString(GetExtra(Extras, "bigText"))
'temp.largeIcon = GetLargeIcon(Extras)
Log("NOTI: " & temp) ' the above data
Log(Extras) 'the above bundle string
'{android.title=? Someone liked your reply!, android.text="@AverageDamian which is stupid since the door was open!", android.bigText="@AverageDamian which is stupid since the door was open!", android.title.big=? Someone liked your reply!,
Log("-----------------")
Return temp
End Sub
Public Sub GetExtras(SBN As StatusBarNotification) As JavaObject
Dim p As Phone
If p.SDKversion >= 19 And SBN.IsInitialized Then
Dim jno As JavaObject = SBN.Notification
If jno.IsInitialized Then
Dim Extras As JavaObject = jno.GetField("extras")
Extras.RunMethod("size", Null)
Return Extras
End If
End If
End Sub
'Available extras: title, subText, showChronometer(bool), icon(long), text textLines progress(int) progressMax(int) showWhen(bool) largeIcon(bmp) infoText progressIndeterminate(bool) scoreModified(bool)
Public Sub GetExtra(Extras As JavaObject, Name As String) As String
Return Extras.RunMethod("getString", Array As Object("android." & Name))
End Sub
Public Sub GetString(temp As String) As String
If temp = "null" Then Return ""
Return temp
End Sub
Public Sub GetBoolean(Extras As JavaObject, Name As String) As Boolean
Dim temp As String = GetExtra(Extras, Name)
Return temp.ToLowerCase = "true"
End Sub
Public Sub GetDouble(Extras As JavaObject, Name As String) As Long
Return Extras.RunMethod("getInt", Array As Object("android." & Name))
End Sub