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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:41:15+00:00 2026-06-04T14:41:15+00:00

I am a new in developing area. I am trying to deal with the

  • 0

I am a new in developing area. I am trying to deal with the results after scanning a QR image. I am using the Zxing library. Right now only the content string can retrieve any data. But I want to scan a qr image to get the URL, telno and a string /text(which will be a numbered amount).
Could you pls show that with an example how can i get the data for telno and text both and store in strings. For now there is only one SCAN_RESULT which is stored in contents, but how can I get multiple results at a time from one QR code.

private void onQrActivityResult(int requestCode, int resultCode, Intent data) {
    // TODO Auto-generated method stub

    if (requestCode == 0) {
        if (resultCode == RESULT_OK) {
            Log.d(TAG, "onActivityResult " + resultCode);
            String contents = data.getStringExtra("SCAN_RESULT");
            String format = data.getStringExtra("SCAN_RESULT_FORMAT");
            paymentmsg.setText(contents);
            value_Qr = Float.parseFloat(contents);
            // Toast.makeText(this, format, Toast.LENGTH_SHORT).show();
            format = data.getStringExtra("SCAN_RESULT_FORMAT");
            // Handle successful scan
        }
        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-06-04T14:41:16+00:00Added an answer on June 4, 2026 at 2:41 pm

    You have to parse the result. The result is in the content string. parse the content string.
    If your qr code is contact

    if(contents.startsWith("BEGIN:")){
    
                        String[] tokens = contents.split("\n");
    
                        for (int i = 0; i < tokens.length; i++)
                            {
                            System.out.println(" "+tokens[i]);
    
                            if(tokens[i].startsWith("BEGIN:"))
                            {
                                Type= tokens[i].substring(6);
                            }
                            else if(tokens[i].startsWith("N:"))
                            {
                                 Name= tokens[i].substring(2);
                            }
                            else if(tokens[i].startsWith("ORG:"))
                            {
                                 Org= tokens[i].substring(4);
                            }
                            else if(tokens[i].startsWith("TEL:"))
                            {
                                 Tel= tokens[i].substring(4);
                            }
                            else if(tokens[i].startsWith("URL:"))
                            {
                                 Url= tokens[i].substring(4);
                            }
                            else if(tokens[i].startsWith("EMAIL:"))
                            {
                                 Email= tokens[i].substring(6);
                            }
                            else if(tokens[i].startsWith("ADR:"))
                            {
                                  Adr= tokens[i].substring(4);
                            }
                            else if(tokens[i].startsWith("NOTE:"))
                            {
                                  Note= tokens[i].substring(5);
                            }
    
                            }   
    

    if your qr scannrd is url

    else if(contents.startsWith("http://")||(contents.startsWith("www."))){
    
                        qr_url= contents;
    

    if your qr scanned is location qr

    else if(contents.startsWith("geo:")){
    
                        String delims = "[ , ?q= ]+";
                        String[] tokens = contents.split(delims);
    
                        for (int i = 0; i < tokens.length; i++)
                        {
                            System.out.println(" "+tokens[i]);
                            if(tokens[i].startsWith(" geo:"))
                            {
                                  qr_latitude= tokens[i].substring(4);
    
                            }
                        }
                        qr_latitude= tokens[0].substring(4);
                        qr_longitude=tokens[1];
                        geo_place=tokens[2];
    

    And so on you can parse the result. Its all about how you can parse a string.

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

Sidebar

Related Questions

I am developing one new area of a fairly large web application using MVC3
We're developing a new eCommerce website and are using NHibernate for the first time.
I'm new to developing for the iPhone and I'm using Core Data for my
I am new to developing UI in .net. Basically I am using a listview
I'm developing MVC3 project and have this situation. only at runtime. I'm using the
I am new to .NET programming. We are a team of 4 members developing
I'm configuring a new Developing Server that came with Windows 7 64bits. It must
I'm developing new web app with Struts2 framework, eclipse, and I've mapped the db
I'm new in developing iOS app. So I've recently faced a problem with localization
I am new to developing code in iPhone, and I want to search some

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.