Allow mock locations

schimanski

Well-Known Member
Licensed User
Longtime User
HELLO!

I have found an app on the market-place with the name "My fake location". When you set the android-settings to

"settings/applications/development/allow mock locations",

the gps-data (latitude and longitude) from this app will be shown in every navigation-software instead of the internal gps-chip of the device. Is it possible to use the setting "mock locations" under basic4android? How is it possible, that every gps-application connects with a software and not with the gps-chip?

rgds
 

schimanski

Well-Known Member
Licensed User
Longtime User
Last time I will ask.....

I have searched several days and hours in the internet, but I can't find a solution for my problem. So I hope, that here is someone who knows an answer:

In basic4ppc I have found an option, to send my own nmea-GPS-protocoll to a navigation-software like 'tomtom' or 'google maps' by creating two virtual serial ports and send the data to the GPS-Port of the map-software.

Now I want to do this under android. I need an option to send GPS-data, which comes from a network-server, to a map-software. I know the option to show the latitude and longitude in google-maps by commit them in the url. But that is not, what im looking for. I need an option to show the changing gps-position every second in the map (the target have to drive through the map). I have bought and installed several applications from the android market, which shows GPS-Positions in maps like openstreet etc, but after hours of testing i have to determine, that there is no application, which has an interface for any form of gps-stream, which doesn't comes fom the internal GPS-chip. :BangHead:

All the apps get data directly from the internal gps-chip or over manual input. I promise, that I never ask again something to this theme. When there is no solution, I think I have to try to develope an own openstreetmap-viewer, but this is a lot of work I think and the openstreetmapviewer, which is posted under basic4ppc is currently complicated, for me:sign0148:....

Thanks for all your comprehensions
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
All the apps get data directly from the internal gps-chip
They get it from the system Location Manager as I already told you here http://www.b4x.com/forum/basic4android-updates-questions/6845-send-gps-data-map.html#post39720

Even if you did write your own service to give location data the applications you wish to fool may not see your provider as they may explicitly use the system GPS provider and you can't override that. In general Android doesn't let applications interfere with other applications because of security concerns.
 
Upvote 0

a6000000

Member
Licensed User
Longtime User
I have the same question, so I will post here

GPS - how to set mock-location in Basic4android ?

how can we set the GPS location ?

Why?

to show a waypoint (52.5 , 13.44) (Berlin , Schlesische Str.)

in my OFFLINE Navigon and Sygig Navigation Program -WITHOUT internet and google-maps

this apps can do FakeLocation:

search: www.market.android.com/search?q=FakeGPS&so=1&c=apps

MyFakeLocation (www.market.android.com/search?q=MyFakeLocation&so=1&c=apps)

FakeGPS (www.market.android.com/search?q=FakeGPS&so=1&c=apps)

how to set mock-location in my Basic4android ?

GPS-example-Basic4android: http://www.b4x.com/forum/basic4android-getting-started-tutorials/6592-gps-tutorial.html

I add in GPS tutorial FakeLat As Double and FakeLon As Double but it do not show my Fake Location

Sub Globals
Dim lblLon As Label
Dim lblLat As Label
Dim lblSpeed As Label
Dim lblSatellites As Label
'// qq66yy my
Dim FakeLat As Double
Dim FakeLon As Double
'// qq66yy end
End Sub

Sub GPS_LocationChanged (Location1 As Location)
'// qq66yy my
FakeLat = 52.5
FakeLon = 13.44
Location1.Latitude = FakeLat
Location1.Longitude = FakeLon
'// qq66yy end
lblLat.Text = "f Lat: " & Location1.ConvertToMinutes(Location1.Latitude)
lblLon.Text = "f Lon: " & Location1.ConvertToMinutes(Location1.Longitude)
lblSpeed.Text = "V: " & Location1.Speed
End Sub

android mocking gps basic4android
 
Upvote 0
Top