0

I'm developing an application that uses Google Maps API v2 and map is working well in devices with Android 4.x (same keystore and same API key and I can see the tiles). I'm having a issue with MapFragment and Android 2.2 device (HTC Wildfire). The map is blank.

This is just the error I get in logcat (two times):

E/copybit ( 4801): Error opening frame buffer errno=13 (Permission denied)
E/copybit ( 4801): Error opening frame buffer errno=13 (Permission denied)

I have this feature in my AndroidManifest.xml.

<!-- Feature required by Google Maps API -->
<uses-feature
    android:glEsVersion="0x00020000"
    android:required="true" />

I'm a little lost. I used this API in this phone previously without problem.

Any help will be appreciated.

Thanks in advance.

sourcerebels
  • 5,140
  • 1
  • 32
  • 52
  • check if your issue is similar to [this earlier post](http://stackoverflow.com/questions/7105247/errno-13-and-how-to-debug-this-more-efficiently) – tony m Jul 04 '13 at 13:35

2 Answers2

3

Seems that it's a problem with Google Maps v2 on Android 2.2 devices, at least some of them. Mine is HTC Wildfire Android 2.2.1. I'm getting the same error message "Error opening frame buffer errno=13". I checked all the suggestions related to API key check, etc from other posts, and it doesn't help. From the fact that the same app does work OK on a Android 4.2 device (CyanogenMod 10.1), I conclude that the key is OK.

See this post Blank screen instead map api v2 android, comment @whisperofblood have you found the cause? I think I'm dealing with the same issue. App works fine in 2.3, but not 2.2 (have tried on only one 2.2 device) - other people think the same.

Also I found this info: SupportMapFragment not showing map in android where an answer says that using API v1 key helps. Unfortunately I can't test it since v1 keys can't be created anymore.

So my guess is that something is broken with GM v2 on Android 2.2 devices. Unless somebody reports that his GM v2 app works OK on Android 2.2 (and please report if you see "Error opening frame buffer errno=13" message in logcat, and what device do you have). Anybody? My reputation is 1, I can't post comments etc only answers.

Community
  • 1
  • 1
Mixaz
  • 4,068
  • 1
  • 29
  • 55
  • If it's true, then it may be a reason to use other map component instead, not GM, to support old devices – Mixaz Sep 01 '13 at 18:42
2

Has the 2.2 device got google play installed on it? Or is still the old Market place app?

If it is the market place app then the MapFragment won't work as it is part of the Google Play Services sdk.

Alternatively...

You should check that your project has the android-support-v4 and google-play-services jars added to the classpath and that the api level you have is a and Android . Google Api not just Android ..

Once the correct libraries are added you could try using the SupportMapFragment from the google android support library. The import is import com.google.android.gms.maps.SupportMapFragment;

As a good practice, you should have a check when your app starts up to see if Google Play is installed on the device. You can either provide a not supported message or link the user to a download Google Play...

Something like this: Check if correct Google Play Service available for Google Maps Android API v2

speedynomads
  • 2,632
  • 1
  • 26
  • 24
  • It has Google Play installed and official maps application is working fine on it. Thanks for your advices. I will double-check this later. – sourcerebels Jul 31 '13 at 06:33
  • Another thing, once you have added the google-support-library to your project (which provides backwards compatibility for fragments, among other things), make sure your activity extends FragmentAcitivity and that you are using the SupportMapFragment as I mentioned before. Keep us posted. – speedynomads Jul 31 '13 at 09:49