Android Question usb entery

yaniv hanya

Active Member
Licensed User
Is there a way to determine whether a device such as a disk or key is connected to the device usb entery?


B4X founder
Staff member
Licensed User
Longtime User
Sub Process_Globals
   Private manager As UsbManager 'USB library
End Sub

Sub Globals
End Sub

Sub Activity_Create(FirstTime As Boolean)
   If FirstTime Then
   End If
End Sub

Sub Activity_Click
   If manager.GetDevices.Length > 0 Then
       Log("Something is connected")
   End If
End Sub
Finding the device type will require asking the user for permission and will make it a bit more complicated.
Upvote 0