Search code examples
androidgoogle-places-apigoogle-maps-android-api-2google-maps-api-2

OutOfMemoryError from the binder stub implementation


I'm using Android google map v2, Places API

Every time I tried to retrieve info about the specific place using onMarkerClick.

This activity will come out with the info about the place but then Google play services constantly stopping.

Example:

This activity will start after OnMarkerClick


Solution

  • The initial images are probably too large and for your purpose you could use smaller resolution. It's good practice to scale down the image, in your case use getScaledPhoto instead of getPhoto like this:

    photo.getScaledPhoto(mGoogleApiClient,200,200)