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(),
MapviewController.class));

I have problems and didn't work.

My class and manifest are:

public class MapviewController extends MapActivity {

        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.view_map);

            //Definicin del mapa a usar en la vista
            MapView mapView = (MapView) findViewById(R.id.map_view);
            mapView.setBuiltInZoomControls(true);
            mapView.setSatellite(true);


-----

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

            </intent-filter>
        </activity>
        <activity android:name=".MapviewController"
                  android:label="@string/app_name"
                  android:theme="@android:style/Theme.NoTitleBar">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category
android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
    </application>

-------------

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. DOMException while cloning XML Node

Hi,

The cloneNode methon in the following minimal example works on java
1.6 but throws an DOMException with code 14 under android 5.

Code 14 according to sdk dok means:
"NAMESPACE_ERR
If an attempt is made to create or change an object in a way which is
incorrect with regard to namespaces."

Has anybody an idea why this might be?
Thank you in advance!

-------------------------------------------------------------------------------------------

public class M
{
        public static void main(String[] args)
        {
                try
                {
                    DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
                    DocumentBuilder builder = factory.newDocumentBuilder();

                    String text = new String("<blub></blub>");
                    Document document = builder.parse(new InputSource( new
StringReader(text) ));

                    document.getDocumentElement().cloneNode(true);
                }
                catch(DOMException e)
                {}
                catch(ParserConfigurationException e)
                {}
                catch(IOException e)
                {}
                catch(SAXException e)
                {}
        }
}
-------------------------------------------------------------------------------------------

-- 

2. Host is unresolved

Everytime I try to make a HTTP get request I get a 'Host is
unresolved' error, I have searched around posts and found stuff about
using proxys server, but I'm not using one. Any any how I could
resolve this?

Thanks in advance.

Regards,
Lee
--~--~---------~--~----~------------~-------~--~----~

3. video streaming in android

4. Upgrading android 1.1 platform to android 1.5

5. Store image and video from the web into the sdCard

6. Reposition views att runtime

7. Using onRetainNonConfigurationInstance to keep Media player after orientation change