I have a BroadcastReceiver with this filters:
IntentFilter filters = new IntentFilter(AllReceiver.ACTION_USB_PERMISSION);
filters.addAction("android.hardware.usb.action.USB_ACCESSORY_ATTACHED");
filters.addAction("android.hardware.usb.action.USB_ACCESSORY_DETACHED");
mContext.getApplicationContext().registerReceiver(mAllReceiver, filters);
I need to communicate later with an arduino board in android (write/receive bytes), but I don't have one at the moment. Is there a way to use a PC emulator or something as an arduino board? How? Thanks