Skip to content

Commit 2c206b4

Browse files
committed
Remove QR code scan beep
1 parent d00c62f commit 2c206b4

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

app/src/main/java/tech/httptoolkit/android/QRScanActivity.kt

-4
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ import android.util.Log
77
import android.view.KeyEvent
88
import com.google.zxing.BarcodeFormat
99
import com.google.zxing.ResultPoint
10-
import com.google.zxing.client.android.BeepManager
1110
import com.journeyapps.barcodescanner.BarcodeCallback
1211
import com.journeyapps.barcodescanner.BarcodeResult
1312
import com.journeyapps.barcodescanner.DecoratedBarcodeView
1413
import com.journeyapps.barcodescanner.DefaultDecoderFactory
1514

1615
class QRScanActivity : Activity() {
1716
private var barcodeView: DecoratedBarcodeView? = null
18-
private var beepManager: BeepManager? = null
1917
private var lastText: String? = null
2018

2119
private val callback: BarcodeCallback = object : BarcodeCallback {
@@ -30,7 +28,6 @@ class QRScanActivity : Activity() {
3028
Log.i("QRScanActivity", "Scanned: $resultText")
3129

3230
if (lastText!!.startsWith("https://android.httptoolkit.tech/connect/")) {
33-
beepManager!!.playBeepSoundAndVibrate()
3431
setResult(RESULT_OK, Intent().putExtra(IntentExtras.SCANNED_URL_EXTRA, lastText))
3532
finish()
3633
}
@@ -48,7 +45,6 @@ class QRScanActivity : Activity() {
4845
barcodeView!!.initializeFromIntent(intent)
4946
barcodeView!!.decodeContinuous(callback)
5047
barcodeView!!.setStatusText("Scan HTTPToolkit QR code to connect")
51-
beepManager = BeepManager(this)
5248
}
5349

5450
override fun onResume() {

0 commit comments

Comments
 (0)