heremaps / here-android-sdk-examples

Java-based projects using the HERE SDK for Android.
Apache License 2.0
146 stars 191 forks source link

The application is freezing while external cache storage is used (Android 11+) #471

Open fedyshyn1994 opened 3 years ago

fedyshyn1994 commented 3 years ago

Describe the bug The application is freezing while external cache storage is used (with downloaded offline maps and Android 11+)

Steps To Reproduce

  1. Install SD Card.
  2. Open application and install offline maps (more than 10).
  3. Close the application and open again.
  4. The application freezing. This only happens on Android 11.

Expected behavior The application should not freezing.

Screenshots offline_maps_android_11

Smartphone (please complete the following information):

Additional context I used the following project: https://github.com/heremaps/here-android-sdk-examples/tree/master/map-downloader . In the code, I change the internal storage to external and then download offline maps for 15 USA states - the application freezing. Using fewer offline map packages (1-2) works fine.

NazarKacharaba commented 3 years ago

Hi @fedyshyn1994, Thanks for reporting this issue, we will take a look at it.

Merlin1stHere commented 2 years ago

Unfortunately, it looks like this issue cannot be fixed. Accessing the SD card is much slower than accessing the internal memory. Functions like fstat work at times slower. On my Samsung Note 20 Ultra, it takes 15 seconds to list each map package. This could be a result of the file system used (FAT32), security improvements, changes in Android 11.

romandanylyk commented 2 years ago

This makes it impossible to use on Android 11+, especially on lower end devices while the system UI freezes on several minutes (!) There should be way to fix it, since HERE We Go app offline mode works fine with SD card in on Android 11 and 12.

Merlin1stHere commented 2 years ago

HERE WeGo based on SDK 4.x, and uses a different map format. Different directory structure and fewer files. Perhaps the new map data format requires fewer file accesses. Even so, it took several minutes to cancel the download of the package.