Skip to content

refactor(fetcher): drop the Android DownloadManager fallback - #1487

Merged
msluszniak merged 1 commit into
mainfrom
@ms/drop-android-downloadmanager
Sep 24, 2026
Merged

msluszniak merged 1 commit into
mainfrom
@ms/drop-android-downloadmanager

Conversation

@msluszniak

Copy link
Copy Markdown
Member

Description

react-native-blob-util 0.24.11 fixed the Android in-process reader that stopped after 8 KB (#475), which was the only reason Android had a download backend of its own. Both platforms now share the streaming fallback, leaving one mechanism (the optional background downloader) plus one shared fallback.

  • peer range ^0.24.0 -> >=0.24.11; apps and the lib devDependency move to ^0.25.0
  • removes downloadUrlViaAndroidDownloadManager and the IS_ANDROID backend branch
  • removes reassemble32BitCounter; the 32-bit progress overflow came from DownloadManager's cursor column being read with getInt, and the in-process path reports bytes as real numbers
  • the Android cache directory stays where it is, since moving it would orphan every model already downloaded

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

  1. Run apps/nlp on an Android device without @kesha-antonov/react-native-background-downloader installed.
  2. Download a model larger than 2 GB, e.g. llama_3_2_3b_xnnpack_spinquant.pte.
  3. Progress should climb monotonically to 100% and the cached file should match the server's length.

Screenshots

Related issues

Closes #1401

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

Verified on a Galaxy S26 Ultra: 2,553,367,552 bytes downloaded in 146 s, matching the server's x-linked-size exactly. This is the first time the >2 GB path has run end to end, since it has been broken since it landed.

Without the optional background downloader, Android downloads no longer continue while the app is suspended; they resume on the next download call, as on iOS.

blob-util 0.24.11 fixed the in-process reader that stopped after 8 KB on
Android (RonRadtke/react-native-blob-util#475), which was the only reason
Android had a backend of its own. Both platforms now share the streaming
fallback, so there is one mechanism (the optional background downloader)
plus one shared fallback.

- peer range raised to >=0.24.11; apps and the lib devDep move to 0.25.0
- delete downloadUrlViaAndroidDownloadManager and the IS_ANDROID branch
- delete reassemble32BitCounter: the 32-bit progress overflow came from
  DownloadManager's cursor column being read with getInt, and the
  in-process path reports bytes as real numbers
- keep the Android cache directory where it is; moving it would orphan
  every model already downloaded

Closes #1401
@msluszniak msluszniak self-assigned this Sep 23, 2026
@msluszniak
msluszniak requested a review from barhanc September 23, 2026 15:24
@msluszniak
msluszniak merged commit c3c05bc into main Sep 24, 2026
6 checks passed
@msluszniak
msluszniak deleted the @ms/drop-android-downloadmanager branch September 24, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RNE Rewrite] Drop the Android DownloadManager fallback once blob-util releases the #475 fix

2 participants