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


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
Contributor
Posts: 37
Registered: ‎11-29-2010
My Device: Not Specified

Access to Camera through AIR

I just watched the Adobe Max lectures concerning the Playbook. Though, while they have clearly stated I do have access to any of the cameras (front/back), I have tried this:

private function getCamera(e:MouseEvent):void {
cam = Camera.getCamera();
if (cam){
     _trace.text = "ok - Camera is there";
} else {
_trace.text = "No camera here  ";
}
}

I always get: No Camera here! Plus, I'm curious to know how would be able to test the Camera through the Simulator.

Highlighted
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Access to Camera through AIR

the BB SDK is not fully done yet, so some of this is still TBD.

 

The Camera.getCamera static method has a name arguement.  I would assume the BB SDK would define some static variable as "front" and "back" to get the proper camera.

 

If you're running the application as an AIR application and you have a camera on your computer, you should be getting that.

 

Multimedia devices (camera, speakers, etc.) are not yet functional on the simulator.

 

Camera.names also returns an Array of available cameras on your computer, so you might want to send those to trace(...) to see what you have.

 

See more here:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html

 

Hope that helps.

 

 

New Contributor
Posts: 4
Registered: ‎11-22-2010
My Device: BlackBerry Table OS Emulator

Re: Access to Camera through AIR

Will the camera access be a Blackberry/Tablet OS specific API? Or will that be aligned/compatible with the AIR for Android API?

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Access to Camera through AIR

I would have to assume it will use the standard Camera class.  QNX items are usually (typically at this point) controls that are either highly optimized for the platform (eg HTML control) or standard controls that behave better with touch manipulation.  However, since this is still beta, that could change, but I would doubt the Camera API would.