Code example for UsbDevice

Methods: getDeviceName

0
	public void usbDetached(Intent intent) {
		Log.d(TAG,"usbDetached");
 
		deviceAttached = false;
		UsbDevice device = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
		String deviceName = device.getDeviceName();
		if (mUsbDevice != null && mUsbDevice.equals(deviceName)) {
			Log.d(TAG, "USB interface removed");
			setUSBInterface(null, null); 
		} 
	} 
 
    public void setPermissionIntent(PendingIntent pi) {
    	mPermissionIntent = pi;
    } 
 
	public boolean Open() { 
		boolean ret = false;
		 
		Log.d(TAG,"Open");