This class manages USB device connections. More...
#include "SuperpoweredAndroidUSB.h"
Static Public Member Functions | |
static void | destroy () |
Destroys the Superpowered Android USB system. Call this only once in an app's lifecycle. Don't initialize/destroy AndroidUSB more than once. More... | |
static void | initialize (void *clientdata, AndroidUSBAudioDeviceConnectedCallback audioConnectedCallback, AndroidUSBAudioDeviceDisconnectedCallback audioDisconnectedCallback, AndroidUSBMIDIDeviceConnectedCallback midiConnectedCallback, AndroidUSBMIDIDeviceDisconnectedCallback midiDisconnectedCallback) |
Initializes the Superpowered Android USB system and set up native connection management callbacks. More... | |
static OnConnectReturn | onConnect (int deviceID, int fd, const unsigned char *data, int dataBytes) |
Call this from Java when a USB device is connected. More... | |
static void | onDisconnect (int deviceID) |
Call this from Java when a USB device is disconnected. More... | |
Static Public Attributes | |
static AndroidUSBInternals * | internals |
This class manages USB device connections.
|
static |
Destroys the Superpowered Android USB system. Call this only once in an app's lifecycle. Don't initialize/destroy AndroidUSB more than once.
|
static |
Initializes the Superpowered Android USB system and set up native connection management callbacks.
It's very lightweight in memory and consumes no CPU. Call this only once in an app's lifecycle. Don't initialize/destroy AndroidUSB more than once.
clientdata | Some custom pointer you set for the callbacks. |
audioConnectedCallback | Called when a USB audio device is connected. Can be NULL. |
audioDisconnectedCallback | Called when a USB audio device is disconnected. Can be NULL. |
midiConnectedCallback | Called when a MIDI audio device is connected. Can be NULL. |
midiDisconnectedCallback | Called when a MIDI audio device is disconnected. Can be NULL. |
|
static |
Call this from Java when a USB device is connected.
deviceID | USB device identifier. |
fd | File descriptor for communication. |
data | Pointer to the raw USB descriptor. |
dataBytes | Length of the raw USB descriptor. |
|
static |
Call this from Java when a USB device is disconnected.
deviceID | USB device identifier. |
|
static |