I use the same key for HasExtra() and GetExtra().
HasExtra() retuens True but GetExtra() returns null, that is MacObject is null.
Any advice?
HasExtra() retuens True but GetExtra() returns null, that is MacObject is null.
Any advice?
B4X:
Sub BroadCastReceiver_OnReceive (Action As String, i As Object)
Dim intnt As Intent
intnt = i
Log(intnt)
Log(intnt.ExtrasToString)
Dim MacObject as Object
If (intnt.HasExtra("android.bluetooth.device.extra.DEVICE")) Then
MacObject = intnt.GetExtra("android.bluetooth.device.extra.DEVICE")
Log ("MacObject: " & MacObject)
End If
End Sub
Last edited: