TachibanaGeneralLaboratories / download-navi

Free and Open Source software download manager
GNU General Public License v3.0
797 stars 83 forks source link

Download programmatically from other apps #268

Open opk12 opened 1 year ago

opk12 commented 1 year ago

I'd like to download a file from an external script, without adding the app to the Recents list and without requiring interaction to close the app manually. For example, the script launches an intent with the source URL and destination directory, which the app can catch.

This gives automation apps ability to write to the SD card; allows to batch-download from an external controller (I have a script to sync apps and files with my home server); works around the Android limitation that shell scripts and POSIX executables cannot write to the SD card.

Davilarek commented 1 year ago

Isn't this already available?

opk12 commented 1 year ago

@Davilarek How exactly?

Davilarek commented 1 year ago

Share -> find download navi NOT BROWSER -> done?

opk12 commented 1 year ago

It's the manual version, the original post describes incompatible use cases.

For posterity, this command opens the Add Download activity, like the share target, am start --user 0 -a android.intent.action.VIEW -d https://example.org com.tachibana.downloader/.ui.adddownload.AddDownloadActivity so it's not programmatic and relies on an undocumented activity name (so may break in a future release).

Davilarek commented 1 year ago

There are no commits since almost exactly one year. I'm currently maintaining a fork, and personally I'm not going to rename anything soon. Also, "programmatically" you mean like, API that would allow other apps to start this download activity?

Th3-A6add0n commented 5 months ago

There are no commits since almost exactly one year. I'm currently maintaining a fork, and personally I'm not going to rename anything soon. Also, "programmatically" you mean like, API that would allow other apps to start this download activity?

Exactly, that'd help A LOT