mapbox / mapbox/mapbox-navigation-android
Mapbox offline tile cache stored under "data" and not as "cache"
Nessuno ha ancora preso questa issue.
- Lingua principale
- Kotlin
- Stelle
- 651
- Fork
- 321
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Android API:** Android 10
**Mapbox Navigation SDK version:**
```
implementation 'com.mapbox.navigation:ui:1.0.0-rc.7'
implementation 'com.mapbox.navigation:core:1.1.0-alpha.4'
```
### Steps to trigger behavior
1. Embed Mapbox Core and UI SDK into app
2. Use it, launch some navigation stuff, drag the map around, not really sure about the specifics.
3. Open app storage settings (see screenshot)

### Expected behavior
An user can clean up app storage by using the "clear cache" feature and mapbox related cache files should get deleted. The mapbox cache files are stored as cache files and not as data.
### Actual behavior
Mapbox stores tiles data and its sqlite database in the cache files, as the files are not critical and should be deleted first in my opinion. A user that sees an app using 300 MB of storage, without having manually downloaded a map or any big file, will not really like the big size if storage gets low.
The user will then try to delete the cache, but that may only get 5MB of storage back. The 113 MB of mapbox files pertain to the "data" category and can also be deleted, but if the user does so, access tokens, shared prefs, etc will also be deleted which is not desired.
```
$ du -h /Users/carstenh/Downloads/extractedAppData/files/
15M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/0/003
15M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/0
8,8M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/1/049
7,5M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/1/050
16M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/1
18M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/2/000/797
7,2M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/2/000/799
8,5M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/2/000/798
5,7M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/2/000/805
8,5M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/2/000/795
4,5M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/2/000/807
5,1M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/2/000/801
57M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/2/000
57M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles/2
89M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00/tiles
89M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com/2020_02_02-03_00_00
89M /Users/carstenh/Downloads/extractedAppData/files//Offline/api.mapbox.com
89M /Users/carstenh/Downloads/extractedAppData/files//Offline
113M /Users/carstenh/Downloads/extractedAppData/files/
```
(mbgl-offline.db taking 25.7MB is included in there)
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci il layout di archiviazione di Android 10 con le versioni elencate di Mapbox Navigation SDK, concentrandoti sui file delle tile Offline e su mbgl-offline.db. Traccia dove vengono inizializzati questi file e verifica che la cancellazione della cache dell’app li rimuova senza rimuovere i token di accesso o le shared preferences; aggiungi o aggiorna la copertura dei test per questo comportamento.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, kotlin
- Ambito
- mobile
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100