All Classes Functions Variables
com.agileinnovative.blinkstick.BlinkStickFinder Class Reference

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
 

Detailed Description

Main class to find connected BlinkStick devices. Requires context and permission intent.

Member Function Documentation

BlinkStick com.agileinnovative.blinkstick.BlinkStickFinder.findFirst ( )

Find first BlinkStick connected to the computer

Returns
BlinkStick object or null if no BlinkSticks are connected
Boolean com.agileinnovative.blinkstick.BlinkStickFinder.openDevice ( BlinkStick  blinkStick) throws BlinkStickUnauthorizedException

Open BlinkStick device. The function checks for permission to open BlinkStick device.

Parameters
blinkStickBlinkStick device to open
Returns
true if device was opened successfully
Exceptions
BlinkStickUnauthorizedException
void com.agileinnovative.blinkstick.BlinkStickFinder.requestPermission ( BlinkStick  blinkStick)

Request permission from user to use BlinkStick device.

Parameters
blinkStickBlinkStick device to open
void com.agileinnovative.blinkstick.BlinkStickFinder.setContext ( Context  c)

Set context which will be used to request access to UsbManager class.

Parameters
cpermission 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.

Parameters
intentpermission intent object

Member Data Documentation

final int com.agileinnovative.blinkstick.BlinkStickFinder.PRODUCT_ID = 0x41e5
static

BlinkStick product ID

final int com.agileinnovative.blinkstick.BlinkStickFinder.VENDOR_ID = 0x20a0
static

BlinkStick vendor ID


The documentation for this class was generated from the following file: