Repository: googlemaps/android-maps-utils

Issue #570: KmlDemoActivity remote URL is broken
Created: 2019-10-30T21:25:29Z
While looking at #558, I found that the URL used to demonstrate loading a remote KML file as a layer is broken (returns an HTTP 404).
Resource is kml_url in strings.xml, and here's the broken URL:
https://googlemaps.github.io/kml-samples/morekml/Polygons/Polygons.Google_Campus.kml
@jpoehnelt Do you know where this might have moved?
I think it may be the same file as the bundled campus.kml in the demo app raw directory, IIRC, if we can't find the original remote file.
Environment details
The current master branch at 80d9497 (0.6.2)
Steps to reproduce

Run the demo app
Tap on "KML LAYER OVERLAY" button at the bottom

What I expect to see
Polygons should load from the remote KML file and be shown on the map
What I actually see
No polygons load on the map - I just seem a blank, zoomed out world map (see screenshot below)

Stacktrace
2019-10-30 17:20:22.793 31875-32562/com.google.maps.android.utils.demo W/System.err: java.io.FileNotFoundException: https://googlemaps.github.io/kml-samples/morekml/Polygons/Polygons.Google_Campus.kml
2019-10-30 17:20:22.796 31875-32562/com.google.maps.android.utils.demo W/System.err:     at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:251)
2019-10-30 17:20:22.796 31875-32562/com.google.maps.android.utils.demo W/System.err:     at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
2019-10-30 17:20:22.796 31875-32562/com.google.maps.android.utils.demo W/System.err:     at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:26)
2019-10-30 17:20:22.796 31875-32562/com.google.maps.android.utils.demo W/System.err:     at java.net.URL.openStream(URL.java:1073)
2019-10-30 17:20:22.796 31875-32562/com.google.maps.android.utils.demo W/System.err:     at com.google.maps.android.utils.demo.KmlDemoActivity$DownloadKmlFile.doInBackground(KmlDemoActivity.java:91)
2019-10-30 17:20:22.797 31875-32562/com.google.maps.android.utils.demo W/System.err:     at com.google.maps.android.utils.demo.KmlDemoActivity$DownloadKmlFile.doInBackground(KmlDemoActivity.java:82)
2019-10-30 17:20:22.797 31875-32562/com.google.maps.android.utils.demo W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:333)
2019-10-30 17:20:22.797 31875-32562/com.google.maps.android.utils.demo W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2019-10-30 17:20:22.797 31875-32562/com.google.maps.android.utils.demo W/System.err:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
2019-10-30 17:20:22.797 31875-32562/com.google.maps.android.utils.demo W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2019-10-30 17:20:22.797 31875-32562/com.google.maps.android.utils.demo W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2019-10-30 17:20:22.797 31875-32562/com.google.maps.android.utils.demo W/System.err:     at java.lang.Thread.run(Thread.java:764)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err: java.lang.NullPointerException: Attempt to get length of null array
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:106)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at com.google.maps.android.utils.demo.KmlDemoActivity$DownloadKmlFile.onPostExecute(KmlDemoActivity.java:108)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at com.google.maps.android.utils.demo.KmlDemoActivity$DownloadKmlFile.onPostExecute(KmlDemoActivity.java:82)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at android.os.AsyncTask.finish(AsyncTask.java:695)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at android.os.AsyncTask.access$600(AsyncTask.java:180)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at android.os.Looper.loop(Looper.java:214)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:7050)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
2019-10-30 17:20:22.801 31875-31875/com.google.maps.android.utils.demo W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

Duplicate issue #579: KMLDemoActivity not working
Created: 2019-11-08T06:27:32Z
I was trying to check how to use a KML layer over a google map from android studio. I cloned this application to my desktop to check if the kml layer was able to plot but i couldnt see any kml layer in the map activity.
So please do kindly respond with a solution at the earliest.
Thank you in advance

Closing comment (2019-11-08T14:52:14Z): Thanks @ark200, this is a duplicate of #570, so I'm going to close it. I just opened a fix at #581.