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 7041559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:03:38+00:00 2026-05-28T02:03:38+00:00

I am making the qr-code reader app,on button click i have opened the camera

  • 0

I am making the qr-code reader app,on button click i have opened the camera view.
Then depend on their result it will navigate to next screen but second time when i open the screen it gives me the error CamController:get res failed: _camConfigHandle is invalid.

EDITED:
I have try this code for remove the scanner and move to next screen

 UiApplication.getUiApplication().invokeLater(new Runnable() {
                            public void run() {
                                try {
                                    _scanner.getPlayer().stop();

                                } catch (MediaException e) {
                                    e.printStackTrace();
                                }
                                _scanner.getPlayer().close();
                                System.out.println("closeScan");
                                _scanner.getPlayer().deallocate();
                                System.out.println("deallocateScan");
                                System.out.println("deleteAllScan");
                                UiApplication.getUiApplication().popScreen(_barcodeScreen);
                            }
                        });

and this is my code to scan

 private void scanBarcode() {

        if (_barcodeScreen == null) {
            Hashtable hints = new Hashtable();
            Vector formats = new Vector();
            formats.addElement(BarcodeFormat.QR_CODE);
            hints.put(DecodeHintType.POSSIBLE_FORMATS, formats);
            hints.put(DecodeHintType.TRY_HARDER, Boolean.TRUE);
            BarcodeDecoder decoder = new BarcodeDecoder(hints);
            try {
                _scanner = new BarcodeScanner(decoder, new MyBarcodeDecoderListener());
                _barcodeScreen = new MyBarcodeScannerViewScreen(_scanner);

            } catch (Exception e) {
             System.out.println("error="+e.toString());
                return;
            }
        }

        try {
            _scanner.startScan();
            UiApplication.getUiApplication().pushScreen(_barcodeScreen);
        } catch (Exception e) {
             System.out.println("error1="+e.toString());
        }

    }

Thanks in Advance.

  • 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-28T02:03:39+00:00Added an answer on May 28, 2026 at 2:03 am

    Are you closing the camera properly? please use the following method and adapt it to do similar things to close the camera properly

    //close the scanner
    public void closeScanner()
    {  
    if (this.player != null) {
      try {
        this.player.stop();
      } catch (MediaException e) {
          //handle exception
        Log.Error("Exception stopping player: " + e);
      }
      //de allocate and close player
      this.player.deallocate();
      this.player.close();
    }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code making a GET request on a URL: $('#searchButton').click(function() {
The following code is making my app crash at line 3 without an error
I have some code which I am making available via RMI. If my program
I am making an app that will make several HttpWebRequest objects and downloading my
I am making a Rails 3.1 app and have a signup form that was
I would like to start making code patches to Rails. Are there any good
I'm not talking about making portable code. This is more a question of distribution.
I'm looking for strategies and articles on making Carbon code 64-bit ready. Carbon for
I am wondering if there is any technique out there for making HTML code
I'm working with some example java code for making md5 hashes. One part converts

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.