4

How can i detect the plug and unplug of Ethernet cable and USB devices(Any device like pendrive) in Android TV. Is there any receiver for that as like internet connectivity?

I need to check for by TVBox app.

Solution:

Got Solution for ETHERNET - can be checked by TYPE_ETHERNET in ConnectivityManager

but Still USB remaining

Arth Tilva
  • 2,496
  • 22
  • 40

1 Answers1

1

Ethernet

Check out ConnectivityManager for the the connection type TYPE_ETHERNET

USB

Check out UsbManager for the broadcast ACTION_USB_ACCESSORY_ATTACHED.

Kyle Venn
  • 4,597
  • 27
  • 41