Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am trying to learn Android USB Host/Accessory connection. I read android devices can act usb host or usb accessory. Therefore I create two project one of them usb host project, other usb accessory project. I installed these projects to two different android devices. One of them has usb host(Device A) project, other has usb accessory(Device B) project.

My question is, I can connect with usb host project to Device B. I can see all information about device. But In accessory project( Device B) i can not see any thing about device A.

manager.getAccessoryList() always return null. My usb accessory project code is here.

    UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE);

    for (UsbAccessory accessory : manager.getAccessoryList()) {
        String list = " DESCRIPTION : " + accessory.getDescription() + " MODEL : " + accessory.getModel() + " MANUFACTURER : " + accessory.getManufacturer() + " SERIAL : " + accessory.getSerial();
        Toast.makeText(this, list, Toast.LENGTH_LONG).show();
    }
share|improve this question
I have same problem... – SudiptaforAndroid yesterday

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.