BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-05-2009, 02:54 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2009
Location: Bilbao
Model: 8900
PIN: N/A
Carrier: Vodafone
Posts: 29
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem to take a snapshot using the built-in camera

Please Login to Remove!

Hi,

i try to take a snapshot using the built-in camera.
I use the sample of Developers Knowledge Base (Livelink - Redirection)
but it not work.
The problem is that the Field viewfinder not work in not full size mode.
I try to load the sample on my blackberry bold and i can't view the viewfinder until i use displayFullSize().
The code is exactly the same of the downloaded sample and in the simulator work (but the simulator ask for a static image).
Anyone do this?
This is the code (i post only the code of field):
Code:
...
private MenuItem mi = new MenuItem("Viewfinder", 1, 1) {
		public void run() {			
			try {
				setupEncoding();
				logField.setText("");
				log("Active Encoding: "+encoding);
				if(vc!=null){					
					UiApplication.getUiApplication().invokeLater(new Runnable(){
						public void run(){	
							if(home.getFieldCount()<3){								
								home.delete(logField);
								home.add(viewFinder);								
								home.add(logField);
								viewFinder.setFocus();
							}
														
						}
					});				
					vc.setVisible(true);			
					isViewfinderVisible=true;
					log("Initialized ViewFinder");								
				}else {
					log("VideoControl not initialized");
				}
					
			} catch (Throwable e) {
				log(e + ":" + e.getMessage());
			}				
		}
	};
...
public SnapShotAPI(){		
		home = new MainScreen();		
		logField = new EditField("Log:","");
		bitmapField = new BitmapField();
		String[] choices = {"SuperFine 1600x1200", "Fine 1600x1200", "Normal 1600x1200", "SuperFine 1024x768", "Fine 1024x768", "Normal 1024x768", "SuperFine 640x480", "Fine 640x480", "Normal 640x480"};    
		qualityField = new ObjectChoiceField("Quality", choices);
		home.add(qualityField);
		home.add(logField);		
		home.addMenuItem(mi);
		home.addMenuItem(mi1);
		home.addMenuItem(mi2);
		home.addMenuItem(mi3);
		preview = new MainScreen();
		preview.add(bitmapField);	
		
		pushScreen(home);
		try{						
			p = Manager.createPlayer("capture://video");						
			p.realize();
			log("Player realized");
			p.prefetch();
			log("Player prefetched");
			p.start();
			log("Player started");				
			vc = (VideoControl) p.getControl("VideoControl");
			viewFinder = (Field)vc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
			log("Initialized.");
		} catch (Exception me){
			log(me.getMessage());
		}
		isViewfinderVisible=false;
	}
Thank for help
Offline  
Old 07-05-2009, 03:18 PM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2009
Location: Bilbao
Model: 8900
PIN: N/A
Carrier: Vodafone
Posts: 29
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi, sorry for repeated question:
I just find this that explain that it not work on 8900 Curve.
Camerademo does not work on 8900 Curve - Java Development - BlackBerry Support Community Forums

I post it for future askers ;)

Bye
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

10pcs. 0.33uF 330nF 160v MKP-4 WIMA capacitor
$7.5
10pcs. 0.33uF 330nF 160v MKP-4 WIMA capacitor pictureC 0.47uf -1000uf Box 24 Value 565 Pcs DIP Aluminum Electrolytic Set Assortment
$39.5
C 0.47uf -1000uf Box 24 Value 565 Pcs DIP Aluminum Electrolytic Set  Assortment pictureFulham High Horse HHHPS-DCAP-70 LL MKP Internal Resistor Capacitor 7/285V/E653
$18.99
Fulham High Horse HHHPS-DCAP-70 LL MKP Internal Resistor Capacitor 7/285V/E653 pictureJAPAN 10PCS Nichicon FW 2200uf 16V 2200mfd Audio Capacitor
$9.99
JAPAN 10PCS Nichicon  FW 2200uf  16V 2200mfd Audio Capacitor pictureHard start capacitor 140 mfd
$5.0
Hard start capacitor 140 mfd picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.