To my application i have a barcode-scanner connected as a Bluetooth keyboard. It works fine in the first screen on my app, but if i reset the activitys views with Activity.RemoveAllViews and draw new views the Activity_KeyPress isnt firing anymore.
I have tried to add Activity.RequestFocus after redrawing all the views.
Sub Activity_Create(FirstTime As Boolean)
Activity.RemoveAllViews
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event
Log(KeyCode)
Return True
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.RemoveAllViews
End Sub
Sub Activity_KeyPress (KeyCode As Int) As Boolean 'Return True to consume the event
Log(KeyCode)
Return True
End Sub
Activiyt_KeyPress event is only raised if the key press is not already handled by a different view. Maybe the focus has changed and now another view is consuming this event?