Sub Service_Start (StartingIntent As Intent)
ServiceActive = True 'Not important Boolean
GPS1.Start(0, 0)
n.Initialize
n.Icon = "ic_gps_not_fixed_white_48dp"
n.Vibrate = False
n.Light = False
n.Sound = False
n.OnGoingEvent = True
n.SetInfo("GPS", "Stop GPS", stopgps)
Service.StartForeground(5,n)
End Sub
Sub Service_Destroy
GPS1.Stop
ServiceActive = False
Service.StopForeground(5)
End Sub