Community: Wiki

你在这里: You Are Here: Olet tässä: Vous êtes ici: Sie befinden sich hier: Tu sei qui: 現在のページ: Você está aqui: Вы здесь: Usted está aquí:
This page was last modified 08:30, 25 September 2007.

How to display the camera & take snapshots in Java ME

From Forum Nokia Wiki


The following code is used for camera display:

public void cameraPlayer() {
    try {
        player = Manager.createPlayer("capture://video");
        player.realize();
            
        videoControl = (VideoControl)player.getControl("VideoControl");
        player.start();
    } catch (Exception e) {} 
}


The following code is used for capturing images using camera in Java ME:

byte[] raw = videoControl .getSnapshot(null);
Image image = Image.createImage(raw, 0, raw.length);

TODO: list available modes, and when you need to use a different locator

helpful links:

http://developers.sun.com/techtopics/mobility/midp/articles/picture/ http://www.java-tips.org/java-me-tips/midp/capturing-video-on-j2me-devices.html

Related Discussions

Thread Thread Starter Forum Replies Last Post
pixel display Ariv_212 Symbian Media (Graphics & Sounds) 1 2006-01-19 04:05
Nokia N73 Problem !!!!!! bluebelle_88 Mobile Java Media (Graphics & Sounds) 5 2007-02-08 05:35
Nokia firmware MJPEG support mosoft Mobile Java General 3 2005-12-06 07:03
can nokia 6600 play mjpeg video?? idiot_s Symbian Media (Graphics & Sounds) 2 2005-11-22 05:49
Cannot get CameraApp to work ryanrst Symbian Tools & SDKs 7 2006-03-08 10:25

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditFurlTechnocratiMagnoliaTwitter  Share this page Share this page Invite a friend Invite a friend
E-mail Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us Regional websites: Chinese Japanese © 2008 Nokia 
RDF Facets: qfnZtopicQUqfnTopicZjavaQ qfnZtypeQUqfnTypeZCommunityContentQ qfnZtypeQUqfnTypeZWebpageQ qfnZtypeQUqfnTypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX
RDF Facets: qfnZuserE5FtagQSxcallX qfnZuserE5FtagQSxtelX