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

Web and WebWorks Development

Reply
New Developer
kiranmobile
Posts: 44
Registered: ‎08-28-2009
My Device: Not Specified
Accepted Solution

Camera API

I have two questions about accessing camera API on Playbook:

 

1. How do I add any custom icons or controls on top of camera? In other words is there a way to overlay something on top of the default camera view? example: Like a custom zoom control or something. 

 

2. Is there a way to embed the camera view inside a DIV element. The takePicture() API takes over the entire window of the Playbook. I want it to be within a DIV within the app's main window

 

Appreciate if someone can give some pointers.

Please use plain text.
Administrator
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Camera API

1. Yes this can be done - here is some sample code:

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Camera-overlay-Sample-Code/ta-p/1...

 

Example of an app overlaying uI objects onto the camera:

http://appworld.blackberry.com/webstore/content/24599/?lang=en

 

2. No, not within a DIV.  The blackberry.media.camera API launches a new screen which displays the camera.

https://bdsc.webapps.blackberry.com/html5/apis/blackberry.media.camera.html

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
New Developer
kiranmobile
Posts: 44
Registered: ‎08-28-2009
My Device: Not Specified

Re: Camera API

Adam: Thanks for responding.

 

I saw this Adobe Air sample before. I was wondering if there was a way to achieve this with Webworks SDK. If this is not possible with Webworks then alternatively if I were to write an Android app using camera functionality would it work if I convert it to a Playbook app?

Please use plain text.
Administrator
astanley
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: Camera API

In WebWorks, you can launch the camera view window (separate window displayed on top of your application) but not embed the camera within WebContent of your app.

 

 

Sorry, I can't speak to what can & can't be done in Android as I am not an expert developing those apps.  Not all features of Android are supported (not sure if camera is or isnt availalbe within the BlackBerry runtime for Android).

 

Do you have an existing APK?  if so, its best to test its compatibility using the following compatibility test:

https://bdsc.webapps.blackberry.com/android/documentation/test_your_app_1985225_11.html

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.
Please use plain text.
New Developer
kiranmobile
Posts: 44
Registered: ‎08-28-2009
My Device: Not Specified

Re: Camera API

Thanks for the info!!  Will check out the android compatibility feature and let you know if I find something.

Please use plain text.