Hi is developing an app that will set coordinates (latitude and longitude). And this is to show my place because I am in that coordinate .. this is similar to the place's spoofer. But I have failed to do this. This is my code..Please anyone please help me.
Public class increases the mock map extension {Private Location Manager LM; Private station locator location station; See a private map map map; String mocLocationProvider; Private map controller MC; /** Called when the activity is first created. * / @ Override Crate on Public Zero (Bundle Saved Instantstate) {Super. Contents (Saved Instantstate); SetContentView (R.layout.main); // --- Use Location Manager Class to get GPS locations --- LM = (Location Manager) getSystemService (context.LOCATION_SERVICE); LocationListener = New MyLocationListener (); MocLocationProvider = LocationManager.GPS_PROVIDER; Lm.addTestProvider (mocLocationProvider, False, False, False, False, Truth, Truth, Truth, 0, 5); Lm.setTestProviderEnabled (mocLocationProvider, true); Lm.requestLocationUpdates (mocLocationProvider, 0,0, locationListener); MapView = (MapView) Find ViewById (R.id.mapview1); Mc = mapView.getController (); } @ Override Protected Boolean Herald Display () {// TODO Auto-Generated Method Stub Return False; } Private Class MyLocationListener Apply LocationListener {@Override changed the location on Public Zero (Locale Local) {loc = New Location (mocLocationProvider); Double latitude = 1.352566007; Double longitude = 103.78921587; // double height = double.valouf (part [2]); Loc.setLatitude (latitude); Loc.setLongitude (longitude); Loc.setTime (System.currentTimeMillis ()); Lm.setTestProvider location (mocLocationProvider, loc); Mc.setZoom (16); MapView.invalidate (); } Activate Public Zero (String Provider) {// TODO Automatically Generated Method Stub} @ StatusChanged (String Provider, on the @Provider) Passive Zero (String Provider) {@ TODO Auto-Generated Method Stub} @ Override Publisher, Override public null at the status of int, bundle extras) {// Tudo auto-generated method stub}}}
I will not try this method:
Comments
Post a Comment