Android Tutorial GPS / GNSS tutorial

Status
Not open for further replies.
The GNSS library replaces the old GPS library. The GNSS library is available here: https://www.b4x.com/android/forum/threads/gnss-library-an-updated-gps-library.109110/#content


1741875843450.png


Using it is quite simple:
1. Checking whether location services are available. If not take the user to the settings.
2. Request permission.

If the purpose is to get the user location then the FusedLocationProvider might be a better option: https://www.b4x.com/android/forum/threads/fusedlocationprovider-resolution-dialog.111652/#content
 

Attachments

  • GPSExample.zip
    15 KB · Views: 456
Last edited:

systems1

Member
Licensed User
Longtime User
Help for to get GPS coordinates

Hi Erel,

I tried the code you attached.

When I run the program in my Emulator,

I get a message that "GPS device enabled=true".

But i did't get GPS cordinates as out put.

I see we have two more events

B4X:
Sub GPS_UserEnabled (Enabled As Boolean)
//statements
End Sub 
And 

Sub GPS_LocationChanged (Location1 As Location)
//statements
End Sub

But I understand there is no event executed for GPS_UserEnabled and GPS_LocationChanged.
I printed a message box alert inside there. But I didn't get any alert message from that section.

My GPS Lib version is 1.00 and Core Version is 1.91

Can you help me ; I want to get GPS Latitude and Longitude of current location.

Regards,
:sign0085:
 
Last edited:

zekigultekin

Member
Licensed User
Longtime User
GPS library can not support motorola device

Dear Erel,
I use motorola xoom2 tablet. I test your GPS sample on this. But, I cannot get location information from motorola GPS.

Can you help me for solve my problem.

Best regards,

Zeki
 

GaNdAlF89

Active Member
Licensed User
Longtime User
why I received the date of tomorrow?? O.O
today is 08-03-2012 and I received 08-04-2012!!
the time is correct...
 
Status
Not open for further replies.
Top