Android 2.0 -Map not showing up

by Venkat » Sun, 23 May 2010 03:31:41 GMT


Sponsored Links
 Hi All,

I need a help in displaying map in android.
I have pasted my manifst.xml and my java file.

please tell me where i am going wrong.


Manifest.xml
************
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=" http://schemas.android.com/apk/res/android" ;
      package="com.src"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/
app_name">
        <activity android:name=".HelloMapView"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
                <uses-library android:name="com.google.android.maps" />
    </application>
    <uses-sdk android:minSdkVersion="5" />

<uses-permission android:name="android.permission.INTERNET"></uses-
permission>
<uses-permission
android:name="android.permission.ACCESS_FINE_LOCATION"></uses-
permission>
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-
permission>
<uses-permission
android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-
permission>
</manifest>


HelloMapView.java
*****************
package com.src;

import android.os.Bundle;
import com.google.android.maps.MapActivity;

public class HelloMapView extends MapActivity {

        @Override
        public void onCreate(Bundle icicle) {
                super.onCreate(icicle);
                setContentView(R.layout.main);

        }

        @Override
        protected boolean isRouteDisplayed() {
                // TODO Auto-generated method stub
                return false;
        }
}

I was trying to view map through my app for further development, but
the map is not showing...

Any help or guidance would be much appreciated.

Thanks & Regards,
Venkat

--



Android 2.0 -Map not showing up

by Surendra » Sun, 23 May 2010 03:47:50 GMT


 You need a map key in your layout to use.

Follow the instructions at the site and obtain the map api key.

 http://code.google.com/android/add-ons/google-apis/mapkey.html 

And in in your layout xml file in the place you have these lines add
the map api key in the android:apikey place.

<com.google.android.maps.mapview
                                android:id="@+id/mapview"
                                android:visibility="visible"
                                android:clickable="true"
                                android:apiKey="Add your map api key here"
                                android:layout_width="fill_parent"
                                android:layout_height="fill_parent" />

--


Sponsored Links


Other Threads

1. GUI screen builder for android apps

Hi
I am wondering whether there is any plan to build a GUI builder in
Android rodamap. I like XML based layouts, but I find it slow process
when I am building proto type screens. If there is a screen builder
tool like Adobe Flex Builder or enhanced version of current xml layout
tool that comes with Eclipse plugin, it would help everyone a lot.

I checked Droiddraw. It is too basic. I am looking for full fledged
screen builder that lets users build a screen using drag-and-drop
controls on a panel; configure properties of controls etc.

Any pointers?

Thanks
Videoguy
--~--~---------~--~----~------------~-------~--~----~

2. can't kill dhcpcd completely?

i find that init process will periodically check all of the service,
when the init found through PID does not exist,which created by the
init process, init process will then start again

this may cause something wrong:

in the init.rc script
...
service dhcpcd /system/bin/dhcpcd eth0
    disabled

and i modified it like this

service dhcpcd /system/bin/dhcpcd eth0
    disabled
    oneshot

but everytime i open the wifi,the system will fork a new dhcpcd
process,and after i shutdown the wifi,the dhcpcd process is still
alive.
so after i open and close the wifi many times,there are many dhcpcd
process exist

the ps log is here.there are three dhcpcd process:
 677 root         0 DW<  [SDIO Helper]
 679 root         0 DW<  [SDIO Helper]
 681 root       724 S    /system/bin/sh
 682 1000       796 S    /system/bin/servicemanager
 683 root      1824 S    /system/bin/mountd
 685 root       652 S    /system/bin/de{*filter*}d
 686 root      8280 R    /system/bin/rild
 687 root     70372 S    zygote /bin/app_process -Xzygote /system/bin
--zygote
 688 1013     16844 S    /system/bin/mediaserver
 692 root       788 S    /system/bin/installd
 694 root      3328 S    /sbin/adbd
 697 root      1592 S    /sbin/getty ttyMSM2 115200 vt100
 722 1000      165m S    system_server
 771 root       732 S    /system/bin/sh -
 773 1001     97660 S    com.android.phone
 937 1000      104m R    com.android.settings
 997 1014       732 S    /system/bin/dhcpcd eth0
1086 1014       764 R    /system/bin/dhcpcd eth0
2575 root      1860 S    /system/bin/wpa_supplicant -Dwext -ieth0 -c/
data/misc
2622 1014       692 S    /system/bin/dhcpcd eth0
2624 10001    93544 S    android.process.media
2637 root      1596 R    ps


so my question is: where is the proble?and :how to fix this problem?


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

3. ADP1 users, how to really get updates

4. I am getting NullPointer exception for my app when switching from potrait mode to landscape mode and vice versa

5. Graphics question: bilinear interpolation

6. Simulate a KeyEvent

7. Provisioning Android Artifact in Central Maven Repo