【问题标题】:GPS - how to set mock-location in Basic4android?GPS - 如何在 Basic4android 中设置模拟位置?
【发布时间】:2011-11-01 11:19:24
【问题描述】:

GPS - 如何在 Basic4android 中设置模拟位置?

我们如何设置 GPS 位置?

为什么?

显示一个航路点 (52.5 , 13.44) (Berlin , Schlesische Str.)

在我的离线 Navigon 和 Sygig 导航程序中 - 没有互联网和谷歌地图

这个应用可以做 FakeLocation:

搜索: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)

如何在我的 Basic4android 中设置模拟位置?

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

我在 GPS 教程中添加 FakeLat As Double 和 FakeLon As Double 但它不显示我的假位置

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

【问题讨论】:

  • 为什么需要 mock 服务来显示特定点?
  • @Erel ____ 所以,我可以使用任何离线汽车导航(如 tomtom、navigon ..)离线显示位置,无需互联网

标签: android mocking gps basic4android


【解决方案1】:

在 Eclipse IDE 中,您可以使用 DDMS 透视图来模拟虚假位置和电话事件。

我建议您将 B4A 应用程序安装到设备或模拟器上,然后启动 Eclipse 和 DDMS 透视图。然后通过单击图标启动您的应用程序,您应该能够模拟位置。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-08-13
  • 2017-07-13
  • 2013-09-29
  • 2018-11-18
  • 2020-07-13
  • 2019-11-03
  • 1970-01-01
相关资源
最近更新 更多