Android Tutorial GPS tutorial

Status
Not open for further replies.

Rusty

Well-Known Member
Licensed User
in the unfiltered logs I discovered:
[VERIFY] PACKAGE_VERIFIED:
PackageVerificationState{
verifier packages=com.android.vending(10034),
intent=Intent { act=android.intent.action.PACKAGE_NEEDS_VERIFICATION dat=file:///storage/emulated/0/Android/data/anywheresoftware.b4a.b4abridge/files/temp1.apk typ=application/vnd.android.package-archive flg=0x10000001 cmp=com.android.vending/com.google.android.vending.verifier.PackageVerificationReceiver VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} (has extras) }
others=95, false, false, false, false, false
}
[VERIFY] packageVerificationCompletion: completed id=95
[VERIFY] setVerifierResponse {verificationID=95, uid=10034, code=1
[VERIFY] broadcastPackageVerified(95, VERIFICATION_ALLOW, file:///storage/emulated/0/Android/data/anywheresoftware.b4a.b4abridge/files/temp1.apk)
copyApk
Killing 6454:com.amazon.mShop.android/u0a84 (adj 15): empty for 1805s
remove MCS_UNBIND and Posting MCS_UNBIND
Make sure sdcard is mounted.
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
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
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
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
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.
Top