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

Java Development

Reply
Developer
Posts: 22
Registered: ‎12-01-2009
My Device: Not Specified

Taking a photo from a MIDlet v4.6.1

[ Edited ]

Hi,

I have a BlackBerry 8900 with OS 4.6.1.310 and try to take a photo from my J2ME MIDlet

(build on Linux/eclipse MTJ with current proguard and cod/alx created from jad/jar

with JDE 4.7.0 rapc net_rim_api.jar)

 

Manager.createPlayer("capture://video");

...

Item item = (Item) videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE,
                            "javax.microedition.lcdui.Item");

...

byte[] photo = videoControl.getSnapshot("encoding=jpeg&width=480&height=360&quality=normal");

 

 

The 'photo' returned is always null.

The viewer (inside 'item') is a white screen, I can't see the building I want to take a photo of.

The media capture security popup comes as expected and is granted.

 

The same code runs fine on Sony Ericsson and Nokia devices.

 

 

Then I decieded to use the WTK original code from

 

  WTK2.5.2/apps/MobileMediaAPI/src/example/mmademo/VideoCanvas.java

 

but this MIDlet doesn't work either on my 8900.

 

What can I do next?

 

Thank you
Marcel

BlackBerry Development Advisor
Posts: 15,784
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Taking a photo from a MIDlet v4.6.1

Applications built in the version 4.7.0 BlackBerry JDE are not compatible with BlackBerry device software version 4.6.1.  Please refer to the following:

 

What Is - Appropriate version of the BlackBerry JDE

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/What_Is_-_Appr...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 22
Registered: ‎12-01-2009
My Device: Not Specified

Re: Taking a photo from a MIDlet v4.6.1

Thank you for this hint.

 

I have now downloaded the .jad and .jar OTA directly,

and my BlackBerry device itself does any cod translations

to avoid such influence.

 

Unfortunately it is exactly the same behaviour.

 

 

Was anybody ever successfull to take a photo with a standard MIDlet

with OS 4.6?

 

If yes: I need to investigate what is wrong with my code

If no: Is this a bug in the firmware?

 

Thank you
Marcel

Developer
Posts: 22
Registered: ‎12-01-2009
My Device: Not Specified

Re: Taking a photo from a MIDlet v4.6.1

I'm still stuck and can't deliver the App to my customers!

 

Can please a BlackBerry developer comment on this issue?

 

Note that the same code works fine on Nokia/Sony and that

even the original WTK example does not work on BlackBerry v4.6.1

 

Thank you
Marcel