OK. It’s my responsibility. Let me summarize how to simulate moving
location.

1. Make kml file using Google Earth as described in "Creating mock
LocationProviders".
http://code.google.com/android/toolbox/apis/lbs.html

Right click on any point and select "directions from here" and do same
way selecting "directions to here". Then, save file selecting menu,
File > Save > Save Place As, with "Save as type:" set to "Kml
*(*.kml)".

2. Run the emulator.
> emulator

3. Pull properties file for gps and reuse later.
> adb pull /data/misc/location/gsp/properties .

4. Make your location directory.
> adb shell

# mkdir /data/misc/location/yours

5. Push kml file and properties file.
> adb push yours.kml /data/misc/location/yours/kml

> adb push properties /data/misc/location/yours/properties

6. Change provider like this.
currentGPSLocationOfPhone =
myLocationManager.getCurrentLocation("yours");

I recommend restarting emulator and eclipse just in case.

Also, please read some pioneering messages searched by word "kml".

Thanks,
 tatsu
 http://www.tatsu.com


On Apr 17, 2:00 pm, Tatsu <[EMAIL PROTECTED]> wrote:
> "Creating mock LocationProviders" can help 
> us.http://code.google.com/android/toolbox/apis/lbs.html
>
> I am catching up now...
>
> On Apr 17, 1:15 pm, Tatsu <[EMAIL PROTECTED]> wrote:
>
>
>
> > Dear,
>
> > I am very sorry. I miss the point.
> > Can anybody tell him/her?
>
> > On Apr 17, 1:06 pm, Tatsu <[EMAIL PROTECTED]> wrote:
>
> > > Hi,
>
> > > Sorry for my lousy prose, but you'll get the points.
>
> > > 1.Please make sure you are adding following permissions to
> > > AndroidManifest.xml.
>
> > >     <uses-permission
> > > android:name="android.permission.ACCESS_LOCATION" />
> > >     <uses-permission android:name="android.permission.ACCESS_GPS" />
>
> > >http://code.google.com/android/migrating/m3-to-m5/m5-api-changes.html...
>
> > > 2."new MapView(this)" just constructs new its object. (And you'll fail
> > > this instruction.)
> > > Don't you add view of MapView class to your layout file? If so, please
> > > replace it to the following statement assuming that you are adding
> > > android:id="@+id/map" to your MapView.
>
> > >     mMapView = (MapView) findViewById(R.id.map);
>
> > > Then, you'll get the map around our Holy Place!
>
> > > Best Regards,
> > >  Tatsu
> > >  http://www.tatsu.com
>
> > > On Apr 16, 10:03 pm, [EMAIL PROTECTED] wrote:
>
> > > > How to update my current location from GPS
> > > > I got the current location from GPS with the following method,
> > > > i want to update the my current location
> > > > any body help me how to do it
>
> > > > // method to get current location from gps
>
> > > > public void gotoCurrentGPSPosition() {
> > > >          bubbleIcon = BitmapFactory.decodeResource(getResources(),
> > > >                 R.drawable.bubble);
> > > >         shadowIcon = BitmapFactory.decodeResource(getResources(),
> > > >                 R.drawable.shadow);
>
> > > >         this.myLocationManager = (LocationManager)
> > > > getSystemService(Context.LOCATION_SERVICE);
> > > >          mMapView = new MapView(this);
> > > >         MapController mc = mMapView.getController();
> > > >         currentGPSLocationOfPhone =
> > > > myLocationManager.getCurrentLocation("gps");
> > > > //         Create a Point that represents our GPS-Location
> > > >          Double lat = this.currentGPSLocationOfPhone.getLatitude() *
> > > > 1E6;
> > > >         Double lng = this.currentGPSLocationOfPhone.getLongitude() *
> > > > 1E6;
> > > > //         My gps location
> > > >         point = new Point(lat.intValue(), lng.intValue());
>
> > > >         MapLocationOverlay mylocation = new MapLocationOverlay();
> > > >         OverlayController overlaycontrol =
> > > > mMapView.createOverlayController();
> > > >         overlaycontrol.add(mylocation, true);
>
> > > > //        mc.setFollowMyLocation(true);
> > > >          mc.animateTo(point);
> > > >         mc.zoomTo(21);
> > > >         mMapView.toggleSatellite();
> > > >         setContentView(mMapView);
> > > >     }- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to