I have two suggestions:

1) Google 'android developer "MapActivity : Couldn't get connection
factory client"' and try whichever of the 'fixes' sounds like it is
most likely to be appropriate for your problem. There are lots of
mentions of this problem, they seem to be followed by either no answer
of the answer "try a new key".

2) something you should do anyway, since GPS acquisition can take more
than 5S, causing ANR: start a new Thread and call runOnFirstFix() etc.
from there. As long as you then let the thread run to completion, it
automatically becomes liable to garbage-collection, so you need no
special additional measures to deal with lifecycle issues or thread
synchronization. But if even the thread synchronization of letting the
UI task know when your Runnable is done is too intimidating, you can
either use a Handler with an empty message or use AsyncTask -- which
was custom designed for one off tasks like this.

On May 14, 3:38 pm, funkatron <sunil.samarasin...@gmail.com> wrote:
> Hi there,
>
> I'm trying to get the Map demos working, as provided in the Google API
> sample projects.  I am using AVDs and have tried with versions 8, 10
> and 11 and get the same issue.
>
> I've generated my own debug key and added to the project.  I can see
> the map on app start up, and can zoom in etc - so I am getting the map
> tiles, fine.
> Yes - I have the correct permissions and  library set in the Manifest
> file (as per samples).
>
> But, I cannot set a location on the map, either via DDMS or Telnet.  I
> see the following error in LogCat:
> MapActivity : Couldn't get connection factory client
>
> I've read numerous threads regarding this issue, but they always seem
> to be as a result of a bad API key; which I do not have, as I am
> retrieving map tiles.
>
> So I created my own project to test this further, and am executing the
> following code on initialisation of my map:
>
> myLocationOverlay = new MyLocationOverlay(this, mapView);
>         mapView.getOverlays().add(myLocationOverlay);
>         myLocationOverlay.enableCompass();
>         myLocationOverlay.enableMyLocation();
>         Log.i("funkatron: ", "ABOUT TO CALL RUN ON FIRST FIX");
>         myLocationOverlay.runOnFirstFix(new Runnable() {
>             public void run() {
>                 String loc = "we have a location, executing AnimateTo().
> "+myLocationOverlay.getMyLocation().toString();
>                 Log.i("funkatron:",loc);
>
> mapController.animateTo(myLocationOverlay.getMyLocation());
>             }
>         });
>
> I see my first log statement, but never the second, and "MapActivity :
> Couldn't get connection factory client" is written to LogCat at that
> point.
>
> I have read that there were issues with SDK v8 emulators, so I have
> tried with v10 and 11 - but still no joy.
> I have NOT yet tried this on an actual device - will do soon.
>
> Any help on this issue would be greatly appreciated - it's really
> baffling me  ;)
>
> cheers

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to