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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:39:27+00:00 2026-05-25T03:39:27+00:00

I am rather new to ZXing and has been exploring their API. I have

  • 0

I am rather new to ZXing and has been exploring their API.
I have seen Using ZXing to create an android barcode scanning app and getting scan result when using zxing?

I understand that the details of the scan result is in the string “contents”. How do I extract out the details? Looking at the QR generator, http://zxing.appspot.com/generator/ there are many fields like name, company and phone number. How do i extract these details?

I would need something like

//String extractedName = contents.getName() 

Sorry, I am very new to this. I would appreciate if someone can provide me detailed steps. Thanks.

TestActivity

public Button.OnClickListener mScan = new Button.OnClickListener() {
public void onClick(View v) {
    IntentIntegrator.initiateScan(MenuActivity.this);
}
};


public void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == 0) {
    if (resultCode == RESULT_OK) {
        String contents = intent.getStringExtra("SCAN_RESULT");
        String format = intent.getStringExtra("SCAN_RESULT_FORMAT");
        // Handle successful scan
        //How to get name from contents?

    } else if (resultCode == RESULT_CANCELED) {
        // Handle cancel
    }
}
}
  • 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-25T03:39:28+00:00Added an answer on May 25, 2026 at 3:39 am

    I have successfully extracted it. The scanned results is inside the string ‘contents’. Lets say you scanned a code with name and id. The string will contain “name” “id” separated by a whitespace. You can use a for loop to handle it.

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

Sidebar

Related Questions

I'm rather new to Django and I'm using Django 1.0. I have this: forms.py:
I'm rather new to MS Build and have been reviewing many of the built
I'm rather new to C and have recently been working on making a simple
I'm currently using Monodroid to develop an android app. I'm rather new to phone
Im rather new to python but I have been attemping to learn the basics.
I am rather new to socket programming but here goes nothing. I have been
I'm rather new to programming and have recently been introduced to the topic of
I'm rather new to jquery so this may be the issue. I have a
I am rather new to JPA 2 and it's CriteriaBuilder / CriteriaQuery API: CriteriaQuery
I'm rather new to ClearCase but have searched through a lot of solutions to

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.