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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
New Developer
JamesPtheNerd
Posts: 12
Registered: ‎06-09-2012
My Carrier: Telus Mobility

Camera API Options

Hi,

 

 Are there some additional options available for the Camera Capture API's? Eg, can I specify that resolution should be, at most, 640x480? I have an app which sends a photo, but when the photo starts exceeding 2MB, the upload files on the server with STATUS CODE 3 (partially uploaded file). 

 

 Other devices don't cause an issue with the same script, and the PHP server has a 20MB POST side and FILEUPLOAD size. Only thing I can think of is that the BlackBerry is limiting the file sizes.

 

 Also... can I programatically inject back keys? So that the camera comes back? It mentions keyboard emulation in the API reference, but has no sample code to actually do it, nor does it actually happen, even with these permissions allowed on the device.

--
James Robert Perih
http://www.cardcloud.com/jperih
Please use plain text.
Administrator
astanley
Posts: 1,127
Registered: ‎07-02-2009
My Carrier: Bell

Re: Camera API Options

The Camera API works by launching a view to the native camera application. The photo taken is dependant on the resolution settings provided by the user at that time.  There are no additional options that you can provide to the InvokeCamera API to change these user settings.  Once the picture is taken, the file path to the photo is returned to your application.

 

If you wish to pre-process the image before uploading them, it may allow you to reduce file sizes and potential timeouts.

 

Do you happen to know which network gateway your BlackBerry is using to transfer the file?  Is it regular WiFi, or are you connected over cell through your corporate network (BlackBerry Enterprise Server)?  If the latter, there may be an admin setting that restricts max file sizes.

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.

Watch the BlackBerry Jam Americas Sessions.
Please use plain text.