is there is any possibility to check what are the external hardware where connected in computer
Getting the status of each hardware is online or offline
You may have to take help of linux kernel so I think just execute one simple command that can give you list of devices connected to your device
Here it is
Process process = Runtime.getRuntime().exec("cat /proc/devices");
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
or you can use udevinfo I dont know in details about it but google is there for you
If you have honeycomb or above use the USB Manager Service
UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);
HashMap<String, UsbDevice> devices = manager.getDeviceList();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With