mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-13 01:17:21 -04:00

* Enhanced the `queryForActualPath()` method to retrieve the actual path for a URI. Users faced a `java.lang.UnsupportedOperationException: Unknown URI` exception when querying the contentResolver with an invalid URI. A check has been added to prevent such errors. * On older devices, the download URI contains the full file path, causing the `documentProviderContentQuery` to fail in retrieving the path, leading to unexpected behavior (failure to open the ZIM file). The code has been improved to handle this scenario. * In certain devices, the content URI prefix may differ, and using only `public_downloads` to obtain the actual path from the URI might not work if the device has a different URI prefix. The code has been enhanced to consider every possible content prefix when retrieving the actual path.