← Back to team overview

ubuntu-phone team mailing list archive

Re: Ubuntu Download Manager broken since #213

 

On Mon, 2014-03-03 at 02:50 -0300, Alejandro J. Cura wrote:

> On Sat, Mar 1, 2014 at 4:54 PM, Manuel de la Pena
> <manuel.delapena@xxxxxxxxxxxxx> wrote:
> > I don't like the fact that udm is dooimd the click package installations but
> > it is done because there is no guarantee that the scope will be around to
> > deal with the download. We should think a better approach and let udm do one
> > only thing, download and find a better approach for the installations.
> 
> You mention that you don't like the download manager doing the
> installation, but to put it more strictly: the download manager is
> actually just running a command given by the scope when a given
> download is completed. And the installation proper happens in that
> command. This is done, as you've explained, because the scope process
> may already be dead by the time that the download has finished, and
> the dash may not be showing the preview for the current download so
> it's not keeping track of the download progress and finished signals.


What we're doing for alarms is having the application provide a URL that
gets called if the user clicks on the notification. So the clock app
sets up an alarm and sets the URL to "alarms:///foo/whatever" and
registers for that URL in the URL Dispatcher. When the user clicks on
the notification the Date/Time User Service then sends that URL to URL
Dispatcher and closes the notification. URL Dispatcher (and all the app
startup machinery) takes care of running the app and then the clock app
shows the data to the user. This nicely makes it so that the Date/Time
User Service doesn't know much about clock app and can be used for other
types of alarms for other applications.

This doesn't directly solve the problem for the Download Manager as URLs
do require the application to startup and be shown to the user, and for
instance in the click case, we'd want that to happen in the background
(I assume). But, I'm not sure how 3rd party applications can interact
with the Download Manager to get background downloading, perhaps it
would work for them. Then we could handle the click scope case as the
special case.

Ted

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References