com.google.zxing.client.android.BeepManager Java Examples
The following examples show how to use
com.google.zxing.client.android.BeepManager.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ScannerActivity.java From privacy-friendly-qr-scanner with GNU General Public License v3.0 | 6 votes |
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_scanner); SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); permissionNeededExplanation = findViewById(R.id.activity_scanner_permission_needed_explanation); barcodeScannerView = findViewById(R.id.zxing_barcode_scanner); barcodeScannerView.getBarcodeView().addStateListener(stateListener); beepManager = new BeepManager(this); if (!getIntent().getBooleanExtra(Intents.Scan.BEEP_ENABLED, true) && preferences.getBoolean("pref_enable_beep_on_scan", true)) { beepManager.setBeepEnabled(false); } if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { initScanWithPermissionCheck(); } else { initScan(); } }
Example #2
Source File: BarCodeScannerFragment.java From zxingfragmentlib with Apache License 2.0 | 5 votes |
@Override public void onCreate(Bundle icicle) { super.onCreate(icicle); hasSurface = false; inactivityTimer = new InactivityTimer(getActivity()); beepManager = new BeepManager(getActivity()); ambientLightManager = new AmbientLightManager(getActivity()); PreferenceManager.setDefaultValues(getActivity(), R.xml.preferences, false); }