Android Question (solved, with 1 question) Intent for connected USB-keyboard

Discussion in 'Android Questions' started by Filippo, May 15, 2015.

  1. Filippo

    Filippo Expert Licensed User

    Hi all,

    Is there an intent-filter that tells me if a USB-keyboard is connected?

    I found this, but does not say that it is a USB keyboard.
    Last edited: May 16, 2015
  2. Filippo

    Filippo Expert Licensed User

    Now I know how to do that.
    For me, it's enough!
    If StartingIntent.Action="android.hardware.usb.action.USB_DEVICE_ATTACHED" Then
    ToastMessageShow("USB_DEVICE_ATTACHED:" & StartingIntent.GetExtra("mManufacturerName"), True)
    Else If StartingIntent.Action="android.hardware.usb.action.USB_DEVICE_DETACHED" Then
    ToastMessageShow("USB_DEVICE_DETACHED:" & StartingIntent.GetExtra("mManufacturerName"), True)
    End If
    Syd Wright likes this.
  3. Filippo

    Filippo Expert Licensed User

    Log("USB_DEVICE_DETACHED:" & StartingIntent.ExtrasToString))
    The line shows approximately:
    and this line
    Log(StartingIntent.GetExtra("mManufacturerName")) -> null
    How can I get the "mManufacturerName" ?