New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
添付メディアのダウンロード先の設定 #120
Comments
今はダウンロード処理をまるっとDownloadManagerに投げてるだけなんですよね…。 オプションで保存先フォルダが指定されてる時だけ自前でダウンロードしてそこに出力するとかしたら出来るだろうけど、動画とかMisskeyとかだと巨大なデータがありうるので、アプリがバックグラウンドになった後の動作制限に対応するため結局DownloadManagerと同等の処理を自前実装しないといけないので、やや高コストだと思います。 |
なるほど。思ったより大変でした…。 |
発想をかえて「ダウンロード自体はDownloadManagerに任せる。完了イベントを受け取ったらファイルを移動する」というのも検討してみましょう。あれ、でもファイルの移動に時間がかかる(onReceive内部に収まらない)ならサービスを書くのは一緒だからダウンロード処理だけ節約しても工数かわんないな…? |
https://developer.android.com/reference/android/app/DownloadManager.Request.html#setDestinationUri(android.net.Uri) |
添付メディアのダウンロード先を、現在
/sdcard/Download
に固定されているものを設定にて変更できるようにできませんでしょうか。The text was updated successfully, but these errors were encountered: