← Back to team overview

ubuntu-phone team mailing list archive

Re: Ubuntu Download Manager broken since #213

 

On Mon, Mar 3, 2014 at 11:38 AM, Ted Gould <ted@xxxxxxxxxx> wrote:
> 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.

Indeed, we want the installation to happen in the background.
And for 3rd party downloads, if the app is in the background or closed
I think we don't want it brought to the front nor restarted.

So, in both cases we need to show some kind of notification:
- "Sample App" has been installed, click here to run it.
- "Sample Mp3 album" has been downloaded, click here to listen.

It sounds to me that URL dispatcher is mainly for opening apps; does
it make sense for "non-foreground operations", like installing the app
or showing a notification?
Or should we use a different mechanism?

I kind of like there being a registry for these kind of operations
(like android Intents), but I'm afraid we would not be able to stop a
rogue app from installing a random click downloaded from elsewhere,
which might be the case for some locked down operators.

cheers,
-- 
alecu


Follow ups

References