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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:58:37+00:00 2026-06-07T08:58:37+00:00

I am working on phonegap android application. this is entirely new to me. I

  • 0

I am working on phonegap android application. this is entirely new to me. I want develop an application with barcode scanner. that too it might uses the intent call. That means the barcode intent is called from the java code and once the scanning over the result should be displayed in HTML page.

  • 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-07T08:58:38+00:00Added an answer on June 7, 2026 at 8:58 am

    This code from a phonegap plugin works as expected:

        public PluginResult execute(String arg0, JSONArray arg1, String arg2) {
            Intent intent = new Intent("com.google.zxing.client.android.SCAN");
            intent.setPackage("com.google.zxing.client.android");
        //  intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
            ctx.startActivityForResult(this, intent, 0);
    
            return new PluginResult(PluginResult.Status.OK);
        }
    
        public void onActivityResult(int requestCode, int resultCode, Intent intent) {
            if (requestCode == 0) {
                Log.i("Cordova", "result " + resultCode);
                if (resultCode == Activity.RESULT_OK) {
                    String contents = intent.getStringExtra("SCAN_RESULT");
                    String format = intent.getStringExtra("SCAN_RESULT_FORMAT");
    
                    Log.i("Cordova", "contents " + contents + ", format " + format);
                    // Handle successful scan
                } else if (resultCode == Activity.RESULT_CANCELED) {
                    // Handle cancel
                    Log.i("Cordova", "scan cancelled");
                }
            }
        }
    

    Tested with Cordova 1.7 and Android 2.2

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

Sidebar

Related Questions

I am working on an android application that uses phonegap/cordova. This app uses a
I have Phonegap's Facebook plugin working perfectly within my Android app. This plugin uses
I'm working on an android tablet application using phonegap in which i need to
I developed an application in the phonegap which is working good in the android
I am working on PhoneGap for android and it use cordova-1.5.0.jar, I want to
I'm working on an application that will be available for Android and iPhone. The
I have developed android phonegap application using phonegap 1.9.0.Its was working fine in android
I have started to working with phoneGap application for android. I followed the steps
Hai i develop an application in android phoneGap.I used html css for Designing Purpose
I'm working on my first phonegap application, an android based simple form app. My

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.