SkAndroidCodec :: NewFromStream returned null

I am developing an Android application. I get this on Android Monitor all the time while tileprovider builds wms on a map.

D/skia: --- SkAndroidCodec::NewFromStream returned null D/skia: --- SkAndroidCodec::NewFromStream returned null D/skia: --- SkAndroidCodec::NewFromStream returned null D/skia: --- SkAndroidCodec::NewFromStream returned null 

And here is my code:

 public class TileProviderFactory { // return a geoserver wms tile layer static TileProvider getTileProvider(final String url) { TileProvider tileProvider = new WMSTileProvider(256,256) { Bitmap image; @Override public synchronized URL getTileUrl(int x, int y, int zoom) { double[] bbox = getBoundingBox(x, y, zoom); String s; if (zoom > 15) { s = url + "%26bbox%3D" + String.valueOf(bbox[MINX]) + "%2C"+ String.valueOf(bbox[MINY]) + "%2C"+ String.valueOf(bbox[MAXX]) + "%2C"+ String.valueOf(bbox[MAXY]) ; }else{ s = ""; } URL url = null; try { url = new URL(s); HttpsURLConnection connection = (HttpsURLConnection)url.openConnection(); // Fetch and set cookies in requests CookieManager cookieManager = CookieManager.getInstance(); String cookie = cookieManager.getCookie(connection.getURL().toString()); if (cookie != null) { connection.setRequestProperty("Cookie", cookie); } InputStream inputStream = connection.getInputStream(); image = BitmapFactory.decodeStream(inputStream); inputStream.close(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } return url; } }; return tileProvider; } } 

When I delete the cookie, nothing has changed. I think cookies do not work when wms tiles. What do you recommend? What can I do? Thanks.

+7
java android google-maps tile wms
source share

No one has answered this question yet.

See related questions:

3805
Avoidance! = Null
1187
Do I need a null check before calling instanceof?
935
Cannot start Eclipse - Java was started, but returned exit code = 13
467
IllegalArgumentException or NullPointerException for a null parameter?
217
findViewByID returns null
0
Issue with the release of QuickBlox for Android
0
Getting null from a variable
-one
Json parsing error

All Articles