Scan QR code barcode

Scan QR code barcode

Source code introduction: Scan QR code barcode, simple and practical, worth learning from

Source code effect:

Source code snippet:

  1. /**
  2. * Process the scan results
  3. * @param result
  4. * @param barcode
  5. */  
  6. public   void handleDecode(Result result, Bitmap barcode) {
  7. inactivityTimer.onActivity();
  8. playBeepSoundAndVibrate();
  9. String resultString = result.getText();
  10. if (resultString.equals( "" )) {
  11. Toast.makeText(MipcaActivityCapture. this , "Scan failed!" , Toast.LENGTH_SHORT).show();
  12. } else {
  13. Intent resultIntent = new Intent();
  14. Bundle bundle = new Bundle();
  15. bundle.putString( "result" , resultString);
  16. bundle.putParcelable( "bitmap" , barcode);
  17. resultIntent.putExtras(bundle);
  18. this .setResult(RESULT_OK, resultIntent);
  19. }
  20. MipcaActivityCapture. this .finish();
  21. }

Download address: http://download..com/data/2111749

<<:  Audio

>>:  High imitation Baidu Nuomi

Recommend

Follow these 6 UI background design trends to make your interface more colorful

Whether designing a web page or a poster, backgro...

What is quantum artificial intelligence? (Part 1)

Produced by: Science Popularization China Author:...

AR and VR: The inevitable limitations of alternative realities

Despite significant advances, augmented reality (...

Humans learn throughout their lives, but the brain can only store 4GB?

In life, we often hear an inspiring saying, "...

@Pregnant Mom: Extremely unfriendly! Beware of Toxoplasma gondii in "cats"

Toxoplasma gondii is an intracellular parasite. L...

Summary of common problems in the App Store listing review process

1. Introduction to iOS APP Listing Process Apply ...

The brand marketing and communication code of "the pride of domestic products"

Not long ago, the Xinjiang cotton incident caused...

14 seconds! China's own CPU + operating system achieves a leap forward

1 second, 2 seconds, 3 seconds... Several "c...