Making very good headway, finally.... (after 2 days of beating head against wall)
It mostly had to do with this: et="
?!?" This is a parameter of the "LocationF" object (elapsed time since last fix ).
Without a
valid value, a Mock Location will not get published! Discovered when logging a LocationF...
******************************
Example LastLocation -
LocationF
pos: 11 locat: (Location) Location[
flp 57.861847,-152.641979 hAcc=20
et=+1d9h50m11s900ms alt=931.300048828125 vAcc=2 sAcc=2 bAcc=45 mock {Bundle[mParcelledData.dataSize=524]}]
*******************************
Note: et is declared as a long value - yet this is returned as valid (
+1d9h50m11s900ms ) - how is that a Long?
There is no way to set this when mocking locations because the param properties do not provide it - only "mlocation.Time"...
There is a workaround for obtaining "A" legit value.
1) Create a global var - Public
Lloc as LocationF (and init it)
When setting up the Fused Location Object - get a valid return of the current location...
Wait For FusedLocation_LocationRequestCompleted (Result As LocationResult)
If Result.Status=LocationResult.STATUS_SUCCESSFUL Then
If Result.Location.IsInitialized Then
Dim LastLocation As LocationF = Result.Location
Lloc = LastLocation ' IMPORTANT
..... Set it to the object that contains a valid "et". (mLocation = Lloc)
later.... Update the time, lat / lon of mLocation LocationF - and it will get broadcast to the Receiving App. (with other caveats)...
I have a SQL table that I populate the Lat / Lon (of LocationF) for many (selected) roads in Alaska - each Mile Marker location (supplied the AK DOT).
Mocking these points allows me to test many things without having to "drive" the road in real time.
More to come.
When finished, I shall post a functional, documented project of a New (modern) Mock Location Provider tool- using:
Fused_Location_Provider_GMS
Thanks