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

The dog's "head tilt" is not just for cuteness! There are also these reasons...

This article was reviewed by Zhao Xumao, a young ...

Detailed explanation of common methods of Android audio acquisition

Preface Android Audio Collection There are genera...

Sony's failure in China: Do you really think you have the "Great Law"?

Yesterday, the news of Sony Mobile's massive ...

Tips for building a Tik Tok e-commerce live streaming feed plan!

With the continuous development of the Internet i...

Golmud SEO Training: Keyword ranking is unstable, how can SEOer recover?

Website optimization is increasingly favored by e...