Welcome to ARx API Docs
USB events
2min
in order to trigger events when the device is plugged in, use the following callback in your mainactivity override fun ondeviceattach() { super ondeviceattach() //add function here } in order to trigger an event when the device is unplugged use the following callback in your mainactivity override fun ondevicedetach() { super ondevicedetach() //add function here } here's an example of a snackbar ui feedback triggered by usb events override fun ondeviceattach() { super ondeviceattach() snackbar make( findviewbyid\<uvccameratextureview>(r id camera view), "device attached", snackbar length long ) show() } override fun ondevicedetach() { super ondevicedetach() snackbar make( findviewbyid\<uvccameratextureview>(r id camera view), "device detached", snackbar length long ) show() }