Problems with start a Map Activity from other Activity

by Carlos Moreira » Wed, 14 Apr 2010 03:03:42 GMT

Sponsored Links
 Hello every one!

It's my first time mailing for a solution, I hope find the solution
for this...

Any way, I am developing an aplication. This one is designed to login
a user, then select how find a place, using simple data or using a
map. When I try to set in the event OnClick for select the "Map
way" (using intent):

startActivity(new Intent(getApplicationContext(),

I have problems and didn't work.

My class and manifest are:

public class MapviewController extends MapActivity {

        public void onCreate(Bundle savedInstanceState) {

            //Definicin del mapa a usar en la vista
            MapView mapView = (MapView) findViewById(;


<application android:label="@string/app_name" android:icon="@drawable/
        <activity android:name=".LoginController"
                <action android:name="android.intent.action.MAIN" />
android:name="android.intent.category.LAUNCHER" />
                <activity android:name=".ElegirARMapsController"

        <activity android:name=".MapviewController"
                <action android:name="android.intent.action.VIEW" />
android:name="android.intent.category.DEFAULT" />


Do you know any way to call the MapActivity from other?

Thx a lot for read this and trying to help me.

PD:Sry for my English!

Carlos J. Moreira Muoz


Other Threads

1. How to fire a dialog from custom list adapter?

I'm in trouble to fire dialog from custom list adapter.
The list item consists of 2 TextView and 1 ImageView. It's similar to
the Android phone's account setting

I remember that the dialogs are only invoked in Activity class, but
BaseAdapter is not inherit from Activity.
I want to fire a dialog when I touch ImageView, so I wrote my code
(from API Demo - Efficient List) below..
I don't know how to fire a dialog...

private static class EfficientAdapter extends BaseAdapter {

                 * Make a view to hold each row.
                 * @see android.widget.ListAdapter#getView(int,
                 *      android.view.ViewGroup)
                public View getView(int position, View convertView, ViewGroup
parent) {
                    // A ViewHolder keeps references to children views to
avoid unneccessary calls
                    // to findViewById() on each row.
                    ViewHolder holder;

                    // When convertView is not null, we can reuse it
directly, there is no need
                    // to reinflate it. We only inflate a new View when the
convertView supplied
                    // by ListView is null.
                    if (convertView == null) {
                        convertView =
mInflater.inflate(R.layout.list_item_icon_text, null);

                        // Creates a ViewHolder and store references to the
two children views
                        // we want to bind data to.
                        holder = new ViewHolder();
                        holder.textGoal = (TextView)
                        holder.textPriority = (TextView)
                        holder.icon = (ImageView)

                        holder.icon.setOnClickListener(new OnClickListener()
                            public void onClick(View v) {
                    } else {
                        // Get the ViewHolder back to get fast access to the
                        // and the ImageView.
                        holder = (ViewHolder) convertView.getTag();

                    // Bind the data efficiently with the holder.

                    return convertView;


2. What happens to PendingIntents created for recieving Alarm Notifications when App is Force Killed?

I have an application that schedules Alarm notifications every x
minutes. The Alarm notification starts an IntentService which acquires
a WakeLock, launches another Service and releases the WakeLock. This
second service does some background processing and self stops.
The notifications and the services work well as designed.

When the application itself is force killed using Advanced Task
Killer, the Alarm notifications are never  received again. What
happens to the PendingIntent that causes the Alarm notifications if
the application that created the PendingIntent is force killed?

How do I recover from a situation where the application has been force

Best Wishes

Not sure if this is a duplicate post, as I received an error message
when I tried to post this message a few seconds back. Please ignore
this if you already received the earlier post.


3. Sub-threads and widget-provider parameters

4. Video Issues in Android Emulator

5. USB Keyboard

6. How to detect if a soft keyboard is shown on the screen

7. how to count the number of sent/received sms/mms?