Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stefan Zabka
Companion App Android
Commits
3c5580b1
Commit
3c5580b1
authored
Aug 21, 2019
by
Andreas Schildbach
Browse files
ScannerFragment.kt: Better debug output for BOND_STATE_CHANGED broadcast.
parent
fd6ac67c
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/de/ccc/events/badge/card10/scanner/ScannerFragment.kt
View file @
3c5580b1
...
...
@@ -65,7 +65,9 @@ class ScannerFragment : Fragment() {
val
receiver
=
object
:
BroadcastReceiver
()
{
override
fun
onReceive
(
context
:
Context
,
intent
:
Intent
)
{
System
.
out
.
println
(
"===== onReceive "
+
intent
)
val
bondState
=
intent
.
extras
!!
.
getInt
(
BluetoothDevice
.
EXTRA_BOND_STATE
)
val
device
=
intent
.
extras
!!
.
getParcelable
(
BluetoothDevice
.
EXTRA_DEVICE
)
as
BluetoothDevice
?
System
.
out
.
println
(
"=== onReceive ${intent.action} ${if (bondState == BluetoothDevice.BOND_NONE) "
NONE
" else if (bondState == BluetoothDevice.BOND_BONDING) "
BONDING
" else if (bondState == BluetoothDevice.BOND_BONDED) "
BONDED
" else bondState} ${device}"
)
listAdapter
.
notifyDataSetChanged
()
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment