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

32 amazing cross-sectional images revealing the unknown side of things

There is an old saying that goes, "It is eas...

Understand the growth gossip model of user operations in one article!

The Growth Gossip Model can be described in one s...

Great Wall Motors' WEY brand sales plummeted, and CEO Yan Si resigned

On October 29, Great Wall Motors announced that M...

The process of placing Toutiao information flow advertisements!

A good advertisement can bring unexpected marketi...

Long comment: iPhone 6 only supports mobile TDD 4G networks

Recently, a group of "bloody" news sprea...

You must know the rules of Tencent social advertising!

Tencent social advertising has become one of the ...

10 eye-catching changes in Windows 10 Build 15007: Game mode is on full blast

Entering the Year of the Rooster, Microsoft seems...

When doing activities, you must make clear these 3 points

Through the collation and analysis over the past ...

iQIYI Product Analysis Report

Based on the conclusions drawn from the previous ...

From the ground to the sky, maybe this is the future of mobile phones?

Introduction In ancient times, people basically c...