Android Marshmallow and above version can't trigger USB_DETACHED
<p>I'm confused on why <code>UsbManager.ACTION_USB_ACCESSORY_DETACHED</code> from <a href="https://developer.android.com/guide/topics/connectivity/usb/accessory.html" rel="nofollow noreferrer">USB Accessory</a> doesn't triggered in <strong>Marshmallow</strong> and <strong>Nougat</strong> versions but when using pre marshmallow versions I can trigger the broadcast. </p>

<p>My codes are based on the documentation in USB Accessory link above so no need to paste my code, the only thing is it doesn't trigger when using Marshmallow and up versions of android.</p>

<p>Thanks in advance</p>