How to Determine if Android Device Supports USB host connections

public static final String FEATURE_USB_HOST was added in API level 12
Feature for getSystemAvailableFeatures() and hasSystemFeature(String).
The device supports connecting to USB devices as the USB host.
Constant Value: ""

1. Get a PackageManager Instance named myPackageManager.

2. Create a Boolean Variable named bolUSBHostSupported

3. Set the Minimum and Target SDK version  to 12 or greater. 

4. In the onCreate method, add the below code. This will return the USB host availability to a boolean named bolUSBHostSupported. It will then display a toast displaying the USB host availability of the device to the user.

bolUSBHostSupported = myPackageManager.hasSystemFeature(PackageManager.FEATURE_USB_HOST);
if (bolUSBHostSupported) {
Toast.makeText(this, "Device supports USB host", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(this, "Device does NOT support USB host!", Toast.LENGTH_LONG).show();

5. Compile and run!