I use standart notification. It works when the app is foreground. But it doesn't work when the app is background. What should I do?
B4X:
Sub Process_Globals
Dim n As Notification
End Sub
Sub Activity_Create(FirstTime As Boolean)
n.Initialize
End Sub
Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1"
'print the result to the logs
'Log(Job.GetString)
Case "Job2"
'print the result to the log
Log(Job.GetString)
If Job.GetString > 0 Then
n.SetInfo(warningtitle1, AlertMessage, Me)
n.Icon = "icon"
n.Notify(1)
End If
Case "Job3"
'print the result to the logs
'Log(Job.GetString)
End Select
Else
Log("Error: " & Job.ErrorMessage)
End If
Job.Release
End Sub