In Huawei Glory Box Verification Openni program, found Orbbec 3d camera has been unable to use, has been stuck in the device can not find the prompt. Start from the following 2 aspects of verification: 1. Verify that the Openni itself comes with the Simpleread program to see if it reads normally to the device information and depth diagram. 2. Verify the android Layer USB permissions control issue.
After verifying that Openni's own executable program of C + + is found, it can read the device information and depth diagram normally. It is speculated that the drive of Orbbec 3d and this part of Openni is not a problem. The problem may be the USB permissions on the Android layer and get the device information for this piece.
Usbmanager usbmanager= (Usbmanager) Getsystemservice (Context.usb_service); HashMap list=usbmanager.getdevicelist (); LOG.V ("Xcy", "List Size" +list.size ());
Verified to find that Devicelist has been returned empty through Usbmanager. Find the following solution by searching.
USB device information can not be obtained with usbmanager.getdevicelist, the following processing is required to obtain the USB device information
To enable USB host API should add a file named
Android.hardware.usb.host.xmland containing the following lines:
<permissions> <feature name= "Android.hardware.usb.host"/></permissions>
Into folder
/system/etc/permissions
In that folder find file named
Handheld_core_hardware.xml or Tablet_core_hardware.xml
and add
<feature name= "Android.hardware.usb.host"/>
After you modify the file, push to the system, and then restart the device. You can use it.
Android USB API gets device information failure issue