public void onClick(View v) { // TODO Auto-generated method stub detailList(v); try { //start the scanning activity from the com.google.zxing.client.android.SCAN intent Intent intent = new Intent(ACTION_SCAN); intent.putExtra("SCAN_MODE", "PRODUCT_MODE"); startActivityForResult(intent, 0); } catch (ActivityNotFoundException anfe) { //on catch, show the download dialog showDialog(Primary.this, "No Scanner Found", "Download a scanner code activity?", "Yes", "No").show(); } } }); } and this is where i need help, to show the scanned values in editText <pre lang="java"> public void onActivityResult(int requestCode, int resultCode, Intent intent) { if (requestCode == 0) { if (resultCode == RESULT_OK) { //get the extras that are returned from the intent String contents = intent.getStringExtra("SCAN_RESULT"); String format = intent.getStringExtra("SCAN_RESULT_FORMAT"); Toast toast = Toast.makeText(this, "Content:" + contents + " Format:" + format, Toast.LENGTH_LONG); toast.show(); } }
getStringExtra
putExtra
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)