Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4122402
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:28:37+00:00 2026-05-20T23:28:37+00:00

Here is my problem : I would like to create a specific component with

  • 0

Here is my problem : I would like to create a specific component with the camera and an image representing a target overlaying the VideoControl’s view.

First I would like to display the camera in a MainScreen with a TitleBar.

Here is my code :

 public class ScanScreen extends MainScreen {
private ScanScreen() 
    {
        super();

        this.vfm = new VerticalFieldManager(Field.FIELD_VCENTER);

        this.controller = new ScanController(this);
        //Initialize the player.
        try
        {
            this.player = javax.microedition.media.Manager.createPlayer("capture://video?encoding=jpeg&width=1024&height=768");
            this.player.realize();
            this.player.prefetch();
            this.videoControl = (VideoControl) this.player.getControl("VideoControl");

            if(this.videoControl != null)
            {
                // Initialize the field where the content of the camera shall be displayed.
                Field videoField = (Field) this.videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");

                // Display the video control.
                this.videoControl.setDisplayFullScreen(true);
                this.videoControl.setVisible(true);

                // Start the player.
                this.player.start();

                // Add the video field to the main screen.
                if(videoField != null)
                {
                    this.vfm.add(videoField);
                }
                else
                {
                    LabelField sorry = new LabelField("Sorry, we cannot use camera right now.");
                    this.vfm.add(sorry);
                }
            }
        }
        catch(Exception e)
        {
            Dialog.alert(e.toString());
        }

        // TODO : the camera is hiding the title bar
        this.setTitle("Title");
        this.add(this.vfm);
    }
}

The first problem is that the view of the VideoContol is hiding my title bar. How can I fix that ?

The second thing : I have a specific rectangular image representing a target with transparency which I would like to displaying over the view of the VideoControl.

I first tried to create a new class extending Field returning the dimensions of this image and make the image displayed in the paint method (this class is “mypackage.CameraField”). Then I tried to instantiate my VideoField with the name of my new class “mypackage.CameraField” in the initDisplayMode ; but the created videoField is null.

So, is there a solution to create that kind of behaviour ? I am thinking about the native application “Video Camera” in the “Multimedia” folder that displays a VideoControl in a specific area of the screen.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:28:38+00:00Added an answer on May 20, 2026 at 11:28 pm

    Ok, it seems that is not possible to customize the VideoControl in any way. We must use it in fullscreen and cannot display anything on it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A bit of a complex problem to describe here: I would like to have
Here's my problem: I have do create a menu/list of actions (which would be
I would like to create an exception handler for the specific case that happens
Here is the problem: I have a Silverlight application where we would like to
I suppose similar problem would have been discussed here, but I couldn't find it.
I have a problem here im trying to upload a file first time it
I'm having a problem to create a generic View to represent NotFound pages. The
If you would like to get to the point, here is my question: Is
First this question isn't about trying to solve a specific problem. As newcomer to
I'm trying to create a generic, reusable view, that looks like a lined notepad.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.