[android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-24 Thread Lewisou
I think it is a webview issue. I agree with you, Kris. Lewis On Aug 19, 2:13 am, Kristopher Micinski krismicin...@gmail.com wrote: On Thu, Aug 18, 2011 at 9:53 AM, Raziel23x raziel...@gmail.com wrote: I do not want to hide it i want it to download inside the application itself not have it

[android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-22 Thread Raziel23x
The files on on a webpage that I want the applcation to handle not it launching the web browser -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this

Re: [android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-22 Thread Nick Risaro
On Mon, Aug 22, 2011 at 4:48 PM, Raziel23x raziel...@gmail.com wrote: The files on on a webpage that I want the applcation to handle not it launching the web browser The files are on a FTP server or on a HTTP server? If the server is an FTP server you can connect to the server, list the

Re: [android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-22 Thread Miguel Morales
You have to return false on shouldOverrideUrlLoading. That will prevent the browser from initiating the download. You have to move the code from onLoadResource there, and return false if you detect the video link. The onDownloadStart() is irrelevant if you are going to be handling the downloading

Re: [android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-22 Thread Miguel Morales
Actually, it's the other way. You should return true on shouldOverride, but only when you've detected that your video link was clicked. At the moment, you are returning true, but loading the url to the webview yourself which defeats the purpose. On Mon, Aug 22, 2011 at 1:21 PM, Miguel Morales

Re: [android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-22 Thread Miguel Morales
Also, there are many other mistakes in your code. Don't download the file in the UI thread, see: http://developer.android.com/resources/articles/painless-threading.html Also, don't hardcode paths: http://developer.android.com/guide/topics/data/data-storage.html On Mon, Aug 22, 2011 at 1:26 PM,

[android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-19 Thread Raziel23x
Okay I replaced it with the application/x-rar-compressed and error removed but when I test the code out in browser it still launches the web browser Here is the basic code minus other actives but this is the webview content minus the menu's public class PS3AndroidManagementSystemProActivity

Re: [android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-19 Thread Kristopher Micinski
Do you know what your code is supposed to do there? The ACTION_VEW intent is *supposed* to open the browser in this case. the onDownloadStart handler gives you a url, mime type, everything you need, and you already have code to do the downloading, why not use it? Change: public

[android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-19 Thread Raziel23x
I will try that but I have multiple rar files that are hosted on a private ftp server that I want to be what would be a best practise as I Am just learning and using a lot of examples and playing around with other coding issues? so something along the lines of public void onDownloadStart(String

[android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-18 Thread Raziel23x
On Aug 17, 1:30 pm, lbendlin l...@bendlin.us wrote: you don't need a webview for that. Just use HTTP GET directly. Explain as my application uses webview to list files for download that when you click the links to the files they want to open a web browser before starting the downloads --

Re: [android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-18 Thread Kristopher Micinski
On Thu, Aug 18, 2011 at 2:40 AM, Raziel23x raziel...@gmail.com wrote: On Aug 17, 1:30 pm, lbendlin l...@bendlin.us wrote: you don't need a webview for that. Just use HTTP GET directly. Explain as my application uses webview to list files for download that when you click the links to the

[android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-18 Thread Raziel23x
I do not want to hide it i want it to download inside the application itself not have it when a link is clicked launch the web browser and download the file off the browser On Aug 18, 3:05 am, Kristopher Micinski krismicin...@gmail.com wrote: On Thu, Aug 18, 2011 at 2:40 AM, Raziel23x

Re: [android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-18 Thread Kristopher Micinski
On Thu, Aug 18, 2011 at 9:53 AM, Raziel23x raziel...@gmail.com wrote: I do not want to hide it i want it to download inside the application itself not have it when a link is clicked launch the web browser and download the file off the browser Ah, so your problem is that you need access to the

Re: [android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-18 Thread Miguel Morales
Simply set a custom webview client on your webview. Then detect when your download link was clicked. Then start a download thread to download your file. Update the webview accordingly. If you need any further help, consult the android webview documents. On Thu, Aug 18, 2011 at 11:13 AM,

[android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-18 Thread Raziel23x
myweb.setDownloadListener(new DownloadListener() { public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, long contentLength) { Intent intent = new

Re: [android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-18 Thread Kristopher Micinski
On Thu, Aug 18, 2011 at 10:36 PM, Raziel23x raziel...@gmail.com wrote: myweb.setDownloadListener(new DownloadListener() {                public void onDownloadStart(String url, String userAgent,                        String contentDisposition, String mimetype,                        long

Re: [android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-18 Thread Kristopher Micinski
On Thu, Aug 18, 2011 at 11:19 PM, Kristopher Micinski krismicin...@gmail.com wrote: On Thu, Aug 18, 2011 at 10:36 PM, Raziel23x raziel...@gmail.com wrote: myweb.setDownloadListener(new DownloadListener() {                public void onDownloadStart(String url, String userAgent,                

[android-developers] Re: Downloading Files Directly in Webview without it opening the browser

2011-08-17 Thread lbendlin
you don't need a webview for that. Just use HTTP GET directly. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to