← Back to team overview

ubuntu-phone team mailing list archive

Re: Need picture_files policy in mg app

 

We are really close to landing enough of the content-hub for you to be able
to make that work.  To pull pictures from other apps, you would use the
content-hub API to get the default peer for pictures, which is gallery-app
and provides the UI for picking pictures and returns them back to your app.
 You can also query all known peers that can provide pictures as well.

Your app could also be registered as a known provider for pictures, which
would allow other apps to find them.  To do this you would need to
implement an export handler, which provides the UI to browse and pick.
 There is also currently work underway to provide a default SDK component
that could be used for picking.

I really hope we can land all the necessary bits to make this work with app
confinement this week.  You can find code examples in the content-hub
source:
http://bazaar.launchpad.net/~phablet-team/content-hub/trunk/files/head:/examples/import-qml/

Thanks,
--Ken


On Mon, Sep 16, 2013 at 8:38 AM, Mario Guerriero <mefrio.g@xxxxxxxxx> wrote:

> I can confirm Jamie.
>
> While testing my app I tried to use the content_exchange policy but the
> testers said they cannot access to photos which were not taken by my app.
> —
> Sent from Mailbox <https://www.dropbox.com/mailbox> for iPhone
>
>
> On Mon, Sep 16, 2013 at 2:25 PM, Jamie Strandboge <jamie@xxxxxxxxxxxxx>wrote:
>
>> On 09/15/2013 11:33 AM, Thomas Voß wrote:
>> > On Sun, Sep 15, 2013 at 6:13 PM, Michael Zanetti
>> > <michael.zanetti@xxxxxxxxxxxxx> wrote:
>> >> On Sunday 15 September 2013 17:57:35 Thomas Voß wrote:
>> >>> On Sun, Sep 15, 2013 at 10:32 AM, Mario Guerriero <mefrio.g@xxxxxxxxx>
>>
>> >> wrote:
>> >>>> Hi,
>> >>>>
>> >>>> I need to access photos from all apps (in a read only mode) and I
>> need to
>> >>>> access photos from my app which create them using the camera.
>> >>>
>> >>> Hmmm, accessing the content of other applications violates the
>> current
>> >>> confinement approach.
>> >>> Wouldn't it be sufficient for your app to just display the photos
>> >>> taken with your app to the user?
>> >>
>> >> Hmm, I could think of lots of use cases to display pictures from the
>> pictures
>> >> folder within an app. For example image manipulation programs could
>> import
>> >> them, social media apps could want to share them (e.g. attached to a
>> blog
>> >> post), chat applications to select an avatar etc.
>> >>
>> >
>> > While the filesystem might have such a folder, the intended way to
>> > solve the use-cases you are mentioning above is the
>> > content-picking/sharing infrastructure.
>> >
>> >> I think that an app should not be able to access other app's pictures
>> (e.g.
>> >> stored in /home/phablet/.cache/$APPID/ ) but accessing the common
>> pictures
>> >> folder is probably a must-have in the long run, no?
>> >>
>> >
>> > Well, the confinement approach basically says: There is no content on
>> > the phone that is not owned by an app. With that, the pictures folder
>> > would be owned by the default Gallery application and thus,
>> > confinement rules would apply again.
>> >
>> > I'm trying to understand this app's concrete use-case better to
>> > propose a way forward.
>> >
>>
>> Mario should respond, but to prod this along: aiui, his 'Memories'
>> application
>> wants to aggregate photos, etc from all applications, and has the ability
>> to
>> take pictures. To me, it sounds like it is both a content source (because
>> it can
>> take pictures) and a content consumer (because it wants to pull in
>> (selected?)
>> photos.
>>
>> Mario, can you confirm?
>>
>>
>> --
>> Jamie Strandboge http://www.ubuntu.com/
>>
>
>
> --
> 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