diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-05-12 22:43:45 -1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-12 22:43:45 -1000 |
| commit | bf4658ea210ad941772cd2d9626b66588dde35dc (patch) | |
| tree | 6a7e11efd515137ea994fafcbe9b0a2007b11c25 /android-app/app/src/main/AndroidManifest.xml | |
| parent | 7c82f77cbbc1d5c2664e7a01db30317c42d00525 (diff) | |
fix(track): load past tracks via persisted URIs, no MediaStore query needed (#4)
MediaStore.Files.getContentUri("external") queries require READ_EXTERNAL_STORAGE
on Android ≤ 12 and have no clean permission path on Android 13+ for non-media
files. openInputStream() on a content URI the app owns works on all versions
without any permission — so the fix is to persist each URI at save time.
On save: call persistUri(uri) after the IS_PENDING=0 update, storing the
content URI in SharedPreferences (nav_track_uris).
On load: iterate stored URIs first and open each with openInputStream() — no
MediaStore query, no permissions needed. The existing MediaStore query is kept
as a fallback for tracks saved before this change; any track found there is
auto-migrated into SharedPreferences so future launches skip the query too.
Invalid URIs (file deleted) are cleaned up from SharedPreferences automatically.
https://claude.ai/code/session_01DNjbYxiC1cco83dArNGW3G
Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to 'android-app/app/src/main/AndroidManifest.xml')
0 files changed, 0 insertions, 0 deletions
