Public Member Functions | |
void | setContext (Context c) |
void | setPermissionIntent (PendingIntent intent) |
BlinkStick | findFirst () |
Boolean | openDevice (BlinkStick blinkStick) throws BlinkStickUnauthorizedException |
void | requestPermission (BlinkStick blinkStick) |
Static Public Attributes | |
static final int | VENDOR_ID = 0x20a0 |
static final int | PRODUCT_ID = 0x41e5 |
Main class to find connected BlinkStick devices. Requires context and permission intent.
BlinkStick com.agileinnovative.blinkstick.BlinkStickFinder.findFirst | ( | ) |
Find first BlinkStick connected to the computer
Boolean com.agileinnovative.blinkstick.BlinkStickFinder.openDevice | ( | BlinkStick | blinkStick | ) | throws BlinkStickUnauthorizedException |
Open BlinkStick device. The function checks for permission to open BlinkStick device.
blinkStick | BlinkStick device to open |
BlinkStickUnauthorizedException |
void com.agileinnovative.blinkstick.BlinkStickFinder.requestPermission | ( | BlinkStick | blinkStick | ) |
Request permission from user to use BlinkStick device.
blinkStick | BlinkStick device to open |
void com.agileinnovative.blinkstick.BlinkStickFinder.setContext | ( | Context | c | ) |
Set context which will be used to request access to UsbManager class.
c | permission intent object |
void com.agileinnovative.blinkstick.BlinkStickFinder.setPermissionIntent | ( | PendingIntent | intent | ) |
Set permission intent object to be notified when user allows application to user BlinkStick device.
intent | permission intent object |
|
static |
BlinkStick product ID
|
static |
BlinkStick vendor ID