Android Make USB Accessory can only select "use USB for charging only"

66 Views Asked by At

I created an app to enable communication between Android and Arduino (Arduino as USB Host). The app is working as expected, but when I change USB option from 'charging only' to MTP, the app is closed.
Knowing that USB for charging is the default action, is it possible to keep the option for that. OR is there any way to keep the app running even if USB configuration changed?

0

There are 0 best solutions below