我正在尝试在我的应用程序中获取位置(mvvmcross / monodroid) 我关注此帖:http://slodge.blogspot.be/2012/04/getting-location-information-in.html 我正在使用Vnext版本。 当我尝试获取位置时,我在输出中有此消息:“位置服务提供程序不可用 - 返回null”。 我有这个代码来初始化App.cs中的位置插件:
protected override void InitialisePlugIns()
{Cirrious.MvvmCross.Plugins.Location.PluginLoader.Instance.EnsureLoaded();}
在我的ViewModel中,我按照示例进行操作。当我在视图上时,我必须获取位置,所以我在ViewModel构造函数中添加了此代码:
_watcher = this.GetService<IMvxGeoLocationWatcher>();
DoStartStop();
我做错了我有这个消息吗?
编辑:我使用三星Galaxy Tab 2.0 7“
答案 0 :(得分:1)
我不确定问题可能是什么,但有些事情要尝试: