Results 1 to 15 of 15
  1. mosdl's Avatar
    Posts
    781 Posts
    Global Posts
    787 Global Posts
       #1  
    So I am playing around with a wallpaper chooser that can browse flickr groups.

    I Using the systemservice wallpaper/importWallpaper method with an http:// url fails, so I am assuming it needs to be local.

    So the question is, what is the best way using mojo to download a file? palm://com.palm.downloadmanager/download' seems to be the only download service I can find, would it be best?

    I assume it downloads the file to a tmp dir.

    thanks!
  2. mosdl's Avatar
    Posts
    781 Posts
    Global Posts
    787 Global Posts
       #2  
    quick bump - so no one has tried downloading stuff off the web?
  3. Khidr's Avatar
    Posts
    73 Posts
    Global Posts
    115 Global Posts
    #3  
    Might be worth taking a look at the browser code and the mods on the wiki enabling downloading.
  4. Kaerey's Avatar
    Posts
    539 Posts
    Global Posts
    540 Global Posts
    #4  
    Quote Originally Posted by mosdl View Post
    So I am playing around with a wallpaper chooser that can browse flickr groups.

    I Using the systemservice wallpaper/importWallpaper method with an http:// url fails, so I am assuming it needs to be local.

    So the question is, what is the best way using mojo to download a file? palm://com.palm.downloadmanager/download' seems to be the only download service I can find, would it be best?

    I assume it downloads the file to a tmp dir.

    thanks!
    Not sure your approach of using an http:// location would work with how I have found the file browser to work. It appears to scan a directory and pull compatible files from that directory, creating the categories based on the folders in the directory it scans.

    You would need to edit the browser application with the wiki edit (enable downloads in browser) and then save it to a specific folder that you would then use the file browser to scan and pull from.
    8MB Visor --> Treo 300 --> Treo 650 --> Treo 800w --> Palm Pre
    All devices obtained within first week of launch
  5. mosdl's Avatar
    Posts
    781 Posts
    Global Posts
    787 Global Posts
       #5  
    I don't want to use a file browser - I just need to download an http file to the pre.
  6. mosdl's Avatar
    Posts
    781 Posts
    Global Posts
    787 Global Posts
       #6  
    Looks like I am getting an error: com.palm.downloadmanager is not running.
  7. #7  
    have you looked at this?

    pre dev wiki: Com Palm Downloadmanager
  8. mosdl's Avatar
    Posts
    781 Posts
    Global Posts
    787 Global Posts
       #8  
    The problem is I am getting a downloadmanager error that it isn't running, which may be because it is running in the emulator. I guess I might have to try this on the actual pre.
  9. jsanjose's Avatar
    Posts
    4 Posts
    Global Posts
    13 Global Posts
    #9  
    I haven't had any success in the emulator or on my Pre getting downloads to work. The simplest snippet I found was in com.palm.app.browser, download-request.jsjsjs.

    I still haven't figured out how to debug a service call. I'm at the point where onFailure is called, but the response data (e.g. response.url) isn't populated. I haven't seen anything pop up in /var/log/messages...but, I'm probably looking in the wrong place.

    I've also looked at all the other apps that use downloadmanager (amazon, browser, updates, findapps), but I don't see anything to indicate an error in my code.

    Ideas? I can't wait for the official SDK release and some documentation...

    Code:
    		this._downloadRequest = new Mojo.Service.Request('palm://com.palm.downloadmanager/download', {
    			parameters: {
    				id: 'com.palm.app.browser',
    				'target': this.url, 
    				'subscribe': true 
    				},
    			onSuccess: onDownload.bind(this, true),
    			onFailure: onDownload.bind(this, false)
    		});
  10. #10  
    You could use this method in the SDK to open the image and "preview" it with the image viewer.
    Services – webOSdev – Palm

    I haven't made it all the way through the sdk docs yet to see how downloading works, though.
  11. #11  
    I can successfully download a file...but does anyone know how to either rename the file once its on the disk or to simply specify a name?
  12. #12  
    Quote Originally Posted by fordaaronj View Post
    I can successfully download a file...but does anyone know how to either rename the file once its on the disk or to simply specify a name?
    What do you mean? A mp3 or a exe, zip, jpeg, etc
  13. #13  
    It is a torrent file, but mininova's torrent files download without an extension, so I want to add a .torrent on the end of the file name.
  14. #14  
    are you using the torrent app, pre torrent? Or are you downloading from the browser? If you are you using the browser what other files can you download?
  15. #15  
    i am the developer of pretorrent (now torPredo...)...but I want to expand its functionality and need help. Using this you should be able to download any file.

Posting Permissions