문제

can an app be written to get the approximate location of a mobile device using only mobile signal strength from different mobile towers? I mean is this data accessible to developers or restricted to the service provider?

도움이 되었습니까?

해결책

http://developer.android.com/guide/topics/location/strategies.html

Your can obtain either GPS or Network location, or two at a time. The permission to get location from Cell Towers or WI-FI is:

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

Just register a listener and get the updates

LocationManager manager = (LocationManager)
            context.getSystemService(Context.LOCATION_SERVICE);

manager.requestLocationUpdates(
            LocationManager.NETWORK_PROVIDER, 60, 10, listener);
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top