Hello there,
I am using firebase to send notification. I use the NB6 library to customize notifications.
A few problems arise when android 8,9> from a non-SSL site.
I use the NB6 library for picture notification.
I keep the image on my remote server and I provide the url of the image in the "image" section and download it.
On my Android 6 phone, I can get picture notifications when the application is closed without any problem, but as of Android 8.9, I cannot receive the notification because the application cannot download the picture when it is closed.
Is this because my site doesn't have SSL? Or what else?
By adding this code in the Manifest editor, I was able to extract data from sites without https with android 8,9. But when the application is closed, the picture etc. I can not download.
I am using firebase to send notification. I use the NB6 library to customize notifications.
A few problems arise when android 8,9> from a non-SSL site.
I use the NB6 library for picture notification.
I keep the image on my remote server and I provide the url of the image in the "image" section and download it.
On my Android 6 phone, I can get picture notifications when the application is closed without any problem, but as of Android 8.9, I cannot receive the notification because the application cannot download the picture when it is closed.
Is this because my site doesn't have SSL? Or what else?
By adding this code in the Manifest editor, I was able to extract data from sites without https with android 8,9. But when the application is closed, the picture etc. I can not download.
B4X:
SetApplicationAttribute(android:usesCleartextTraffic, "true")
B4X:
Dim ringtone As String="shotgun.mp3"
Dim rp As RuntimePermissions
Dim folder As String = rp.GetSafeDirDefaultExternal("shared")
Dim FileName As String = ringtone
File.Copy(File.DirAssets, FileName, folder, FileName)
Dim n As NB6
n.Initialize("Channel1", Application.LabelName, "HIGH")
n.SmallIcon(LoadBitmapResize(File.DirAssets, "arac2.png", 32dip, 32dip, True))
n.SetDefaults(False, True, True)
n.CustomSound(CreateFileProviderUri(folder, FileName))
Dim b As Bitmap
Dim j As HttpJob
j.Initialize("", Me)
j.Download(Message.GetData.Get("image"))
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
b = j.GetBitmap
End If
j.Release
n.BigPictureStyle(b.Resize(256dip, 256dip, True), _
b, Message.GetData.Get("title"), Message.GetData.Get("body"))
n.Color(0xFF00AEFF)
n.Build(Message.GetData.Get("title"), Message.GetData.Get("body"), "tag", Me).Notify(7)