B4A Tutorial GPS tutorial - Erel    Dec 13, 2019   (22 reactions) This example shows how to work with the GPS library.
45297
The GPS object is declared in the Starter service. It is easier to put the GPS in a service and not in an Activity as the services life cycle is simpler.
When the program starts we check whether the location features are enabled:
Sub Act B4A Question Run GPS Tracker Service in Sleep Mode - TILogistic (first post)    Oct 28, 2020 Read:
https://www.b4x.-location-tracking-and-android-10.123355/ B4A Question GPS Recorder Service: Unusual Behaviour - RobertK    Jun 25, 2020 What seems particularly unusual is that when another app that records GPS data (Oruxmaps, www.oruxmaps.com) is running on the same device at the same time, then my GPS recorder does not pause, and performs just as it should.
There is a good deal of information about using GPS on the Forum but I ha B4A Question GPS position in service - KMatle (first post)    Dec 24, 2016   (1 reaction) See the GPS example: https://www.b4x.com/android/forum/threads/gps-tutorial.6592/ and use OkHttpUtils to send the data to your server. B4A Question Reading GPS position in a service - Peter Simpson (first post)    Jan 10, 2018   (3 reactions) Use another service, don't use Starter service to run the whole things.
Use FusedLocationProvider and a new service module, just use Starter to start the new service. B4A Question GPS reading, after a few hours it turns off - how to understand the reason for the shutdown? - sfsameer (first post)    Mar 12, 2021 The GPS has to be in a background service, because :
1- Android will either stop or intercept the apps that use too much memory
2- Android has a feature called battery optimization which will prevent your app to work properly if you use these type of functions in the UI and not in the background ser B4A Question GPS Question - CosmicFlux    Jun 21, 2023 Hello,
I've been reading the GPS tutorials around the forums, but my use case is somewhat different. Erel's excellent example tutorial starts GPS as a Starter service and the GPS position updates in real time. I'm looking to implement a solution that takes a GPS "snapshot" when the user clicks a bu B4A Question How to Enable GPS Location Service - Erel (first post)    Sep 08, 2020 This is not a permission.
Solution: https://www.b4x.-resolution-dialog.111652/#content B4A Question Fixed GPS icon while using service that reads bluetooth in the background - Erel (first post)    Apr 02, 2021   (1 reaction) This will not work as you expect: StartServiceAt("", DateTime.Now + 60 * DateTime.TicksPerSecond, True)
Most devices will not let you start the service such frequently. You should make it a foreground service.
Scanning for Bluetooth devices is considered a location related task so it shows this ico B4A Question GPS recording in background - Erel (first post)    Apr 13, 2015   (1 reaction) Yes. You should use a service. Specifically you need to call Service.StartForeground.
See this tutorial: Creating a sticky service - long running background tasks Page: 1   2   3   4   5   6   7   Powered by ColBERT |