MapActivity - "Couldn't get connection factory client&q

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

MapActivity - "Couldn't get connection factory client&q

Postby Syl » Wed Nov 04, 2009 11:28 am

I met an issue to use the Google Maps API.

The MapView always stays grey and I get the following error message in the log : "Couldn't get connection factory client"

I create a project with a single MapActivity and a single MapView (code is provide below).

I use my own Maps API key that I generate from the debug certificate (I replace the "android:api-key" attribute value with it in the MapView element).

I am behing a proxy so I configure it in "Settings > Wireless controls > Mobile networks > Access Point Name" (the web browser can access to the internet).

When launching the activity, I always get the following log in logCat :
Code: Select all
11-04 09:16:43.211: DEBUG/dalvikvm(766): GC freed 8515 objects /
598184 bytes in 91ms
11-04 09:16:46.101: INFO/ActivityManager(585): Starting activity:
Intent { act=android.intent.action.MAIN cat=
[android.intent.category.LAUNCHER] flg=0x10200000
cmp=com.test.maps/.MyMapActivity }
11-04 09:16:46.211: ERROR/ActivityThread(766): Failed to find provider
info for com.google.settings
11-04 09:16:46.222: ERROR/ActivityThread(766): Failed to find provider
info for com.google.settings
11-04 09:16:46.222: WARN/MapActivity(766): Recycling dispatcher
com.google.googlenav.datarequest.DataRequestDispatcher@4376cd20
11-04 09:16:46.231: VERBOSE/MapActivity(766): Recycling map object.
11-04 09:16:46.362: INFO/MapActivity(766): Handling network change
notification:CONNECTED
11-04 09:16:46.362: ERROR/MapActivity(766): Couldn't get connection
factory client
11-04 09:16:46.421: INFO/ActivityManager(585): Displayed activity
com.test.maps/.MyMapActivity: 263 ms (total 263 ms)



Do you know how to solve this problem ? Why do I get a "Couldn't get connection factory client" error ?

Thanks for your help !

Here my Java class, my XML layout file and my AndroidManifest.xml file.
I use Android 1.6 and Eclipse ADT.
I use package com.test.maps for this project




################
# MyMapActivity.java
################

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. package com.test.maps;
  2.  
  3. import android.os.Bundle;
  4.  
  5. import com.google.android.maps.MapActivity;
  6.  
  7. public class MyMapActivity extends MapActivity {
  8.  
  9.         public void onCreate(Bundle savedInstanceState) {
  10.             super.onCreate(savedInstanceState);
  11.             setContentView(R.layout.mapview);
  12.         }
  13.  
  14.         protected boolean isRouteDisplayed() {
  15.                 return false;
  16.         }
  17.  
  18. }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4




################
# res/layout/mapview.xml
################

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <RelativeLayout         xmlns:android="http://schemas.android.com/apk/res/
  4. android"
  5.                                         android:layout_height="fill_parent"
  6.                                         android:layout_width="fill_parent" >
  7.  
  8.         <com.google.android.maps.MapView
  9.                 android:layout_width="fill_parent"
  10.                 android:layout_height="fill_parent"
  11.                 android:clickable="true"
  12.                 android:apiKey="0ultqFjMJjQ0jAhc37T41Iy1fCyvLNsJjV6m0ew" />
  13.  
  14. </RelativeLayout>
Parsed in 0.002 seconds, using GeSHi 1.0.8.4




################
# AndroidManifest.xml
################

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3.      package="com.test.maps"
  4.      android:versionCode="1"
  5.      android:versionName="1.0">
  6.  
  7.     <uses-permission android:name="android.permission.INTERNET" />
  8.     <uses-permission
  9. android:name="android.permission.ACCESS_FINE_LOCATION" />
  10.     <uses-permission
  11. android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
  12.     <uses-permission
  13. android:name="android.permission.ACCESS_MOCK_LOCATION" />
  14.  
  15.     <application android:icon="@drawable/icon" android:label="@string/
  16. app_name">
  17.  
  18.                 <uses-library android:name="com.google.android.maps" />
  19.  
  20.                 <activity android:name=".MyMapActivity"
  21. android:label="MyMapActivity" >
  22.                         <intent-filter>
  23.                                 <action android:name="android.intent.action.MAIN" />
  24.                                 <category android:name="android.intent.category.LAUNCHER" />
  25.                         </intent-filter>
  26.                 </activity>
  27.  
  28.     </application>
  29.     <uses-sdk android:minSdkVersion="4" />
  30.  
  31. </manifest>
  32.  
  33.  
Parsed in 0.004 seconds, using GeSHi 1.0.8.4


Note that the problem still remains when using the sample code available in "<Android SDK dir>/add-ons/google_apis-4/samples/MapsDemo" directory and modifing the "android:api-key" attribute value with my own Maps API key in the MapView element.
Syl
Junior Developer
Junior Developer
 
Posts: 14
Joined: Wed Oct 21, 2009 11:03 am

Top

Postby razor » Mon Nov 23, 2009 11:14 am

Well, I had the same error, but my problem was with mapkey,
I used instruction from http://code.google.com/intl/pl/android/ ... apkey.html
and it works now.
maybe your key is wrong? is Browser working in your emulator ?
razor
Freshman
Freshman
 
Posts: 7
Joined: Mon Nov 23, 2009 11:02 am

Postby Syl » Mon Nov 23, 2009 11:21 am

razor wrote:Well, I had the same error, but my problem was with mapkey,
I used instruction from http://code.google.com/intl/pl/android/ ... apkey.html
and it works now.
maybe your key is wrong? is Browser working in your emulator ?


I have followed the instruction but it does not work...
Syl
Junior Developer
Junior Developer
 
Posts: 14
Joined: Wed Oct 21, 2009 11:03 am

Re: MapActivity - "Couldn't get connection factory client&q

Postby jesperzx » Fri Jun 24, 2011 1:38 am

i met the same problem, but i can display the map, how solve it
jesperzx
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Jun 24, 2011 1:33 am

Re: MapActivity - "Couldn't get connection factory client&q

Postby android_gr » Sat Jul 09, 2011 6:51 pm

same problem here....i checked my debug key (not signing key),the map is displayed properly but i'm always receiving a "source not found" message during debugging and the " MapActivity - Couldn't get connection factory client" error in the log....The class,whose source needs to be attached, is imported and there are no errors found by eclipse in the code....i have already tried to attach the code with the android.jar,but unfortunately nothing helped....any ideas???
User avatar
android_gr
Freshman
Freshman
 
Posts: 4
Joined: Sat Jul 09, 2011 6:42 pm

Re: MapActivity - "Couldn't get connection factory client&q

Postby abhilashpujari » Tue Aug 02, 2011 7:09 am

i got the same error, i solved it by setting GPS option in emulator.
abhilashpujari
Junior Developer
Junior Developer
 
Posts: 10
Joined: Wed Jul 06, 2011 5:42 am

Top

Re: MapActivity - "Couldn't get connection factory client&q

Postby Twano_O » Mon Aug 08, 2011 2:32 pm

abhilashpujari wrote:i got the same error, i solved it by setting GPS option in emulator.


Could you be more specific please? what option did you set?

I have the same problem, even if my map is well displayed, I still get error in logcat
Twano_O
Freshman
Freshman
 
Posts: 3
Joined: Tue Jun 28, 2011 5:52 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 1 guest