Nov 14, 2010 Replies: 311 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 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 GPSExample.zip 15 KB · Views: 1,229 Last edited: Mar 13, 2025 Click to expand...
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 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
Erel B4X founder Staff member Licensed User Longtime User Apr 30, 2012 #61 All GPS programs use the same API to access the GPS. These programs probably use other methods to find the location when the GPS is not available. See ABWifi library: Libraries - Basic4android Wiki
All GPS programs use the same API to access the GPS. These programs probably use other methods to find the location when the GPS is not available. See ABWifi library: Libraries - Basic4android Wiki
M madasu New Member May 22, 2012 #62 I just cannot download the code. Do I need to pay to get the permission of downloading the code?
Erel B4X founder Staff member Licensed User Longtime User May 22, 2012 #63 The trial version doesn't support libraries. This attachment is only available to users who bought Basic4android.
The trial version doesn't support libraries. This attachment is only available to users who bought Basic4android.
systems1 Member Licensed User Longtime User Jun 8, 2012 #64 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 Code: 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: Jun 8, 2012
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 Code: 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:
Erel B4X founder Staff member Licensed User Longtime User Jun 10, 2012 #65 You should test it on a real device.
R RafaelAramuni New Member Licensed User Longtime User Jul 9, 2012 #67 Question as GPS hi ! where can i find a program with gps ? thank u :sign0085:
Erel B4X founder Staff member Licensed User Longtime User Jul 10, 2012 #68 For some reason you appear as an unlicensed user in the forum. Please contact [email protected] in order to fix it.
For some reason you appear as an unlicensed user in the forum. Please contact [email protected] in order to fix it.
zekigultekin Member Licensed User Longtime User Jul 18, 2012 #69 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
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
Erel B4X founder Staff member Licensed User Longtime User Jul 18, 2012 #70 Does your GPS find any satellite?
zekigultekin Member Licensed User Longtime User Jul 23, 2012 #71 Erel said: Does your GPS find any satellite? Click to expand... Yes, I can see my location on google maps.
Erel said: Does your GPS find any satellite? Click to expand... Yes, I can see my location on google maps.
zekigultekin Member Licensed User Longtime User Jul 23, 2012 #72 Yes, I can see my location on google maps.
zekigultekin Member Licensed User Longtime User Jul 23, 2012 #73 Erel said: Does your GPS find any satellite? Click to expand... Yes, I can see my location on google maps.
Erel said: Does your GPS find any satellite? Click to expand... Yes, I can see my location on google maps.
Erel B4X founder Staff member Licensed User Longtime User Jul 23, 2012 #74 It doesn't mean that your GPS find any satellite. The location can be based on other sources (not related to the GPS).
It doesn't mean that your GPS find any satellite. The location can be based on other sources (not related to the GPS).
G GaNdAlF89 Active Member Licensed User Longtime User Jul 31, 2012 #75 How I can get timestamp from gps?
Erel B4X founder Staff member Licensed User Longtime User Aug 1, 2012 #76 You can get the fix time by calling Location.Time. This should be done in the LocationChanged event.
G GaNdAlF89 Active Member Licensed User Longtime User Aug 1, 2012 #77 I received 13 digits timestamp from gps. How I can convert this to datetime?
klaus Expert Licensed User Longtime User Aug 1, 2012 #78 The time you get from the GPS library are TICKS and you need to convert it to your needs with the DateTime object. Best regards.
The time you get from the GPS library are TICKS and you need to convert it to your needs with the DateTime object. Best regards.
G GaNdAlF89 Active Member Licensed User Longtime User Aug 1, 2012 #79 klaus said: The time you get from the GPS library are TICKS and you need to convert it to your needs with the DateTime object. Best regards. Click to expand... It works!! Thanks to Erel and klaus
klaus said: The time you get from the GPS library are TICKS and you need to convert it to your needs with the DateTime object. Best regards. Click to expand... It works!! Thanks to Erel and klaus
G GaNdAlF89 Active Member Licensed User Longtime User Aug 3, 2012 #80 why I received the date of tomorrow?? O.O today is 08-03-2012 and I received 08-04-2012!! the time is correct...
why I received the date of tomorrow?? O.O today is 08-03-2012 and I received 08-04-2012!! the time is correct...