开发者

finding users latitudes and longitudes inside closed location

I have been working on an android app to find the location of the user device even he is in the closed location.

I am trying to use the following code:

LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Criteria criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_FINE);
criteria.setAltitudeRequired(false);
criteria.setBearingRequired(false);
criteria.setCostAllowed(true);
criteria.setPowerRequirement(Criteria.POWER_LOW);
String p开发者_C百科rovider = lm.getBestProvider(criteria, true);
Location location = lm.getLastKnownLocation(provider);

by using this code i was able to get the locations when i go to the open sky but not in the room.

please let me know how if any thing is unclear.

Thanks in advance.


You cannot get standard GPS while you are inside. If you own/control a particular building then you could set up some sort of transmitters inside of the building that would help you triangulate their position. Otherwise, you are out of luck.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜