0

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.basic4ppc.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
And
  • 73
  • 2
  • 7
  • Why do you need the mock service to show a specific point? – Erel Nov 01 '11 at 12:32
  • @Erel ____ so, I can use any offline car navi ( like tomtom , navigon ..) to show locations offline, without internet – And Jul 22 '17 at 07:01

1 Answers1

0

In the Eclipse IDE you can use the DDMS perspective to simulate fake locations and phone events.

I would recommend that you install your B4A app onto a device or an emulator, then start up Eclipse and the DDMS perspective. Then start your app by clicking on the icon and you should be able to simulate locations.

jb11
  • 557
  • 5
  • 18
  • http://stackoverflow.com/questions/7071625/using-a-mock-location-in-navigation-app – And Jan 09 '12 at 01:08
  • see links and a zip for download MockLocationProvider app http://stackoverflow.com/questions/2531317/android-mock-location-on-device – And Jan 14 '12 at 14:54