Package 

Class StorageUtils

    • Method Detail

      • getStorageList

         static List<StorageUtils.StorageInfo> getStorageList()

        Attention! This method only gets storage locations that are context independent. Especiallyit does not return application specific paths like getFilesDir() or getCacheDir(), whichmight lead to problems especially on API29 and up due to scoped storage restrictions, wherethis method will always return an empty list!It's always recommended to use getStorageList instead!

      • getStorageList

         static List<StorageUtils.StorageInfo> getStorageList(Context context)

        Detects all available storage locations, writable or not.

        Attention! If context==null this method only gets storage locations that are contextindependent. Especially it will not return application specific paths like getFilesDir() orgetCacheDir(), which might lead to problems especially on API29 and up due to scoped storagerestrictions, where this is then guaranteed to return an empty list!

      • getStorage

        @Deprecated() static File getStorage()

        Gets the best possible storage location by free space

        Attention! This method only gets storage locations that are context independent. Especiallyit does not return application specific paths like getFilesDir() or getCacheDir(), whichmight lead to problems especially on API29 and up due to scoped storage restrictions, wherethis method will always return null!It's always recommended to use getBestWritableStorage instead!

      • getBestWritableStorage

         static StorageUtils.StorageInfo getBestWritableStorage()

        Gets the best possible storage location by free space

        Attention! This method only gets storage locations that are context independent. Especiallyit does not return application specific paths like getFilesDir() or getCacheDir(), whichmight lead to problems especially on API29 and up due to scoped storage restrictions.For now it is advised to manually determine a proper cache location and set it via setOsmdroidTileCache.

      • getStorage

        @Deprecated() static File getStorage(Context context)

        Gets the best possible storage location by free space

        Attention! If context==null this method only gets storage locations that are contextindependent. Especially it will not return application specific paths like getFilesDir() orgetCacheDir(), which might lead to problems especially on API29 and up due to scoped storagerestrictions, where this is then guaranteed to return null!

      • getBestWritableStorage

         static StorageUtils.StorageInfo getBestWritableStorage(Context context)

        Gets the best possible storage location by free space

        Attention! If context==null this method only gets storage locations that are contextindependent. Especially it will not return application specific paths like getFilesDir() orgetCacheDir(), which might lead to problems especially on API29 and up due to scoped storagerestrictions, where this is then guaranteed to return null!