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

  • SEARCH
  • Home
  • 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 8594209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:08:53+00:00 2026-06-12T00:08:53+00:00

I am developing an application and a part of that involves QR scanning. After

  • 0

I am developing an application and a part of that involves QR scanning. After a lot of research I was successful in developing a stand alone scanning app. When a user opens the scanner and scans a particular QR code, he gets some value, e.g. a URL. Now I want to store the data acquired on scanning into my android code. Can anybody help me how do i go about it?

From what I can see, I need to work with capture activity class of Zxing. However, I am not sure what exactly needs to be done. All the blogs that I read online direct me to use an Intent to call barcode scanning. However, the purpose of my app is not to just scan the products. I need to store the information of the scanned product and later use it for some other purpose.

Kindly help me.

Thanks,
Amey

Here is the code from Zxing.. this is the main activity that deals with all the scanning. to what i have learnt by reading online, i need to capture the data returned when a barcode is scanned..

public void onActivityResult(int requestCode, int resultCode, Intent intent) { 
    if (resultCode == RESULT_OK) { 
        if (requestCode == HISTORY_REQUEST_CODE) { 

            int itemNumber = intent.getIntExtra(Intents.History.ITEM_NUMBER, -1); 

            if (itemNumber >= 0) { 
                HistoryItem historyItem = historyManager.buildHistoryItem(itemNumber);             
                decodeOrStoreSavedBitmap(null, historyItem.getResult()); 
            } 
        }
    } 
} 


if (Intents.Scan.ACTION.equals(action)) { // Scan the formats the intent requested, and   return the result to the calling activity 
    source = IntentSource.NATIVE_APP_INTENT; 

    decodeFormats = DecodeFormatManager.parseDecodeFormats(intent); 
    if (intent.hasExtra(Intents.Scan.WIDTH) && intent.hasExtra(Intents.Scan.HEIGHT)) {

        int width = intent.getIntExtra(Intents.Scan.WIDTH, 0); 
        int height = intent.getIntExtra(Intents.Scan.HEIGHT, 0); 

        if (width > 0 && height > 0) { 
            cameraManager.setManualFramingRect(width, height); 
        } 
    }
}
  • 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-06-12T00:08:54+00:00Added an answer on June 12, 2026 at 12:08 am

    Hi I have finally found an answer to this question. It was not that difficult as i thought (since Zxings code has been written by Zxing team and not by me.. anyway..)

    So if you want to store the data captured by qr scanner(provided by Zxing) in your android code (for whatever purpose.. in my case i want to send this data to the web server.. anyway..) then you just need to modify the following function.. here is where you get the result of the scanned activity..

    public void handleDecode(Result rawResult, Bitmap barcode) {
    inactivityTimer.onActivity();
    lastResult = rawResult;
    Log.d("last result", "checking if raw result is what i expect");
    System.out.println(lastResult);
    ResultHandler resultHandler = ResultHandlerFactory.makeResultHandler(this, rawResult);
    historyManager.addHistoryItem(rawResult, resultHandler);
    }
    

    I have added Log and print statements to check if i am getting the correct result. and yes, it did give me a correct answer..
    you can find this in CaptureActivity class.

    @triggs: thanks for your help! You did get me on a right track 🙂

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

Sidebar

Related Questions

Folks, We are developing an application that is part a downloadable WinForms application that
I am developing an application using Eclipselink and as part of the app I
I am developing an application using twitter api and that involves writing a method
I am developing an application that accepts user-defined XPath expressions and employs them as
i'm developing a computer vision application for Android. That work involves getting camera frames
I'm developing a Flex 2 application, and I noticed that part of the library
I'm currently re-developing a fairly large-scale PHP web application. Part of this redevelopment involves
I am developing an application and part of the design is there is a
I'm developing a simple application to manage the operational part of a business using
i'm developing a windows form application.in the form, the left part is a tree

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.