← Back to team overview

ubuntu-phone team mailing list archive

Re: Applications spawning other Applications

 

On Thu, Jul 18, 2013 at 7:06 PM, Marc Deslauriers
<marc.deslauriers@xxxxxxxxxxxxx> wrote:
> On 13-07-18 01:00 PM, Jamie Strandboge wrote:
>> On 07/18/2013 11:14 AM, Michał Sawicz wrote:
>>> W dniu 18.07.2013 17:38, Marc Deslauriers pisze:
>>>> For the browser, I imagine a URL handler will take care of it, but what about
>>>> spawning a different application that doesn't necessarily handle URLs or MIME types?
>>>
>>> And for network access I expect some platform API instead.
>>>
>>> I feel like the only instance where we would indeed allow spawning other
>>> apps directly would be if it's bundled in the same package - and handled
>>> through upstart as usual, I'd say.
>>
>> Well, an app may want to spawn a browser rather than implementing a webview
>> itself. Marc mentioned the URL handler, but I don't know how this would work.
>> Marc, can you elaborate?
>
> Not really. I remember there was discussion around an API to allow apps to open
> stuff using a URL, such as http://www.ubuntu.com, or unity://wireless-settings
> or something similar. Was there going to be a dbus API for this?
>

My last status on this is that we are going to have a URL handler
binary that apps can register with, much like for example on iOS. With
that, Jamie's web-browser example is easily solvable, and so are more
sophisticated use-cases like gallery://albums/birthday/cake.png. Not
sure if it's DBus or not, but I'm very much in favor of doing URL
handling as opposed to mime-type handling.

>>
>> But for the other cases consider the MyApp click package that ships two desktop
>> files for myapp and myapp-settings. Upstart works fine for launching either of
>> these from the Dash. However, if myapp wants to launch myapp-settings from
>> within itself, we need to define how that is supposed to happen (the specific
>> problems are in another mailing list[1]). It can't just use:
>>   start application APP_ID=myapp-settings
>>
>> because we don't have a way to prevent it from doing:
>>   start application APP_ID=some-other-app
>>
>
> Would that be problematic? I believe it's permitted on other devices.
>

As an example, iOS restricts this to invocations mediated by the URL handler.

Thomas

> Although, we probably want a specific permission, such as "can launch other
> apps", and we'd probably want something better than the generic "start" binary
> to make sure it's actually launching an app.
>
> Perhaps this could be included in the API that handles URLs? is:
> "application://calculator" or similar.
>
> Marc.
>
>
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References