Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to Retrieve product id from bar code?
    primarykey
    data
    text
    <p>I have used the same way of Zxing Intent to open scanner from my application. But my application just opens scanner and does nothing. Also, I am getting some FileNotfoundException. </p> <p>Do I have to add any permission in manifest?</p> <p>This is my class where I use Intent:</p> <pre><code>public class BarCodes extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button ok; ok=(Button) findViewById(R.id.b1); ok.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub Intent intent = new Intent("com.google.zxing.client.android.SCAN"); intent.setPackage("com.google.zxing.client.android"); intent.putExtra("SCAN_MODE","QR_CODE_MODE"); startActivityForResult(intent, 0); } }); System.out.println("SSSSSSSSSSSSS"); } public void onActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == 0) { if (resultCode == RESULT_OK) { String contents = intent.getStringExtra("SCAN_RESULT"); System.out.println("contentsssssssssssssssssssssss" + contents); String format = intent.getStringExtra("SCAN_RESULT_FORMAT"); // Handle successful scan } else if (resultCode == RESULT_CANCELED) { // Handle cancel } } } } </code></pre> <p>Also LogCat is here:</p> <pre><code>java.lang.RunTimeException:Unable to instantiate activity componentInfo{com.pkg.BarCode...} caused by : java.lang.classNotFoundException:com.pkg.Scan in loader dalvik.System Loader… </code></pre> <p>What might be the problem?? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload