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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:35:37+00:00 2026-06-11T02:35:37+00:00

When I run the app , It is force closed.How can QR code is

  • 0

When I run the app , It is force closed.How can QR code is scanning?I need to implement the bar-code scanner in my android application.Here I got the following error on my console.How can clear this error?…Here the zxing(code.jar) jar file is added also.
I have used below code:

 public class Main extends Activity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    HandleClick hc = new HandleClick();
    findViewById(R.id.butQR).setOnClickListener(hc);
    findViewById(R.id.butProd).setOnClickListener(hc);
    findViewById(R.id.butOther).setOnClickListener(hc);
  }
  private class HandleClick implements OnClickListener{
    public void onClick(View arg0) {
      Intent intent = new Intent("com.google.zxing.client.android.SCAN");
      switch(arg0.getId()){
        case R.id.butQR:
          intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
        break;
        case R.id.butProd:
          intent.putExtra("SCAN_MODE", "PRODUCT_MODE");
        break;
        case R.id.butOther:
          intent.putExtra("SCAN_FORMATS", "CODE_39,CODE_93,CODE_128,DATA_MATRIX,ITF,CODABAR");
        break;
      }
      startActivityForResult(intent, 0);    //Barcode Scanner to scan for us
    }
  }
  public void onActivityResult(int requestCode, int resultCode, Intent intent) {
    if (requestCode == 0) {
      TextView tvStatus=(TextView)findViewById(R.id.tvStatus);
      TextView tvResult=(TextView)findViewById(R.id.tvResult);
      if (resultCode == RESULT_OK) {
        tvStatus.setText(intent.getStringExtra("SCAN_RESULT_FORMAT"));
        tvResult.setText(intent.getStringExtra("SCAN_RESULT"));
      } else if (resultCode == RESULT_CANCELED) {
        tvStatus.setText("Press a button to start a scan.");
        tvResult.setText("Scan cancelled.");
      }
    }
  }
}

my console shows following error:

      09-06 00:56:36.198: D/AndroidRuntime(5417): Shutting down VM
      09-06 00:56:36.198: W/dalvikvm(5417): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
      09-06 00:56:36.208: E/AndroidRuntime(5417): FATAL EXCEPTION: main
      09-06 00:56:36.208: E/AndroidRuntime(5417): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.google.zxing.client.android.SCAN (has extras) }
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at android.app.Activity.startActivityForResult(Activity.java:2817)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at biz.tekeye.scanbarcode.Main$HandleClick.onClick(Main.java:33)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at android.view.View.performClick(View.java:2408)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at android.view.View$PerformClick.run(View.java:8816)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at android.os.Handler.handleCallback(Handler.java:587)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at android.os.Handler.dispatchMessage(Handler.java:92)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at android.os.Looper.loop(Looper.java:123)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at android.app.ActivityThread.main(ActivityThread.java:4627)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at java.lang.reflect.Method.invokeNative(Native Method)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at java.lang.reflect.Method.invoke(Method.java:521)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
      09-06 00:56:36.208: E/AndroidRuntime(5417):   at dalvik.system.NativeStart.main(Native Method)
      09-06 00:56:38.359: I/Process(5417): Sending signal. PID: 5417 SIG: 9
  • 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-11T02:35:39+00:00Added an answer on June 11, 2026 at 2:35 am

    Just install an app that can handle that intent (Zxing).

    Also, catch that exception and prompt the user to install said application.

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

Sidebar

Related Questions

I'm testing my application as grails run-app. I have read How to remove app
I got force close error when opening my install app, herewith i enclosed my
I am new to android can someone help me please, following is the code
The problem that I'm having is when running my android app, if I run
When i run it i get an immediate force close. I can never understand
I am facing a force close problem when i am executing my android app.
This code is not working.. Can anyone help me out. when i had run
I have this code: import android.app.Activity; import android.os.Bundle; import android.os.CountDownTimer; import android.widget.TextView; public class
when i run app in the IPhone simulater 5.1 the default image loads up
I am trying to run our App on Mac Lion. App is built on

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.