heldenssjoerd
Member
When using the code below in a forground service the sound does gets played.
However when the GPS data does change then the notification sound get played a lot. But it is set to false...
Tested this on a Samsung A8.
Using B4A 10.70 , targetSdkVersion=26
I'm using a sort of the tracker example.
However when the GPS data does change then the notification sound get played a lot. But it is set to false...
Tested this on a Samsung A8.
Using B4A 10.70 , targetSdkVersion=26
B4X:
'this is in the Starter module
Sub CreateNotification2 As Notification
Dim notification As Notification
Globaal.CancelNotification(nid)
notification.Initialize2(notification.IMPORTANCE_LOW)
notification.Vibrate=False
notification.Sound=False 'sound is false but get played?!
notification.Icon = "icon"
notification.SetInfo("mobile","bv", Main)
Return notification
End Sub
I'm using a sort of the tracker example.
B4X:
'in Tracker module
Sub TimeTracker_tick 'to keep the app alive we send every 60 seconds an update of the notification when there hasn't been any GPS changes
If Main.FinishOnResume=False Then
Dim n As Notification = Starter.CreateNotification2
n.Notify(Starter.nid)
End If
End Sub
Sub GPS_LocationChanged (Location1 As Location)
Dim lTime As Long
TimeTracker.Enabled=False 'stop timer
'do stuff with GPS data
'notification
Dim n As Notification = Starter.CreateNotification2
n.Notify(Starter.nid)
TimeTracker.Enabled=True 'start timer
End Sub