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

Adobe AIR Development

Reply
Developer
Posts: 27
Registered: ‎06-24-2013
My Device: Z10

BB10 CameraUI fails to open when app is installed via BES

[ Edited ]

Hello,

 

I have an app that uses the CameraUI class to open the camera and save a picture.

This works fine when I debug the app and also when i export a release build from Flash Builder.

However when I deploy the application via our BES10 the camera will no longer open when i press the button that usually opens it.

 

Does anyone have an idea what the problem is?

Retired
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: BB10 CameraUI fails to open when app is installed via BES

Are you setting the proper permissions in your bar-descriptor.xml file?

 

Here is a link to the documentation on permissions - https://developer.blackberry.com/air/documentation/bb10/accessing_secure_apis_1524628_11.html

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
Posts: 27
Registered: ‎06-24-2013
My Device: Z10

Re: BB10 CameraUI fails to open when app is installed via BES

[ Edited ]

Yes, I've set the "use_camera" permission in my bar-descriptor.xml file.

It also asks for the permission when you first open the app.

Retired
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: BB10 CameraUI fails to open when app is installed via BES

Sorry I missed the part where you said you're deploying using a BES. In the workspace there are a bunch of API's that you're unable to use. One of those is the camera. We're looking to add these features past 10.2 but right now the only way to use a camera is to set it up in a view. Invoking will not work because it's trying to load the camera app from the personal side.

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Developer
Posts: 27
Registered: ‎06-24-2013
My Device: Z10

Re: BB10 CameraUI fails to open when app is installed via BES

[ Edited ]

This is bad news Smiley Sad

 

Is there sample code for using the camera in a view? All code I found is either using CameraUI or invoke.

Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: BB10 CameraUI fails to open when app is installed via BES

I'm actually working on a Cascades sample (CloudyPics) that will, among other things, be invocable like the normal camera app. When it's released, it could be deployed by the BES alongside your app and give you something to invoke, if you choose to take that route.

 

The first version should hopefully be published in a week or two.

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
Developer
Posts: 265
Registered: ‎01-02-2011
My Device: Z30, PlayBook
My Carrier: AT&T

Re: BB10 CameraUI fails to open when app is installed via BES

So, you are saying that invoking a camera can't happen in a Work (BES) app, but a Work app can pull up a different app to invoke the camera?

_________________
Meetup for BlackBerry 10
Meetup Search Tool - not available at the moment
Developer
Posts: 27
Registered: ‎06-24-2013
My Device: Z10

Re: BB10 CameraUI fails to open when app is installed via BES

I guess what he means is that he is writing an app which directly accesses the camera...

You just can't invoke / start the native camera app which is pre installed on the blackberry.

 

I got the camera to work in my app but it's ugly and slow in AIR.

Developer
Posts: 265
Registered: ‎01-02-2011
My Device: Z30, PlayBook
My Carrier: AT&T

Re: BB10 CameraUI fails to open when app is installed via BES

I undestand that he's probably creating a card that can be accessed by other apps.  I didn't realize that non-Work apps could be accessed by Work apps.  I figured that wouldn't be allowed.

 

I was working on an app to use the camera as well, I guess I'll have to use the Flash camera calls instead.

_________________
Meetup for BlackBerry 10
Meetup Search Tool - not available at the moment
Developer
Posts: 27
Registered: ‎06-24-2013
My Device: Z10

Re: BB10 CameraUI fails to open when app is installed via BES

Yea that's what I did. However I will probably write an ANE for it as it's painfully slow if you do it all in AIR.