Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 12
Registered: ‎03-25-2012
My Device: none
My Carrier: none

Open Media/Image browser

Hi,

 

I'm using the ndk to develop an app where the user can select an image from his media library and then edit it.

 

Is there a way to do this on PlayBook? How can I start the "Pictures" app and have it return me a file path chosen by the user?

 

On Android I use something like this:

 

Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);
photoPickerIntent.setType("image/*");

context.startActivityForResult(photoPickerIntent, SELECT_IMAGE);

 

Thanks

 

Contributor
Posts: 12
Registered: ‎03-25-2012
My Device: none
My Carrier: none

Re: Open Media/Image browser

another thing, 

 

I would also need a way to add an image to the media store, so that it shows up in the "Pictures" app.

Highlighted
Contributor
Posts: 12
Registered: ‎03-25-2012
My Device: none
My Carrier: none

Re: Open Media/Image browser

 

So I found the  navigator_invoke() function, but could not find a way to do anything besides open the pictures app.

 

Any way to get the selected image ?

Retired
Posts: 60
Registered: ‎05-10-2012
My Device: Blackberry 10 Alpha
My Carrier: none

Re: Open Media/Image browser

Hello, if you want file selection, then you should be using the Dialog functions here https://developer.blackberry.com/native/beta/reference/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_r...

 

It has a file browser which you can use to select files from the shared pictures folder.

 

To save files, you save them normally like you would any file, except to the shared/photos directory

 

Cheers

Selom