Android Tutorial FusedLocationProvider + Resolution Dialog

Erel

Administrator
Staff member
Licensed User
This example shows several things:

1. Configuring FusedLocationProvider based on the instructions: https://www.b4x.com/android/forum/threads/fusedlocationprovider.50614/#content

2. Managing FLP in the starter service. This way it is not affected by the activity's life cycle.

3. Requesting the runtime permission and checking that location services are enabled. If they are not enabled then a system dialog will appear and will let the user enable them:


 

Attachments

Erel

Administrator
Staff member
Licensed User
FusedLocationProvider uses all kinds of location services to get the location including GPS, wifi data and others. It is more powerful and offer more options.
 

Roberto P.

Well-Known Member
Licensed User
FusedLocationProvider uses all kinds of location services to get the location including GPS, wifi data and others. It is more powerful and offer more options.
okay, so do you recommend replacing the GPS management with Fused Location?
 

Erel

Administrator
Staff member
Licensed User
It depends. If you are creating a new solution then use FLP. If you have an existing solution that meets your requirements then you will not gain much from switching.
 

Roberto P.

Well-Known Member
Licensed User
actually I have a management with GPS module that very often - especially in the office - has functioning problems because it cannot intercept the coordinates.
if you tell me that it is a more performing service, I value the replacement.
 

imbault

Well-Known Member
Licensed User
That's pretty fast indeed, but how to stop it from Main Activity in your example, and start it again, in order to have several activities that use it

Thanks

Patrick
 

Erel

Administrator
Staff member
Licensed User
With the exception of the permission and the dialog everything happens in the starter service. It should be quite simple to control and use FLP from any other activity.
 
Top