Android Tutorial GPS tutorial

Status
Not open for further replies.

Rusty

Well-Known Member
Licensed User
Longtime User
in the unfiltered logs I discovered:

The app was set to #CanInstallToExternalStorage: True and my phone does not have an SD card installed.
I changed it to #CanInstallToExternalStorage: False and it now installs.
Thanks Erel, I should have looked at the un-filtered logs before.
Regards,
Rusty
 

Peekay

Active Member
Licensed User
Longtime User
Erel,
In the above code you refer to a routine rp in module Starter, but I do not find that in your example code.
 

kris A

Member
Licensed User
Longtime User
How accurate location GPS it show me on map 30m from where I was
is it possible to take this down to 2m - 10m?

My device : Xiaomi Redmi Note 2
Android version : 5

Thanks
 

Husain Ragib

Member
Licensed User
Erel, I am abeginner in b4a.
I downloaded the GPS example and tried to see the output via. B4A bridge connected with my android phone.
But I could get any information against the labels.
GPS is enabled in my phone. Can you please help me
 

svein berg

Member
Licensed User
Longtime User
Hi.
I'm new to B4A, but so far I like it.
Have a problem with the GPS.

I would like the "GPS1_LocationChanged (Location1 As Location)" to fire every 2 seconds or if Location have changed more than one meter.
So I put;
gps1.Start(2000,1 )

But then the "changed event" keep firing like mad without the location changing at all. (Phone is still on my table)

In the "Activity_Create" - FirstTime I have;
If gps1.IsInitialized Then gps1.Stop
as I dont want it to fire before I have initiated a logon procedure, but its firing..

I'm using B4A v 6.0 and have a Samsung with Android 6.0

Any help??
 

svein berg

Member
Licensed User
Longtime User
Thanks Erel..
GPS Error is not part of this as I display the Lat,Lon in each LocationChanged, and the error is much less than 1 meter.

Isnt it possible to stop the Activity from listening to the GPS?
 

gregmatthews

Member
Licensed User
All the examples get a lat, lon pair in the locationchanged event. Does this mean the event needs to fire at least once to get a location ? What happens if you start the app and are perfectly still? Can you still get a location?

Thanks
 

gregmatthews

Member
Licensed User
Hi Erel,
Thanks - my issue must be somewhere else then!
To clarify:
The locationChanged event will fire either after a certain number of milliseconds OR after a change in position, the thresholds for each set via the GPS.Start(x,y) function. So if that is GPS.Start(0,0) then it will rapid fire. If GPS.Start(5000,50) if will fire every 5s or if the position changes by 50m, but not more frequently than that?

Greg
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…