Angelo Pagone Member Licensed User Dec 16, 2016 #1 Hi, I'm trying the GPS demo. When the display turns off the application no longer detects changes of position. I need the continuous application running in the background. How can I do? Thanks
Hi, I'm trying the GPS demo. When the display turns off the application no longer detects changes of position. I need the continuous application running in the background. How can I do? Thanks
DonManfred Expert Licensed User Longtime User Dec 16, 2016 #2 Angelo Pagone said: How can I do? Click to expand... Start with using the forumsearch. Exact this is answered a lot of times. Use a foreground service (for the gps-code) together with a partial wake lock to prevent android from going into sleep Upvote 0
Angelo Pagone said: How can I do? Click to expand... Start with using the forumsearch. Exact this is answered a lot of times. Use a foreground service (for the gps-code) together with a partial wake lock to prevent android from going into sleep
Angelo Pagone Member Licensed User Dec 16, 2016 #3 I'm sorry but I'm a beginner in mobile development. For me it is hard to find keywords for forum search. Thanks Upvote 0
I'm sorry but I'm a beginner in mobile development. For me it is hard to find keywords for forum search. Thanks
DonManfred Expert Licensed User Longtime User Dec 16, 2016 #4 I see. Ok Angelo Pagone said: For me it is hard to find keywords for forum search. Click to expand... You now have some keywords to search for Upvote 0
I see. Ok Angelo Pagone said: For me it is hard to find keywords for forum search. Click to expand... You now have some keywords to search for
KMatle Expert Licensed User Longtime User Dec 16, 2016 #5 Code: Sub Service_Create sNotif.Initialize sNotif.Icon = "icon" sNotif.Vibrate=False sNotif.SetInfo2("GPS","Service Running","FromNotification",Main) sNotif.Sound = False sNotif.Notify(1) Service.StartForeground(1,sNotif) GPS1.Initialize("GPS") ... Service.StartForeground(1,sNotif) This is how you start the GPS service as a foreground service (a notification is a MUST -> user knows that your app is running) Upvote 0
Code: Sub Service_Create sNotif.Initialize sNotif.Icon = "icon" sNotif.Vibrate=False sNotif.SetInfo2("GPS","Service Running","FromNotification",Main) sNotif.Sound = False sNotif.Notify(1) Service.StartForeground(1,sNotif) GPS1.Initialize("GPS") ... Service.StartForeground(1,sNotif) This is how you start the GPS service as a foreground service (a notification is a MUST -> user knows that your app is running)