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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 121
Registered: ‎02-08-2013
My Device: 9900
My Carrier: verizon

Camera question

Hi,

 

I am showing the view of the camera in my app using ForeignWindowControl, I would like to be able to make my view as similar to the native camera app's view as possible - i.e using the autofocus rectangle which goes green.

 

Is this possible - can i use the same autofocus rectangle in my camera app and if so how?

Highlighted
Developer
Posts: 74
Registered: ‎03-04-2012
My Device: developer
My Carrier: developer

Re: Camera question

Yes you can achieve this, what i have done as per my project requirement to invoke camera i am sharing it with you.

 

 attachedObjects: [
                                FilePicker {
                                    id: picker
                                    property string selectedFile
                                    title: qsTr("File Picker")
                                    mode: File.selectedValue
                                    /*type: pickerType.selectedValue*/
                                    type: FileType.Picture
                                    viewMode: pickerViewMode.selectedValue
                                    sortBy: pickerSortBy.selectedValue
                                    sortOrder: pickerSortOrder.selectedValue
                                    /*  directories : ["/accounts/1000/shared/misc"]*/
                                    onFileSelected: {
                                        selectedFile = selectedFiles[0]
                                        user_image.imageSource = "file://" + selectedFile;
                                        imagePath = "file://" + selectedFile;
                                        /* console.debug("picker.selectedFile : " + picker.selectedFile);
                                         * if (fileInfo.isImage(picker.selectedFile)) {
                                         * console.debug("roomsListPage: an image was picked")
                                         * roomsListPage.previewImage(picker.selectedFile);
                                         * return;
                                         * }*/
                                    }
                                }
                            ]

 trap click event of button and put this code snippet 

  picker.type = FileType.Picture
                                    picker.directories = [
                                    ]
                                    picker.open();

 

Deepak Charya
Developer
Posts: 121
Registered: ‎02-08-2013
My Device: 9900
My Carrier: verizon

Re: Camera question

Thanks Deepak,

 

I don't think invoking the camera as a card is the solution for me however as I want silence the camera (purpose of my app).

 

I have the camera showing in ForeignWindowControl and silenced but I want to have finer control of the camera as I have seen another app do it - show the rectangle in centre of camera view which turns green (I think its focusing or auto stabilizing) so I think it is possible. 

 

Anyone shed some light on this please?

Developer
Posts: 74
Registered: ‎03-04-2012
My Device: developer
My Carrier: developer

Re: Camera question

Hi JohnWS

 

i found a solution to this prob if i am actually understand what u need.

 

Have a look on this sharing a working sample of invoking camera 

 

Hope this may help you Smiley Happy

 

Regards

Deepak Charya