Groups
Groups
Sign in
Groups
Groups
日本Androidの会
Conversations
About
Send feedback
Help
指定したフォルダにファイルをダウンロードする方法
207 views
Skip to first unread message
yas_funk
unread,
Feb 23, 2012, 2:57:22 AM
2/23/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Androidの会
いつも色々と教えて頂きありがとうございます。
今日はファイルのダウンロードで教えて頂きたい事があります。
自分が作っているホームページにCSVファイル(またはZIPファイル)のリンクを貼っています。
アプリ側から、そのページにあるファイルをクリックしてダウンロードさせる際、こちらで指定したフォルダにダウンロードさせるプログラムを作ろうと思っ
ています。
Android SDK 2.3からはDownloadManagerがあるので出来そうなのですが、2.1の環境でも実現するにはどういう方法が良い
のでしょうか。
(正確にはダウンロード元のページには次々ファイルが増えるのでURIを指定する事も出来ないのでDownloadManagerでもダメだとは思いま
す。)
参考になるサイトを探しているのですが、もしよろしければお知恵をお借りしたいのです。
よろしくお願いいたします。
crazycircuit7
unread,
Feb 23, 2012, 4:07:18 AM
2/23/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Androidの会
ページを表示してからダウンロードなら
WebViewを表示してクリックイベントでファイルダウンロードとかで出来るかもしれません。
ページ表示の必要がないならHttpClient等で直接ファイルをダウンロードでSDに保存すればよいのではないでしょうか?
非同期にダウンロードするとおもうのでAsyncTaskが便利です。
yas_funk
unread,
Feb 23, 2012, 10:08:22 PM
2/23/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to 日本Androidの会
crazycircuit7様へ
> ページを表示してからダウンロードなら
> WebViewを表示してクリックイベントでファイルダウンロードとかで出来るかもしれません。
考え過ぎて自分の中で難しく考えていた様です。
ページを表示する必要があるのでWebViewのクリックイベントを使う方法を考えてみます。
アドバイスありがとうございました!
Reply all
Reply to author
Forward
0 new messages