Native Maps are black on Android M on first run only

26 views
Skip to first unread message

nickk...@gmail.com

unread,
Oct 25, 2016, 11:57:33 PM10/25/16
to CodenameOne Discussions
On Android M devices the first time you run the app with native Google Maps it is black (with a google logo, with no map content) the next time the app is run then it is Ok.

This happens even if the location permission box is loaded a number of forms before any form that uses the map - it looks like on initialising an app with the Google Maps in it runs something that throws a permission error and the map doesn't get initialised or managed correctly.

I put a dummy getLastKnownLocation on the postShow of the splash screen in order to request location as soon as possible and it shows, then user logs in / registers and then lands on a map page and the map is black, next time the app is run then it functions correctly. This affects Android M devices with the SDK set to 23. Lowering the SDK isn't possible anymore (an update has already gone to Google Play).


Shai Almog

unread,
Oct 26, 2016, 10:41:22 PM10/26/16
to CodenameOne Discussions, nickk...@gmail.com
If you kill the app and re-run it this works right?
So how can I consistently reproduce this issue? Do I need to uninstall and re-install the app?

Nick - LittleMonkey

unread,
Oct 26, 2016, 10:56:32 PM10/26/16
to Shai Almog, CodenameOne Discussions, nickk...@gmail.com

You need to uninstall and re-install the app each time to reproduce this.


On 27/10/16 15:41, Shai Almog wrote:
If you kill the app and re-run it this works right?
So how can I consistently reproduce this issue? Do I need to uninstall and re-install the app?

--
Nick Koirala
LittleMonkey Ltd
PO Box 13057, Johnsonville
Wellington, New Zealand
0800 356 783
+64 (0) 4 974 5574
www.littlemonkey.co.nz

Shai Almog

unread,
Oct 27, 2016, 10:27:30 PM10/27/16
to CodenameOne Discussions, shai....@gmail.com, nickk...@gmail.com, ni...@littlemonkey.co.nz

Steve Hannah

unread,
Oct 28, 2016, 1:38:13 AM10/28/16
to codenameone...@googlegroups.com, Shai Almog, Nick Koirala, Nick @ Littlemonkey
I have fixed the issue with it going black due to keyboard.  I haven't been able to reproduce the other issue (with it being black on first launch), so I don't know for sure if the change will also fix that.

Steve

On Thu, Oct 27, 2016 at 7:27 PM, Shai Almog <shai....@gmail.com> wrote:

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/b595cb5c-49d7-4a51-a197-1cda51e0c268%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One
Reply all
Reply to author
Forward
0 new messages