Network provider has a precision of 500-10000 meters(~1500-30000 feet) WiFi has 70-150 meters(~ 210-450 feet) Not an option for high precision.
On 14 фев, 15:40, Deeps Uttekar <deeps.utte...@gmail.com> wrote: > Hi you can use network provider for it > plse see following code > if gps not working then you can use network provider > Sorry for code indentation > > LocationManager myManager = > (LocationManager)getSystemService(Context.LOCATION_SERVICE); > Location > gpsLoc=myManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); > Location > nwloc=myManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);; > Double latPoint=0D; > Double longPoint=0D; > String currentPhoneLocation=null; > > if(gpsLoc==null){ > Log.i("Mobsec","gps null"); > currentPhoneLocation="no location"; > }else{ > > latPoint > =myManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude(); > longPoint > =myManager.getLastKnownLocation(LocationManager.GPS_PROVIDER).getLatitude(); > currentPhoneLocation = "Current phone location: Latitude: > "+latPoint+" Longitude: "+longPoint; > > } > > if(nwloc==null){ > Log.i("Mobsec","nwloc null"); > currentPhoneLocation="no location"; > }else{ > latPoint > =myManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER).getLatitude(); > longPoint > =myManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER).getLatitude(); > currentPhoneLocation = "Current phone location: Latitude: > "+latPoint+" Longitude: "+longPoint; > > } > > -Deeps > > On Mon, Feb 14, 2011 at 6:07 PM, JAlexoid (Aleksandr Panzin) < > > jalex...@gmail.com> wrote: > > In theory it is possible using accelerometer. But that will trash the > > battery and will not be reliable. In addition to being heavy on > > computation. > > > On 4 фев, 15:55, dica <steven.mu...@gmail.com> wrote: > > > Hi > > > > Is it possible to track movement without GPS? The GPS signal is too > > > weak on my phone to work indoors. I want to be able to track where > > > I've been within a building. Possible? > > > > Tks > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en