My app is a Tour Guide that uses the following;
SQLite DB in File.DirInternal and initialised in Starter and works fine
GPS that is initialised in Starter and works fine
OSMdroid Offline Map in File.DirRootExternal /osmdroid which on a virgin install fails because the PERMISSION_WRITE_EXTERNAL_STORAGE are not set
Main Activity_Create does the following;
Offline map file is checked to exist and then copied from File.DirAssets as it seems it can only work in that directory
PROBLEM IS IF I CHECK FOR PERMISSION_WRITE_EXTERNAL_STORAGE THE SUB PAUSES AND NEVER FINISHES EXECUTING, BUT GOES DIRECTLY TO Activity_Resume
I then load up all the MapView stuff
ON A VIRGIN INSTALL THE PERMISSION_WRITE_EXTERNAL_STORAGE ARE NOT YET SET SO THE MAP IS NOT FOUND AND THE MAPVIEW DOESNT SHOW ANYTHING
I then set a splash image as visible on top of the map view, which goes away on click
If I exit the app and Force Stop in the Apps list in Setup, then restart the app, everything works fine from that point on.
So, the frustration is how can I delay the loading of the mapview until the permissions are requested and enabled? The new user experience is hopeless and I have had to cancel some more extensive beta testing until I get this sorted.
Thanks,
Kev
SQLite DB in File.DirInternal and initialised in Starter and works fine
GPS that is initialised in Starter and works fine
OSMdroid Offline Map in File.DirRootExternal /osmdroid which on a virgin install fails because the PERMISSION_WRITE_EXTERNAL_STORAGE are not set
Main Activity_Create does the following;
Offline map file is checked to exist and then copied from File.DirAssets as it seems it can only work in that directory
PROBLEM IS IF I CHECK FOR PERMISSION_WRITE_EXTERNAL_STORAGE THE SUB PAUSES AND NEVER FINISHES EXECUTING, BUT GOES DIRECTLY TO Activity_Resume
I then load up all the MapView stuff
ON A VIRGIN INSTALL THE PERMISSION_WRITE_EXTERNAL_STORAGE ARE NOT YET SET SO THE MAP IS NOT FOUND AND THE MAPVIEW DOESNT SHOW ANYTHING
I then set a splash image as visible on top of the map view, which goes away on click
If I exit the app and Force Stop in the Apps list in Setup, then restart the app, everything works fine from that point on.
So, the frustration is how can I delay the loading of the mapview until the permissions are requested and enabled? The new user experience is hopeless and I have had to cancel some more extensive beta testing until I get this sorted.
Thanks,
Kev