How to display map on emulator(our application)

by parth » Fri, 20 Jun 2008 02:46:06 GMT


Sponsored Links
 Hello friends,
My problem is that i want display map on my mobile application so that
please reply to me yuor ides
ok thaks
--~--~---------~--~----~------------~-------~--~----~



How to display map on emulator(our application)

by oegono » Tue, 24 Jun 2008 15:00:02 GMT


 Hi parth,

its really easy to display a pam on the mobile device.
The only thing you have to do, is to extend the MapActivity from the
SDK.

Int the overridden onCreate(Bundle icicle) method you add a Map View
to the Activity like this:

                // create the mapView
                map = new MapView(this);
                setContentView(map);

Running this simple Activity will show a Map on your screen.
Now you can control the map with a MapController or create Overlays
with your data.

greets
oegono




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. How to determine if Activity is on screen



If you use a BroadcastReceiver registered via registerReceiver(), your
PendingIntent/ProximityAlert stuff should work and you can still tie
back into the activity. However, that has the side-effect of forcing
your service to stay in memory all the time, which may or may not be a
good thing, depending on your app.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Training: http://commonsware.com/training

-- 

2. AccountManager.getAuthToken() problem with more than one app

This whole Auth 2.0 thing is a total mess. Did you test it on Android 2.0.1
devices? It didn't crash for you there? Can you support hosted accounts?

I think I will give up on this until Google documents how to use their
implementation (the Google one, not the Android framework). There is just
already too much time sunk here.

Anyway, regarding your actual issue, did the Auth mechanism ask you twice to
allow access to the selected account? I am not quite sure how it determines
the caller, but maybe it might not be the calling app, but the certificate
it was signed with that makes the difference. Did you use the same
certificate to sign both apps?




> 

3. Debugging in Android Open Source

4. Loading a layout from XML inside of a derived class

5. How to determine if Activity is on screen

6. AccountManager.getAuthToken() problem with more than one app

7. Activity lifecycle problem on Nexus One - onStop not called