views:

307

answers:

2

Hi folks,

I am using 2 map Activities. do i want to register multiple Map APi key for each? Now I am getting this exception:

06-16 18:49:41.498: INFO/MapActivity(11067): Handling network change notification:CONNECTED
06-16 18:49:41.498: ERROR/MapActivity(11067): Couldn't get connection factory client

I googled about this exception. It concludes that must be a API Key Problem? Is that true? Why it happens?

Thanks

This is my code for mapview tag:

<com.google.android.maps.MapView
    xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mapview_id"
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:clickable="true" android:apiKey="my_api_key" />

i got this exception while creating the object for the mapview iteself. That is:

MapView mv=(MapView)findViewById(R.id.mapview_id);

Can you Guess? Why?

+1  A: 

You can use one single key for several map activities...

Without a snippet of code I/we can't find any source of error.

poeschlorn
and no, it seems not to be a api key problem in general...there are many reasons that can lead to this
poeschlorn
then check my previous post and comment.http://stackoverflow.com/questions/3046396/how-to-use-intent-between-tabs-in-java-android
Praveen Chandrasekaran
+1  A: 

I would guess that you are using the API Key for the wrong certificate.

If you are using Eclipse and just click on run on emulator Eclipse will sign your program with a debug certificate and run it. For publishing to the market you need to create your own certificate. The API Key you got from google can be used in every application that uses the certificate that you used for obtaining the key.

That means if you want to see the map in the debug environment you have to get a key with the debug certificate and before publishing the app to the market you need to change the API Key to the one obtained with your signing certificate.

Further help would need a more detailed explanation on what exactly is not working.

Janusz
I registered my own API key. My Map View can show but when i add a overlay on the map. I got this Exception. As you know i used the shared preference to pass the data between the activities. that value can edit the preference while i am click the text view. but map view cant drop the pin on it.
Praveen Chandrasekaran
I think this output is not the source of your problem with the pin not showing, maybe ask another question and specify the problem that you have with the listview and add the code of you overlay adapter and your map activity to the question
Janusz