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
Developer
meego_man
Posts: 189
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B
Accepted Solution

Gallery app on Dev Alpha?

Hi, 

 

  I'm porting an app that should use a build-in picture gallery app to allow the user select a picture. As I can see there is no such app currently on Dev Alpha device. So my question would be, how can I implement this feature, is there any Cascades class exists for this or should I do it completely by hands as I did on PlayBook for one of my Qt apps? (Invoker method doesn't work since there is no gallery app present on the device). Thank you in advance

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Gallery app on Dev Alpha?

I'm not sure why you say the "Invoker method doesn't work" unless it's simply an assumption you're making just because you don't actually *see* any standalone picture viewer app.

If you use BBM or the camera, however, you'll see that they both invoke a Card which does allow displaying pictures, so you ought to be able to do the same.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
meego_man
Posts: 189
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B

Re: Gallery app on Dev Alpha?

peter9477, thank you for reply. I should've written "Invoker method didn't work" as I tried it. That's why I was surprised because the camera app indeed have image viewer. Probably I should try few more times, but first I will update my SDK today :smileyhappy: Will report about results so others can benefit from them.

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Gallery app on Dev Alpha?

meego_man, okay, that's different then. :-)

Do you have any code snippet or sample to post? I haven't even gotten to Cards yet, but especially if it's QML I could try testing something quickly and see how I fare.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
meego_man
Posts: 189
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B

Re: Gallery app on Dev Alpha?

peter9477, my bad, I used the wrong code :smileyhappy: I tried the example from photobomber and it was opening a single image instead of a list. Only yesterday I realised that I was expecting something that is not there :smileyvery-happy:

 

  I'll try to use a file picker today, looks like it's a way to go. Once I have a working code I'll post it here

Please use plain text.
Developer
nicklas
Posts: 148
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha
My Carrier: SFR

Re: Gallery app on Dev Alpha?

[ Edited ]

Hi,

 

You have to use FilePicker

 

      attachedObjects: [
          FilePicker {
              id: imgPicker
  
              title: qsTr ("Image")
              mode: FilePickerMode.Picker
              type: FileType.Picture
              viewMode: ViewMode.GridView
              sortBy: FilePickerSortFlag.Default
              sortOrder: FilePickerSortOrder.Default
  
              onFileSelected: {
                  imgFile = selectedFiles[0]
              }
          }
      ]

 

Also, you can call PlayCloud :smileyhappy:

 

http://www.progweb.com/bb10/playcloud/IMG_00000022.png

 

Or : http://www.progweb.com/bb10/playcloud/

 

Regards,

 

Nicolas

 

Please use plain text.
Developer
meego_man
Posts: 189
Registered: ‎11-25-2012
My Device: BlackBerry Dev Alpha B

Re: Gallery app on Dev Alpha?

nicklasThank you very much, just what I needed. I almost got there myself, hanging the phone few times because didn't use FilePicker as attachedObject :smileyvery-happy: 

 

Please use plain text.
Developer
StevenKader
Posts: 634
Registered: ‎02-03-2010
My Device: Z10 LE
My Carrier: Rogers

Re: Gallery app on Dev Alpha?

I see how to use the Filepicker to select one photo but that isn't the same as the gallery app that the camera has which allows the user to go from picture to picture including videos and then share them.  Purpose isn't to pick something but to just let the user acces their photos to view and share them from within our app.  Does anyone know how to invoke that type of app?


Steven Kader at JaredCo
   Follow me on Twitter    |     Mipixi.com :  Web App for Photo Sharing
Please use plain text.