AndroidUtil.createExternalStorageTileCache uses Context.getExternalCacheDir() #913

Closed
easdue opened this Issue Dec 22, 2016 · 2 comments

Projects

None yet

2 participants

@easdue
easdue commented Dec 22, 2016

Context.getExternalCacheDir() will allways return emulated external storage on API23 and up.
Wouldn't it be better to let the application decide the storage location for caching tiles?

If not Context.getExternalCacheDirs() should be used to determine the real external storage location
Index 0 on API23 and up will always be emulated external storage (at least on emulators)
Index > 0 will be real external storage.

@devemux86
Collaborator

Good remark!

Though Context.getExternalCacheDirs() requires API level 19 and we shouldn't load Mapsforge with Android Support dependency.

So best if the API provide as parameter the cache directory, selectable by the user from outside.

@devemux86 devemux86 added this to the 0.8.0 milestone Jan 1, 2017
@devemux86 devemux86 closed this in f9b9569 Jan 1, 2017
@devemux86
Collaborator

I added in AndroidUtil extra methods with the tile cache folder as parameter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment