06-24-2013 09:03 AM - edited 06-24-2013 09:06 AM
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?
06-24-2013 09:20 AM
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
06-24-2013 09:35 AM - edited 06-24-2013 09:41 AM
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.
06-24-2013 09:51 AM
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.
06-24-2013 10:19 AM - edited 06-24-2013 10:35 AM
This is bad news
Is there sample code for using the camera in a view? All code I found is either using CameraUI or invoke.
06-25-2013 01:44 PM
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.
06-26-2013 07:42 AM
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?
06-26-2013 07:57 AM
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.
06-26-2013 08:10 AM
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.