chore: log scan failures

This commit is contained in:
Fabian Christoffel
2023-06-16 10:44:30 +02:00
parent 13729b399c
commit 52bd56ec32

View File

@@ -75,7 +75,7 @@ class MainActivity : AppCompatActivity() {
} }
} }
private var scanResults: MutableMap<String, ScanResult> = HashMap(); private var scanResults = HashMap<String, ScanResult>();
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false) WindowCompat.setDecorFitsSystemWindows(window, false)
@@ -204,6 +204,10 @@ class MainActivity : AppCompatActivity() {
) )
} }
override fun onScanFailed(errorCode: Int) {
Log.e("ScanCallback", "onScanFailed: code $errorCode")
}
} }
private fun getDisplayScanResults(): List<ScanResult> { private fun getDisplayScanResults(): List<ScanResult> {