Overview

Singleton class that implements the U Grok It API.

The Ugi class is used as a singleton - only one instance of the class exists.

Static Public Member Functions

static boolean isTablet ()
 Get whether the current device is a tablet. More...
 
static Ugi getSingleton ()
 Get the singleton object. More...
 
static Ugi createSingleton (Context context)
 Create a Ugi object, using a UgiDefaultConfigurationUi object to handle configuration. More...
 
static Ugi createSingleton (Context context, UgiConfigurationDelegate configurationDelegate)
 Create a Ugi object, using the passed in configuration object. More...
 
static boolean isPD67 ()
 See if this Android device is the Turck PD67. More...
 

Public Member Functions

void waitForFirstActivity (Runnable completion)
 Wait for the first activity to be created. More...
 
void activityOnCreate (Activity activity, boolean handleScreenRotation, boolean allowRotationOnTablet)
 Notify Ugi that an Activity is created. More...
 
void activityOnDestroy (Activity activity)
 Notify Ugi that an Activity is being destroyed. More...
 
void activityOnResume (Activity activity)
 Notify Ugi that an activity is resuming. More...
 
void activityOnPause (Activity activity)
 Notify Ugi that an activity is pausing. More...
 
void appOrServiceIsActive ()
 Notify Ugi that the application or service is active.
 
int getDelayBeforeClosingConnectionOnInactivityMsec ()
 Get the delay in milliseconds between when there are no activities active and when the connection is closed and the audio focus is released. More...
 
void setDelayBeforeClosingConnectionOnInactivityMsec (int i)
 Set the delay in milliseconds between when there are no activities active and when the connection is closed and the audio focus is released. More...
 
void appOrServiceIsNotActive ()
 Notify Ugi that the application or service is not active.
 
ActiveStatusListener addActiveStatusListener (ActiveStatusListener listener)
 Add a listener for active status for the app. More...
 
void removeActiveStatusListener (ActiveStatusListener listener)
 Remove a listener for active status for the app. More...
 
void activityUpdateHandleScreenRotation (Activity activity, boolean handleScreenRotation, boolean allowRotationOnTablet)
 Update whether screen rotation is being handled for the given activity. More...
 
Activity getCurrentActivity ()
 Get the current tracked activity. More...
 
Runnable addOnCurrentActivityChangedListener (Runnable listener)
 Add a listener for the current activity changing. More...
 
void removeOnCurrentActivityChangedListener (Runnable listener)
 Remove a listener for the current activity changing. More...
 
void debug_setIsTablet (boolean isTablet)
 Set the isTablet property. More...
 
void setAudioJackLocation (AudioJackLocation audioJackLocation)
 Sets this instance's rotation preference. More...
 
AudioJackLocation getAudioJackLocationPreference ()
 Get the rotation preference. More...
 
void release ()
 Release a Ugi object. More...
 
UgiConfigurationDelegate getConfigurationDelegate ()
 Get the configuration delegate. More...
 
boolean getDoAutomaticConfiguration ()
 Get whether automatic configuration will be used if this device is not recognized. More...
 
void setDoAutomaticConfiguration (boolean b)
 Set whether automatic configuration will be used if this device is not recognized. More...
 
boolean getDoAutoRotationCheck ()
 Get whether to check to see if auto-rotation is off. More...
 
void setDoAutoRotationCheck (boolean b)
 Set whether to check to see if auto-rotation is off. More...
 
String getReaderDescription ()
 Get a description of the reader, generally used for debugging. More...
 
boolean getHasHfReader ()
 See if the Grokker has an HF reader. More...
 
boolean getHasBarcodeReader ()
 See if the Grokker has an Barcode reader. More...
 
String getLocalizedRegionName (String unlocalizedRegionName)
 
Get the localized region name for an unlocalized region name More...
 
GeigerCounterSound getGeigerCounterSound ()
 Get the current geiger counter sound configuration. More...
 
void setGeigerCounterSound (GeigerCounterSound config)
 Set the geiger counter sound configuration. More...
 
SpeakerTone [] getFoundItemSound ()
 Get the current set of tones played when an item is found. More...
 
void setFoundItemSound (SpeakerTone[] tones)
 Set the set of tones played when an item is found. More...
 
SpeakerTone [] getFoundLastItemSound ()
 Get the current set of tones played when the last item is found. More...
 
void setFoundLastItemSound (SpeakerTone[] tones)
 Set the set of tones played when the last item is found. More...
 
void getBatteryInfo (final GetBatteryInfoCompletion completion)
 
Get battery information from the reader. More...
 
Object reportConnectionStateAndBatteryInfoPeriodically (ReportConnectionStateAndBatteryInfoPeriodicallyCallback callback)
 Periodically report connection state and battery information to the callback. More...
 
void endReportConnectionStateAndBatteryInfoPeriodically (Object objFromReportConnectionStateAndBatteryInfoPeriodically)
 End periodic connection state and battery info reports. More...
 
void debug_setBatteryPercentageAdjustment (int adjustment, DebugBattTempCompletion completion)
 
Set an adjustment to the battery percentage (the adjustment value is added to or subtracted from the real battery percentage). More...
 
void debug_setTemperatureAdjustment (int adjustment, DebugBattTempCompletion completion)
 
Set an adjustment to the battery temperature (the adjustment value is added to the real temperature). More...
 
boolean barcodeScan (UgiBarcodeConfiguration config, BarcodeScanCompletion completion)
 Scan for a barcode. More...
 
void cancelBarcodeScan ()
 Cancel barcode scan.
 
String getAutomaticFirmwareUpdateChannel ()
 Get the name of the channel for automatic updates. More...
 
void setAutomaticFirmwareUpdateChannel (String name)
 Set the name of the channel for automatic updates. More...
 
void automaticCheckForFirmwareUpdate (AutomaticCheckForFirmwareUpdateCompletion completion)
 Check for firmware update automatically. More...
 
void forceFirmwareChannelReload (boolean onlyIfSomeTimeHasPassed)
 Update the firmware update status (reload the control file). More...
 
boolean forceFirmwareGrokkerCheck ()
 Check the grokker for firmware update. More...
 
boolean debug_getForceFirmwareUpdateToPreviousVersion ()
 DEBUGGING - get the state of the flag set with debug_setForceFirmwareUpdateToPreviousVersion() More...
 
void debug_setForceFirmwareUpdateToPreviousVersion (boolean b)
 DEBUGGING - cause the firmware update code to update to the previous version of the firmware. More...
 
void firmwareUpdate (boolean allowDowngrade, FirmwareUpdateDelegate delegate)
 Update firmware that has been previously loaded with loadUpdateWithName() More...
 
void loadUpdatesFromChannel (String channel, LoadUpdatesFromChannelCompletion completion)
 Load updates (metadata) More...
 
void updateFirmwareInfoCompatibility (ArrayList< UgiFirmwareUpdateInfo > infos)
 After firmware has been updated, update an array of UgiFirmwareUpdateInfo objects. More...
 
boolean isUpdateInProgress ()
 See if an update is in progress. More...
 
boolean isUpdateRequired ()
 See if an update is required. More...
 
void requiresFirmwareVersion (String firmwareVersion)
 Set that this app requires a minimum firmware version on the Grokker. More...
 
void repromptForAutomaticFirmwareUpdateIfAvailable ()
 If an automatic firmware update is available, reprompt for it (via the configuration delegate)
 
void invokeAudioReconfiguration ()
 Invoke the audio reconfiguration process.
 
void forceAudioReconfiguration ()
 Force the audio configuration to be reset.
 
AudioConfigurationSource getAudioConfigurationSource ()
 Get audio configuration source. More...
 
void invokeAudioJackLocation ()
 Invoke the audio jack location setting process.
 
boolean getPD67TriggerButtonState ()
 Get the state of the trigger button on the PD67. More...
 
PD67TriggerButtonChangedListener addOnPD67TriggerButtonChangedListener (PD67TriggerButtonChangedListener listener)
 Add a listener to be called on PD67 button changes. More...
 
void removeOnPD67TriggerButtonChangedListener (PD67TriggerButtonChangedListener listener)
 Remove a listener added with addOnPD67ButtonChangedListener. More...
 
Grokker password
boolean isGrokkerAuthenticationRequired ()
 See if the Grokker requires authentication. More...
 
boolean grokkerPasswordExists ()
 See if the Grokker has a password. More...
 
void setGrokkerPassword (final String password, final SetGrokkerPasswordCompletion completion)
 Set the Grokker's password. More...
 
void authenticateGrokker (final String password, final SetGrokkerPasswordCompletion completion)
 Authenticate the Grokker. More...
 
SDK Version Properties
int getSdkVersionMajor ()
 SDK Version, major. More...
 
int getSdkVersionMinor ()
 SDK Version, major. More...
 
int getSdkVersionBuild ()
 SDK Version, build. More...
 
Date getSdkVersionDateTime ()
 SDK Version, date/time. More...
 

Classes

interface  ActiveStatusListener
 Callback for addActiveStatusListener() More...
 
enum  AudioConfigurationSource
 Type returned by getAudioConfigurationSource() More...
 
enum  AudioJackLocation
 User settings for audio jack location. More...
 
interface  AutomaticCheckForFirmwareUpdateCompletion
 Completion interface passed to automaticCheckForFirmwareUpdate. More...
 
interface  BarcodeScanCompletion
 Completion interface for barcodeScan() More...
 
class  BatteryInfo
 Information returned by getBatteryInfo. More...
 
enum  CompatibilityValues
 Compatibility states. More...
 
interface  ConnectionStateListener
 Interface type for connection state callbacks. More...
 
enum  ConnectionStates
 States for the connection, sent to observer registered with addConnectionStateListener. More...
 
interface  DebugBattTempCompletion
 Completion interface for completion for debug_setBatteryPercentageAdjustment() and debug_setTemperatureAdjustment() More...
 
interface  FirmwareUpdateDelegate
 Delegate passed to firmwareUpdate method. More...
 
enum  FirmwareUpdateReturnValues
 States for the connection, sent with UGROKIT_NOTIFICAION_NAME_CONNECTION_STATE_CHANGED. More...
 
class  GeigerCounterSound
 Geiger counter sound configuration, used by getGeigerCounterSound and setGeigerCounterSound. More...
 
interface  GetBatteryInfoCompletion
 Completion interface for getBatteryInfo() More...
 
interface  GetJackOnTopCompletion
 Completion interface for getJackOnTop() More...
 
enum  GrokkerPasswordReturnValues
 
Values returned by setGrokkerPassword and authenticateGrokker More...
 
interface  LoadUpdatesFromChannelCompletion
 Completion interface passed to loadUpdatesFromChannel. More...
 
interface  LoggingCallback
 Interface for the logging callback. More...
 
class  LoggingTypes
 Types of logging. More...
 
enum  OngoingOperations
 Operation used by ReportConnectionStateAndBatteryInfoCallback. More...
 
interface  PD67TriggerButtonChangedListener
 Callback for addOnPD67ButtonChangedListener() More...
 
enum  ReaderHardwareTypes
 
Reader hardware type and version More...
 
interface  ReportConnectionStateAndBatteryInfoPeriodicallyCallback
 Callback interface for completion for reportConnectionStateAndBatteryInfoPeriodically() More...
 
interface  SetGrokkerPasswordCompletion
 Completion interface for setGrokkerPassword() More...
 
class  SpeakerTone
 A single tone, used by setFoundItemSound and setFoundLastItemSound. More...
 

Static Public Attributes

static final String FIRMWARE_CHANNEL_RELEASE = "release"
 Name of release channel.
 
static final String FIRMWARE_CHANNEL_DEVELOPMENT = "development"
 Name of development channel.
 

Connection

void getJackOnTop (final GetJackOnTopCompletion completion)
 See whether the audio jack is on the top of the device (and whether this state is known). More...
 
void openConnection ()
 Try to open a connection to the reader. More...
 
void closeConnection ()
 Close connection to the reader.
 

Connection Properties

boolean isInOpenConnection ()
 Has openConnection has been called (without a corresponding call to closeConnection) More...
 
boolean isAnythingPluggedIntoAudioJack ()
 Is anything is plugged into the audio jack (as best we can determine) More...
 
ConnectionStates getConnectionState ()
 Get the current connection state. More...
 
ConnectionStateListener addConnectionStateListener (ConnectionStateListener listener)
 Add a listener for connection state changes. More...
 
void removeConnectionStateListener (ConnectionStateListener listener)
 Remove a listener for connection state changes. More...
 
boolean isConnected ()
 get whether the reader is connected More...
 

Inventory

UgiInventory getActiveInventory ()
 Get the active inventory, if any. More...
 
UgiInventory startInventory (UgiInventoryDelegate delegate, UgiRfidConfiguration configuration, List< UgiEpc > epcs)
 Start running inventory to find specific EPCs. More...
 
UgiInventory startInventoryIgnoringEpcs (UgiInventoryDelegate delegate, UgiRfidConfiguration configuration, List< UgiEpc > epcsToIgnore)
 Start running inventory, ignoring specific EPCs. More...
 
UgiInventory startInventory (UgiInventoryDelegate delegate, UgiRfidConfiguration configuration)
 Start running inventory to find any tags. More...
 
UgiInventory startInventory (UgiInventoryDelegate delegate, UgiRfidConfiguration configuration, UgiEpc epc)
 Start running inventory to find one specific tag. More...
 
Object addInventoryStateListener (Runnable listener)
 Add a listener for inventory state changes. More...
 
void removeInventoryStateListener (Object objFromAddInventoryStateListener)
 Remove a listener for connection state changes. More...
 

Reader Information Properties

int getRequiredProtocolVersion ()
 Protocol version that the host requires.
 
int getSupportedProtocolVersion ()
 Protocol version that the host supports.
 
int getReaderProtocolVersion ()
 Protocol version of the reader.
 
String getReaderHardwareModel ()
 Reader's model.
 
ReaderHardwareTypes getReaderHardwareType ()
 Reader's hardware type.
 
int getReaderHardwareRevision ()
 Reader's hardware version.
 
int getFirmwareVersionMajor ()
 Firmware version in the reader, major.
 
int getFirmwareVersionMinor ()
 Firmware version in the reader, minor.
 
int getFirmwareVersionBuild ()
 Firmware version in the reader, build.
 
int getHfVersionMajor ()
 Firmware version in the HF reader, major.
 
int getHfVersionMinor ()
 Firmware version in the HF reader, minor.
 
int getHfVersionBuild ()
 Firmware version in the HF reader, build.
 
int getBarcodeVersionMajor ()
 Firmware version in the barcode reader, major.
 
int getBarcodeVersionMinor ()
 Firmware version in the barcode reader, minor.
 
int getBarcodeVersionBuild ()
 Firmware version in the barcode reader, build.
 
int getReaderSerialNumber ()
 Reader's unique serial number.
 
String getUnlocalizedRegionName ()
 Name of the region of the world the Grokker is set to operate in.
 
int getMaxTonesInSound ()
 Maximum number of tones in a sound.
 
double getMaxPower ()
 Maximum power that the reader can use, in dBm.
 
int getMaxSensitivity ()
 Maximum sensitivity.
 
int getNumVolumeLevels ()
 Maximum number of volume levels.
 
boolean getHasBattery ()
 true if the reader has battery power
 
int getBatteryCapacity ()
 Battery capacity in minutes.
 
int getBatteryCapacity_mAh ()
 Battery capacity in mAh.
 
boolean getDeviceInitializedSuccessfully ()
 true if device initialized successfully
 

Logging Properties

int getLoggingStatus ()
 Get the current logging status. More...
 
void setLoggingStatus (int i)
 
boolean getLoggingTimestamp ()
 Get whether to add a logging timestamp. More...
 
void setLoggingTimestamp (boolean b)
 
static LoggingCallback getLoggingCallback ()
 Get the logging callback. More...
 
static void setLoggingCallback (LoggingCallback callback)
 Set the logging callback. More...
 
static void log (final String s)
 Log a string, either to android.util.Log or to the logging callback. More...
 
static void log (final String s, final Throwable t)
 Log a string and optional exception, either to android.util.Log or to the logging callback. More...
 

Member Function Documentation

◆ waitForFirstActivity()

void com.ugrokit.api.Ugi.waitForFirstActivity ( Runnable  completion)

Wait for the first activity to be created.

Parameters
completionCode to run when the first activity is created

◆ activityOnCreate()

void com.ugrokit.api.Ugi.activityOnCreate ( Activity  activity,
boolean  handleScreenRotation,
boolean  allowRotationOnTablet 
)

Notify Ugi that an Activity is created.

Parameters
activityActivity being created
handleScreenRotationtrue to handle screen rotations
allowRotationOnTabletTrue to allow any screen orientation if this is a tablet device

◆ activityOnDestroy()

void com.ugrokit.api.Ugi.activityOnDestroy ( Activity  activity)

Notify Ugi that an Activity is being destroyed.

Parameters
activityActivity being destroyed

◆ activityOnResume()

void com.ugrokit.api.Ugi.activityOnResume ( Activity  activity)

Notify Ugi that an activity is resuming.

This should be called in the onResume method of all Activities. This is used to detect when the application is being moved to the foreground.

Parameters
activityActivity being resumed

◆ activityOnPause()

void com.ugrokit.api.Ugi.activityOnPause ( Activity  activity)

Notify Ugi that an activity is pausing.

This should be called in the onPause method of all Activities. This is used to detect when the application is being moved to the background.

Parameters
activityActivity being paused

◆ getDelayBeforeClosingConnectionOnInactivityMsec()

int com.ugrokit.api.Ugi.getDelayBeforeClosingConnectionOnInactivityMsec ( )

Get the delay in milliseconds between when there are no activities active and when the connection is closed and the audio focus is released.

Returns
Delay in milliseconds

◆ setDelayBeforeClosingConnectionOnInactivityMsec()

void com.ugrokit.api.Ugi.setDelayBeforeClosingConnectionOnInactivityMsec ( int  i)

Set the delay in milliseconds between when there are no activities active and when the connection is closed and the audio focus is released.

Parameters
iNew delay in milliseconds

◆ addActiveStatusListener()

ActiveStatusListener com.ugrokit.api.Ugi.addActiveStatusListener ( ActiveStatusListener  listener)

Add a listener for active status for the app.

Parameters
listenerListen er to add
Returns
listener passed

◆ removeActiveStatusListener()

void com.ugrokit.api.Ugi.removeActiveStatusListener ( ActiveStatusListener  listener)

Remove a listener for active status for the app.

Parameters
listenerlistener to remove

◆ activityUpdateHandleScreenRotation()

void com.ugrokit.api.Ugi.activityUpdateHandleScreenRotation ( Activity  activity,
boolean  handleScreenRotation,
boolean  allowRotationOnTablet 
)

Update whether screen rotation is being handled for the given activity.

Parameters
activityThe activity
handleScreenRotationtrue to handle screen rotation
allowRotationOnTabletTrue to allow any screen orientation if this is a tablet device

◆ getCurrentActivity()

Activity com.ugrokit.api.Ugi.getCurrentActivity ( )

Get the current tracked activity.

Returns
Current activity

◆ addOnCurrentActivityChangedListener()

Runnable com.ugrokit.api.Ugi.addOnCurrentActivityChangedListener ( Runnable  listener)

Add a listener for the current activity changing.

Parameters
listenerListener to add
Returns
the listener

◆ removeOnCurrentActivityChangedListener()

void com.ugrokit.api.Ugi.removeOnCurrentActivityChangedListener ( Runnable  listener)

Remove a listener for the current activity changing.

Parameters
listenerlistener to remove

◆ isTablet()

static boolean com.ugrokit.api.Ugi.isTablet ( )
static

Get whether the current device is a tablet.

Returns
true if the device is a tablet

◆ debug_setIsTablet()

void com.ugrokit.api.Ugi.debug_setIsTablet ( boolean  isTablet)

Set the isTablet property.

This can be useful for debugging.

Parameters
isTabletvalue to set

◆ setAudioJackLocation()

void com.ugrokit.api.Ugi.setAudioJackLocation ( AudioJackLocation  audioJackLocation)

Sets this instance's rotation preference.

Pass in true if the SDK should handle rotation, false if the application will.

Parameters
audioJackLocationAudio jack location to set

◆ getAudioJackLocationPreference()

AudioJackLocation com.ugrokit.api.Ugi.getAudioJackLocationPreference ( )

Get the rotation preference.

Returns
the preference

◆ getSingleton()

static Ugi com.ugrokit.api.Ugi.getSingleton ( )
static

Get the singleton object.

Returns
the singleton

◆ createSingleton() [1/2]

static Ugi com.ugrokit.api.Ugi.createSingleton ( Context  context)
static

Create a Ugi object, using a UgiDefaultConfigurationUi object to handle configuration.

Only one Ugi object may be created. This is normally called in onCreate() in the Application object

Parameters
contextContext object (usually the application)
Returns
Ugi object

◆ createSingleton() [2/2]

static Ugi com.ugrokit.api.Ugi.createSingleton ( Context  context,
UgiConfigurationDelegate  configurationDelegate 
)
static

Create a Ugi object, using the passed in configuration object.

Only one Ugi object may be created. This is normally called in onCreate() in the Application object

Parameters
contextContext object (usually the application)
configurationDelegateObject to handle configuration events
Returns
Ugi object

◆ release()

void com.ugrokit.api.Ugi.release ( )

Release a Ugi object.

This releases resources attached to the Ugi object. This would be called in onTerminate() in the Application object, but is normally never called since Android does not call onTerminate() and instead just kills the application processes

◆ getConfigurationDelegate()

UgiConfigurationDelegate com.ugrokit.api.Ugi.getConfigurationDelegate ( )

Get the configuration delegate.

Returns
The configuration delegate

◆ getDoAutomaticConfiguration()

boolean com.ugrokit.api.Ugi.getDoAutomaticConfiguration ( )

Get whether automatic configuration will be used if this device is not recognized.

Returns
true if automatic configuration will be used

◆ setDoAutomaticConfiguration()

void com.ugrokit.api.Ugi.setDoAutomaticConfiguration ( boolean  b)

Set whether automatic configuration will be used if this device is not recognized.

This should be called before openConnection()

Parameters
btrue to use automatic configuration

◆ getDoAutoRotationCheck()

boolean com.ugrokit.api.Ugi.getDoAutoRotationCheck ( )

Get whether to check to see if auto-rotation is off.

Returns
true to check to see if auto-rotation is off

◆ setDoAutoRotationCheck()

void com.ugrokit.api.Ugi.setDoAutoRotationCheck ( boolean  b)

Set whether to check to see if auto-rotation is off.

This should be called before openConnection()

Parameters
btrue to check to see if auto-rotation is off

◆ getJackOnTop()

void com.ugrokit.api.Ugi.getJackOnTop ( final GetJackOnTopCompletion  completion)

See whether the audio jack is on the top of the device (and whether this state is known).

The completion is usually run immediately, unless the device is not recognized locally and the state is loading loaded from the server.

Parameters
completionCode to run with the "jack on top" state

◆ openConnection()

void com.ugrokit.api.Ugi.openConnection ( )

Try to open a connection to the reader.

openConnection returns immediately, it does not wait for a connection to the reader to actually be established. If a reader is connected, the connection takes 400-500ms (just under half a second) for the connection sequence. Your app can get notification of connection state changes by calling addConnectionStateListener()

This method is normally called in onCreate but may be called elsewhere if the app does not want to always be connected to the reader.

◆ isInOpenConnection()

boolean com.ugrokit.api.Ugi.isInOpenConnection ( )

Has openConnection has been called (without a corresponding call to closeConnection)

Returns
true if openConnection has been called

◆ isAnythingPluggedIntoAudioJack()

boolean com.ugrokit.api.Ugi.isAnythingPluggedIntoAudioJack ( )

Is anything is plugged into the audio jack (as best we can determine)

Returns
true if anything is plugged into the audio jack

◆ isPD67()

static boolean com.ugrokit.api.Ugi.isPD67 ( )
static

See if this Android device is the Turck PD67.

Returns
true if this Android device is the Turck PD67

◆ getConnectionState()

ConnectionStates com.ugrokit.api.Ugi.getConnectionState ( )

Get the current connection state.

Returns
The current connection state

◆ addConnectionStateListener()

ConnectionStateListener com.ugrokit.api.Ugi.addConnectionStateListener ( ConnectionStateListener  listener)

Add a listener for connection state changes.

Parameters
listenerListener to add
Returns
The listener

◆ removeConnectionStateListener()

void com.ugrokit.api.Ugi.removeConnectionStateListener ( ConnectionStateListener  listener)

Remove a listener for connection state changes.

Parameters
listenerListener to remove

◆ isConnected()

boolean com.ugrokit.api.Ugi.isConnected ( )

get whether the reader is connected

Returns
true if connectionState == UgiConnectionStates.CONNECTED

◆ isGrokkerAuthenticationRequired()

boolean com.ugrokit.api.Ugi.isGrokkerAuthenticationRequired ( )

See if the Grokker requires authentication.

Returns
true if the Grokker requires authentication

◆ grokkerPasswordExists()

boolean com.ugrokit.api.Ugi.grokkerPasswordExists ( )

See if the Grokker has a password.

Returns
true if the Grokker has a password

◆ setGrokkerPassword()

void com.ugrokit.api.Ugi.setGrokkerPassword ( final String  password,
final SetGrokkerPasswordCompletion  completion 
)

Set the Grokker's password.

if a password is set, then the Grokker must be authenticated before any operation that changes tag data.

Parameters
passwordPassword to set
completionCode to run when operation is completed

◆ authenticateGrokker()

void com.ugrokit.api.Ugi.authenticateGrokker ( final String  password,
final SetGrokkerPasswordCompletion  completion 
)

Authenticate the Grokker.

Parameters
passwordPassword to authenticate with
completionCode to run when operation is completed

◆ getActiveInventory()

UgiInventory com.ugrokit.api.Ugi.getActiveInventory ( )

Get the active inventory, if any.

Returns
Active inventory

◆ startInventory() [1/3]

UgiInventory com.ugrokit.api.Ugi.startInventory ( UgiInventoryDelegate  delegate,
UgiRfidConfiguration  configuration,
List< UgiEpc epcs 
)

Start running inventory to find specific EPCs.

If one or more EPCs are passed in, only they will be reported back to the delegate If no EPCs are passed (epcs=null, numEpcs=0) then all EPCs will be reported back to the delegate

If a small number of EPCs are passed, filtering is done on the reader and the reader plays sounds immediately (with no host interaction). Otherwise filtering is done on the host, and the host tells the reader when to play sounds which is slower.

The inventory code keeps a history for each tag. This history is the number of finds for each time interval. The default is to store history for 20 intervals of 500ms each. This default can be modified via properties: inventoryIntervalMSec and inventoryHistoryDepth.

Parameters
delegateDelegate object to report back to
configurationConfiguration to use
epcsEPCs to find, all other EPCs are ignored (or null to find all EPCs)
Returns
UgiInventory object that will hold the results of this inventory

◆ startInventoryIgnoringEpcs()

UgiInventory com.ugrokit.api.Ugi.startInventoryIgnoringEpcs ( UgiInventoryDelegate  delegate,
UgiRfidConfiguration  configuration,
List< UgiEpc epcsToIgnore 
)

Start running inventory, ignoring specific EPCs.

If one or more EPCs are passed in, only they will be ignored.

Parameters
delegateDelegate object to report back to
configurationConfiguration to use
epcsToIgnoreEPCs to be ignored
Returns
UgiInventory object that will hold the results of this inventory

◆ startInventory() [2/3]

UgiInventory com.ugrokit.api.Ugi.startInventory ( UgiInventoryDelegate  delegate,
UgiRfidConfiguration  configuration 
)

Start running inventory to find any tags.

Parameters
delegateDelegate object to report back to
configurationConfiguration to use
Returns
UgiInventory object that will hold the results of this inventory

◆ startInventory() [3/3]

UgiInventory com.ugrokit.api.Ugi.startInventory ( UgiInventoryDelegate  delegate,
UgiRfidConfiguration  configuration,
UgiEpc  epc 
)

Start running inventory to find one specific tag.

Parameters
delegateDelegate object to report back to
configurationConfiguration to use
epcEPC to find
Returns
UgiInventory object that will hold the results of this inventory

◆ addInventoryStateListener()

Object com.ugrokit.api.Ugi.addInventoryStateListener ( Runnable  listener)

Add a listener for inventory state changes.

Parameters
listenerListener to add
Returns
object to pass to removeInventoryStateListener()

◆ removeInventoryStateListener()

void com.ugrokit.api.Ugi.removeInventoryStateListener ( Object  objFromAddInventoryStateListener)

Remove a listener for connection state changes.

Parameters
objFromAddInventoryStateListenerListener to remove

◆ getReaderDescription()

String com.ugrokit.api.Ugi.getReaderDescription ( )

Get a description of the reader, generally used for debugging.

Returns
Description of the reader

◆ getHasHfReader()

boolean com.ugrokit.api.Ugi.getHasHfReader ( )

See if the Grokker has an HF reader.

Returns
true if Grokker has an HF reader

◆ getHasBarcodeReader()

boolean com.ugrokit.api.Ugi.getHasBarcodeReader ( )

See if the Grokker has an Barcode reader.

Returns
true if Grokker has an Barcode reader

◆ getLocalizedRegionName()

String com.ugrokit.api.Ugi.getLocalizedRegionName ( String  unlocalizedRegionName)


Get the localized region name for an unlocalized region name

Parameters
unlocalizedRegionNameunlocalized region name
Returns
localized region name

◆ getGeigerCounterSound()

GeigerCounterSound com.ugrokit.api.Ugi.getGeigerCounterSound ( )

Get the current geiger counter sound configuration.

Returns
current geiger counter sound, null if not available yet

◆ setGeigerCounterSound()

void com.ugrokit.api.Ugi.setGeigerCounterSound ( GeigerCounterSound  config)

Set the geiger counter sound configuration.

This configuration is used if UGI_INVENTORY_SOUNDS_GEIGER_COUNTER is passed to startInventory

If no reader is connected, the reader will be configured with these parameters after a connection is established. Similarly, if the reader is disconnected and reconnected, these parameters will be configured with these parameters.

Parameters
configConfiguration to set

◆ getFoundItemSound()

SpeakerTone [] com.ugrokit.api.Ugi.getFoundItemSound ( )

Get the current set of tones played when an item is found.

This sound is used if UGI_INVENTORY_SOUNDS_FIRST_FIND or UGI_INVENTORY_SOUNDS_FIRST_FIND_AND_LAST is passed to startInventory

Returns
Array of tones, or null if a reader has never been connected

◆ setFoundItemSound()

void com.ugrokit.api.Ugi.setFoundItemSound ( SpeakerTone []  tones)

Set the set of tones played when an item is found.

This sound is used if UGI_INVENTORY_SOUNDS_FIRST_FIND or UGI_INVENTORY_SOUNDS_FIRST_FIND_AND_LAST is passed to startInventory

If no reader is connected, the reader will be configured with these parameters after a connection is established. Similarly, if the reader is disconnected and reconnected, these parameters will be configured with these parameters.

Parameters
tonesTones to set

◆ getFoundLastItemSound()

SpeakerTone [] com.ugrokit.api.Ugi.getFoundLastItemSound ( )

Get the current set of tones played when the last item is found.

This sound is used if UGI_INVENTORY_SOUNDS_FIRST_FIND_AND_LAST is passed to startInventory

Returns
Array of tones, or null if a reader has never been connected

◆ setFoundLastItemSound()

void com.ugrokit.api.Ugi.setFoundLastItemSound ( SpeakerTone []  tones)

Set the set of tones played when the last item is found.

This sound is used if UGI_INVENTORY_SOUNDS_FIRST_FIND_AND_LAST is passed to startInventory

If no reader is connected, the reader will be configured with these parameters after a connection is established. Similarly, if the reader is disconnected and reconnected, these parameters will be configured with these parameters.

Parameters
tonesTones to set

◆ getBatteryInfo()

void com.ugrokit.api.Ugi.getBatteryInfo ( final GetBatteryInfoCompletion  completion)


Get battery information from the reader.

This cannot be called while scanning. DEPRICATED - use reportConnectionStateAndBatteryInfoPeriodically if possible

Parameters
completionCode to call with battery information

◆ reportConnectionStateAndBatteryInfoPeriodically()

Object com.ugrokit.api.Ugi.reportConnectionStateAndBatteryInfoPeriodically ( ReportConnectionStateAndBatteryInfoPeriodicallyCallback  callback)

Periodically report connection state and battery information to the callback.

Parameters
callbackCallback function
Returns
object to pass to endReportConnectionStateAndBatteryInfoPeriodically

◆ endReportConnectionStateAndBatteryInfoPeriodically()

void com.ugrokit.api.Ugi.endReportConnectionStateAndBatteryInfoPeriodically ( Object  objFromReportConnectionStateAndBatteryInfoPeriodically)

End periodic connection state and battery info reports.

Parameters
objFromReportConnectionStateAndBatteryInfoPeriodicallyobject returned from reportConnectionStateAndBatteryInfoPeriodically

◆ debug_setBatteryPercentageAdjustment()

void com.ugrokit.api.Ugi.debug_setBatteryPercentageAdjustment ( int  adjustment,
DebugBattTempCompletion  completion 
)


Set an adjustment to the battery percentage (the adjustment value is added to or subtracted from the real battery percentage).

This is useful for development for testing displaying of different battery levels.

Parameters
adjustmentadjustment value
completionCode to run afterwards

◆ debug_setTemperatureAdjustment()

void com.ugrokit.api.Ugi.debug_setTemperatureAdjustment ( int  adjustment,
DebugBattTempCompletion  completion 
)


Set an adjustment to the battery temperature (the adjustment value is added to the real temperature).

This is useful for development for testing hanlding of warnings when the Grokker is used in very hot environments.

Parameters
adjustmentadjustment value (must be positive or zero)
completionCode to run afterwards

◆ barcodeScan()

boolean com.ugrokit.api.Ugi.barcodeScan ( UgiBarcodeConfiguration  config,
BarcodeScanCompletion  completion 
)

Scan for a barcode.

Parameters
configConfiguration to use
completionCode to run when barcode scan is completed
Returns
true if scan started, false if Grokker not connected

◆ getAutomaticFirmwareUpdateChannel()

String com.ugrokit.api.Ugi.getAutomaticFirmwareUpdateChannel ( )

Get the name of the channel for automatic updates.

Returns
Name of channel for automatic updates (normally FIRMWARE_CHANNEL_RELEASE)

◆ setAutomaticFirmwareUpdateChannel()

void com.ugrokit.api.Ugi.setAutomaticFirmwareUpdateChannel ( String  name)

Set the name of the channel for automatic updates.

Parameters
nameName of channel

◆ automaticCheckForFirmwareUpdate()

void com.ugrokit.api.Ugi.automaticCheckForFirmwareUpdate ( AutomaticCheckForFirmwareUpdateCompletion  completion)

Check for firmware update automatically.

The channel data is reloaded:

  • when forceFirmwareChannelReload: is called
  • on UIApplicationDidBecomeActiveNotification
  • once a day The Grokker is checked for needing to be updated:
  • each time a Grokker is connected
  • whenever new channel data is loaded (and a Grokker is connected and not running inventory)
  • when forceFirmwareGrokkerCheck: is called It is possible that a firmware update is available at a time that is inconvenient for an update.
Parameters
completionCompletion code when an update is ready

◆ forceFirmwareChannelReload()

void com.ugrokit.api.Ugi.forceFirmwareChannelReload ( boolean  onlyIfSomeTimeHasPassed)

Update the firmware update status (reload the control file).

Parameters
onlyIfSomeTimeHasPassedtrue to only force the check if time has passed since the last check

◆ forceFirmwareGrokkerCheck()

boolean com.ugrokit.api.Ugi.forceFirmwareGrokkerCheck ( )

Check the grokker for firmware update.

Returns
true if a firmware update was initiated

◆ debug_getForceFirmwareUpdateToPreviousVersion()

boolean com.ugrokit.api.Ugi.debug_getForceFirmwareUpdateToPreviousVersion ( )

DEBUGGING - get the state of the flag set with debug_setForceFirmwareUpdateToPreviousVersion()

Returns
state

◆ debug_setForceFirmwareUpdateToPreviousVersion()

void com.ugrokit.api.Ugi.debug_setForceFirmwareUpdateToPreviousVersion ( boolean  b)

DEBUGGING - cause the firmware update code to update to the previous version of the firmware.

This enables repeated testing of the firmware update code, which is useful for applications that override some of the default firmware update functionality.

Parameters
btrue to cause the firmware update code to update to the previous version

◆ firmwareUpdate()

void com.ugrokit.api.Ugi.firmwareUpdate ( boolean  allowDowngrade,
FirmwareUpdateDelegate  delegate 
)

Update firmware that has been previously loaded with loadUpdateWithName()

Parameters
delegateObject to send notifications to
allowDowngradetrue to allow downgrading

◆ loadUpdatesFromChannel()

void com.ugrokit.api.Ugi.loadUpdatesFromChannel ( String  channel,
LoadUpdatesFromChannelCompletion  completion 
)

Load updates (metadata)

Parameters
channelChannel to load from, normally FIRMWARE_CHANNEL_RELEASE
completionCompletion code when updates are loaded

◆ updateFirmwareInfoCompatibility()

void com.ugrokit.api.Ugi.updateFirmwareInfoCompatibility ( ArrayList< UgiFirmwareUpdateInfo infos)

After firmware has been updated, update an array of UgiFirmwareUpdateInfo objects.

Parameters
infosUpdates to update

◆ isUpdateInProgress()

boolean com.ugrokit.api.Ugi.isUpdateInProgress ( )

See if an update is in progress.

Returns
true if an update is in progress

◆ isUpdateRequired()

boolean com.ugrokit.api.Ugi.isUpdateRequired ( )

See if an update is required.

Returns
true if an update is required

◆ requiresFirmwareVersion()

void com.ugrokit.api.Ugi.requiresFirmwareVersion ( String  firmwareVersion)

Set that this app requires a minimum firmware version on the Grokker.

Parameters
firmwareVersionThe minimum firmware version

◆ getLoggingStatus()

int com.ugrokit.api.Ugi.getLoggingStatus ( )

Get the current logging status.

Returns
The current logging status

◆ getLoggingTimestamp()

boolean com.ugrokit.api.Ugi.getLoggingTimestamp ( )

Get whether to add a logging timestamp.

Returns
If true, add a timestamp to each logging line (default = false)

◆ getLoggingCallback()

static LoggingCallback com.ugrokit.api.Ugi.getLoggingCallback ( )
static

Get the logging callback.

Returns
The logging callback (or null for default)

◆ setLoggingCallback()

static void com.ugrokit.api.Ugi.setLoggingCallback ( LoggingCallback  callback)
static

Set the logging callback.

Parameters
callbackNew logging callback

◆ log() [1/2]

static void com.ugrokit.api.Ugi.log ( final String  s)
static

Log a string, either to android.util.Log or to the logging callback.

Parameters
sstring to log

◆ log() [2/2]

static void com.ugrokit.api.Ugi.log ( final String  s,
final Throwable  t 
)
static

Log a string and optional exception, either to android.util.Log or to the logging callback.

Parameters
sstring to log
texception to log

◆ getSdkVersionMajor()

int com.ugrokit.api.Ugi.getSdkVersionMajor ( )

SDK Version, major.

Version 1.4.1 - September 10, 2014 - Reader protocol 17
RFID configuration changes
Bug fixes

Version 1.5.2 - November 12, 2014 - Reader protocol 19
Bug fixes and performance improvements
Expanded device support

Version 1.6.1 - December 18, 2014 - Reader protocol 19
EU Grokker support (region setting)

Version 1.7.2 - February 5, 2015 - Reader protocol 19
Streamlined UI for housekeeping tasks (set region and firmware update): added UgiConfigurationDelegate and UgiDefaultConfigurationUi
Automatic device configuration for unrecognized devices
Version 1.7.3 - February 11, 2015 - Reader protocol 19
Bug fix for app inactive/active while inventory is running

Version 1.7.5 - March 9, 2015 - Reader protocol 19
Bug fix for passing both a select mask and EPCs to startInventory

Version 1.7.6 - March 26, 2015 - Reader protocol 19
Better handling of protocol errors while starting/stopping inventory

Version 1.7.7 - April 8, 2015 - Reader protocol 19
Minor bug fixes with setting region

Version 1.7.8 - April 25, 2015 - Reader protocol 19
Bug fix for intermittent issue with pausing/resuming connection

Version 1.7.9 - May 13, 2015 - Reader protocol 19
Bug fix for dynamic setting of handling screen rotation (primarily for Cordova)

Version 1.7.10 - May 14, 2015 - Reader protocol 19
Expanded device support

Version 1.7.11 - May 26, 2015 - Reader protocol 20
Expanded device support (in conjunction with firmware 35)

Version 1.7.13 - July 9, 2015 - Reader protocol 20
Fix bug with large numbers of tags when using detailed-per-read-data
Expanded device support
Do not allow getting battery level during firmware update

Version 1.7.15 - July 27, 2015 - Reader protocol 20
Fix bug with low-level filters and large numbers of tags
Expanded device support

Version 1.7.16 - August 15, 2015 - Reader protocol 20
Fix crashing bug in SetRegion if no region selected
Expanded device support

Version 1.7.17 - August 26, 2015 - Reader protocol 20
Fix firmware update and set region to handle cancel via back-button correctly

Version 1.7.18 - September 19, 2015 - Reader protocol 20
Android device compatibility

Version 1.7.19 - September 24, 2015 - Reader protocol 20
Android 6.0 (Marshmallow) compatibility

Version 1.8.1 - October 5, 2015 - Reader protocol 20
API for controlling the SDK's Internet use

Version 1.8.2 - October 7, 2015 - Reader protocol 20
Fix bug with 1.8.1 changes for a few specific devices

Version 1.8.3 - October 20, 2015 - Reader protocol 20
Remove minimum EPC length
Android 6.0 (Marshmallow) compatibility

Version 1.8.4 - October 26, 2015 - Reader protocol 20
Android 6.0 (Marshmallow) compatibility

Version 1.8.5 - October 28, 2015 - Reader protocol 20
Fix for crash on device with illegal audio properties

Version 1.8.6 - November 24, 2015 - Reader protocol 20
Better Android compatibility for devices with issues setting the volume

Version 1.9.1 - January 13, 2016 - Reader protocol 21
Protocol 22: force-tari-25 flag, delay-after-select flag
API for reading RF Micron Magnus sensor tags
Fix DetailedPerReadData readData1 and readData2 to not be byte-swizzled
Added Ugi requiresFirmwareVersion method

Version 1.9.2 - February 4, 2016 - Reader protocol 21
Android device compatibility

Version 1.9.3 - February 11, 2016 - Reader protocol 21
Fix library (.aar) structure for changes in build tools
Android device compatibility

Version 1.9.4 - February 16, 2016 - Reader protocol 21
Fix bug with filtering tags

Version 1.9.5 - March 5, 2016 - Reader protocol 21
Added reportConnectionStateAndBatteryInfoPeriodically()

Version 1.9.6 - March 14, 2016 - Reader protocol 21
Bug fix with reportConnectionStateAndBatteryInfoPeriodically()

Version 1.10.1 - April 2, 2016 - Reader protocol 21
UgiUiUtils rework, added UI building blocks

Version 1.11.1 - May 20, 2016 - Reader protocol 21
More work on UI building blocks

Version 1.11.2 - May 31, 2016 - Reader protocol 21
Farsens tag support
API Demo bug fix
Minor UgiUiUtil API enhancement

Version 1.12.1 - July 11, 2016 - Reader protocol 22
Removed support for protocol levels before 17
Protocol 22: battery info while scanning, temperature in reportConnectionStateAndBatteryInfoPeriodically

Version 1.12.2 - July 29, 2016 - Reader protocol 22
Battery status images incorporating warning about Grokker being too hot

Version 1.12.3 - August 11, 2016 - Reader protocol 22
Audio protocol fix to better handle an obscure error condition

Version 1.13.1 - September 8, 2016 - Reader protocol 23
Add localization support
Add UgiTitleView centerTitle property
Version 1.13.2 - September 28, 2016 - Reader protocol 23
Option for UI alerts to be in the U Grok It style
Fix JNI bug with local reference table with caused an obscure crash using the Xamarin SDK
Fix intermittent disconnect/connect bug when closing/re-opeing cnnection (usually leaving/re-entering app)
Version 1.13.3 - October 28, 2016 - Reader protocol 23
Check battery level before doing firmware update
Bug fix for using the SDK in a service (outside of the Activity lifecycle)
Small translation fixes
Added getDoAutoRotationCheck() and setDoAutoRotationCheck()
Small change to battery status images
Version 1.13.4 - November 23, 2016 - Reader protocol 23
Add image option to UgiTitleView
Fix for race condition when starting an app with the device "off" (as from the debugger)
Fix UgiUiUtil.showOkNeutralCancel when using UGI style dialogs
Fix bug writing a data and passing data==previousData
Fix localRefTable issue with battery status strings
Version 1.14.1 - December 15, 2016 - Reader protocol 23
Remove isConnected() check from invokeAudioReconfiguration (added in 1.13.4)
Support a password in readTag (requires firmware 1.12.3)
Support for killTag (requires firmware 1.12.3)
Added LoggingTypes.BATTERY_STATUS, LoggingTypes.INTERNAL_BATTERY_STATUS and LoggingTypes.INTERNAL_PLATFORM_SPECIFIC
Add Ugi.log(), improve app's ability to capture logging
Version 1.15.1 - January 25, 2017 - Reader protocol 26
Support for authentication (requires firmware 1.12.4)
Single find mode (requires firmware 1.12.5)
Version 1.15.2 - January 31, 2017 - Reader protocol 26
Fix Android bug that caused crashes on a few devices
Version 1.15.4 - February 15, 2017 - Reader protocol 26
Small localization changes
Version 1.15.6 - March 31, 2017 - Reader protocol 26
Compile with API 25
Version 1.16.1 - July 14, 2017 - Reader protocol 26
Set Region removed (will be done in the factory)
Use Turck part number/model
Use most recent GSON library (2.8.0)
Version 1.16.2 - September 27, 2017 - Reader protocol 26
Fix minor memory leak
Minor region table changes
Reduce UgiRfidConfiguration.MAX_RFID_CONFIGURATION_MASK_LENGTH_BYTES to 12, enforce this
Support for China's frequencies
Version 1.16.4 - October 13, 2017 - Reader protocol 26
Fix SINGLE_FIND mode, broken in previous SDK
Fix UgiListViewMaxHeight so that set region dialog does not lose the buttons on short screens
Version 1.16.5 - January 11, 2018 - Reader protocol 27
Fix to work with very old firmware (1.6.2) still in a few Grokkers
Compatibility work
Minor bug fixes
Version 1.16.6 - March 9, 2018, 2018 - Reader protocol 27
Fix bug passing over 500 EPCs to ignore
Fix bug writing more than 200 bytes to memory when previous memory contents are unknown
Update code to use Java 8 features
Version 1.16.7 - May 4, 2018 - Reader protocol 27
Compatibility with newest Android Studio and Android tools
Tweak API Demo to read USER/TID on more tags
Change "Grokker" references to "PD20"
Version 1.16.8 - May 29, 2018 - Reader protocol 28
Fix bug with SINGLE_FIND mode when passing EPCs to ignore
Fix for better Google Pixel support
Version 1.16.9 - June 6, 2018 - Reader protocol 28
Add parameter checking to catch illegal combinations in UgiRfidConfiguration
Version 1.16.12 - July 23, 2018 - Reader protocol 28
Updated French translations
Fix crash when an unrelated USB device is detached
Version 1.16.13 - October 25, 2018 - Reader protocol 28
UI tweaks and cleanups

Returns
SDK Version, major

◆ getSdkVersionMinor()

int com.ugrokit.api.Ugi.getSdkVersionMinor ( )

SDK Version, major.

Returns
SDK Version, major

◆ getSdkVersionBuild()

int com.ugrokit.api.Ugi.getSdkVersionBuild ( )

SDK Version, build.

Returns
SDK Version, build

◆ getSdkVersionDateTime()

Date com.ugrokit.api.Ugi.getSdkVersionDateTime ( )

SDK Version, date/time.

Returns
SDK Version, date/time

◆ getAudioConfigurationSource()

AudioConfigurationSource com.ugrokit.api.Ugi.getAudioConfigurationSource ( )

Get audio configuration source.

Returns
source of the audio configuration

◆ getPD67TriggerButtonState()

boolean com.ugrokit.api.Ugi.getPD67TriggerButtonState ( )

Get the state of the trigger button on the PD67.

Returns
true if button is pressed

◆ addOnPD67TriggerButtonChangedListener()

PD67TriggerButtonChangedListener com.ugrokit.api.Ugi.addOnPD67TriggerButtonChangedListener ( PD67TriggerButtonChangedListener  listener)

Add a listener to be called on PD67 button changes.

Parameters
listenerListener to add
Returns
the listener passed in

◆ removeOnPD67TriggerButtonChangedListener()

void com.ugrokit.api.Ugi.removeOnPD67TriggerButtonChangedListener ( PD67TriggerButtonChangedListener  listener)

Remove a listener added with addOnPD67ButtonChangedListener.

Parameters
listenerlistener to remove
com.ugrokit.api.Ugi.LoggingTypes Class Reference

Overview

Types of logging.

The default is no logging. The internal logging types are primarily for debugging of the API itself.

Static Public Attributes

static final int INTERNAL_BYTE_PROTOCOL = 0x1
 Lowest level communication protocol, connection handshaking and byte send/receive.
 
static final int INTERNAL_CONNECTION_ERRORS = 0x2
 Low level communication errors.
 
static final int INTERNAL_CONNECTION_STATE = 0x4
 Low level connection state changes.
 
static final int INTERNAL_PACKET_PROTOCOL = 0x8
 Packet send/receive.
 
static final int INTERNAL_COMMAND = 0x10
 Command send/receive.
 
static final int INTERNAL_INVENTORY = 0x20
 Low-level inventory.
 
static final int INTERNAL_FIRMWARE_UPDATE = 0x40
 Low-level firmware update.
 
static final int INTERNAL_BATTERY_STATUS = 0x80
 Low-level battery status reporting.
 
static final int INTERNAL_PLATFORM_SPECIFIC = 0x100
 Low-level platform specific debugging.
 
static final int STATE = 0x1000
 Connection and inventory state.
 
static final int INVENTORY = 0x2000
 Inventory activity.
 
static final int INVENTORY_DETAIL = 0x4000
 Inventory details.
 
static final int BATTERY_STATUS = 0x8000
 Battery status details.
 
com.ugrokit.api.Ugi.AutomaticCheckForFirmwareUpdateCompletion Interface Reference

Overview

Completion interface passed to automaticCheckForFirmwareUpdate.

Public Member Functions

void updateReady (UgiFirmwareUpdateInfo info, boolean required)
 Completion method. More...
 

Member Function Documentation

◆ updateReady()

void com.ugrokit.api.Ugi.AutomaticCheckForFirmwareUpdateCompletion.updateReady ( UgiFirmwareUpdateInfo  info,
boolean  required 
)

Completion method.

Parameters
infoInfo for update that is ready (or nil if update cannot be loaded)
requiredtrue if update is required
com.ugrokit.api.Ugi.ReaderHardwareTypes Enum Reference

Overview


Reader hardware type and version

Public Attributes

 UNKNOWN
 Unknown.
 
 PROTOTYPE_SILABS_BOARD
 Silicon Labs prototype board.
 
 PROTOTYPE_ROGER
 Austria Microsystems Roger prototype.
 
 PROTOTYPE_MICROREADER
 Austria Microsystems MicroReader prototype.
 
 PROTOTYPE_ARNIE
 Austria Microsystems Arnie prototype.
 
com.ugrokit.api.Ugi.CompatibilityValues Enum Reference

Overview

Compatibility states.

Static Public Attributes

static final CompatibilityValues TABLE []
 < File is newer than the firmware on this Grokker More...
 

Public Attributes

 INVALID
 File is invalid.
 
 INCOMPATIBLE
 File is incompatible with this Grokker.
 
 DOWNGRADE
 File is older than the firmware on this Grokker.
 
 SAME_VERSION
 File is the same as the firmware on this Grokker.
 

Member Data Documentation

◆ TABLE

static final CompatibilityValues com.ugrokit.api.Ugi.CompatibilityValues.TABLE[]
static
Initial value:

< File is newer than the firmware on this Grokker

com.ugrokit.api.Ugi.BatteryInfo Class Reference

Overview

Information returned by getBatteryInfo.

Public Attributes

boolean canScan
 true if battery is capable of scanning
 
boolean externalPowerIsConnected
 true if external power is connected
 
boolean isCharging
 true if battery is charging
 
boolean temperatureAtOrAboveThreshold
 true if temperature is at or above the threshold for scanning
 
boolean temperatureWithin5DegreesOfThreshold
 true if temperature is within 5 degrees C of the threshold for scanning
 
boolean temperatureWithin10DegreesOfThreshold
 true if temperature is within 10 degrees C of the threshold for scanning
 
boolean temperatureWithin20DegreesOfThreshold
 true if temperature is within 20 degrees C of the threshold for scanning
 
int minutesRemaining
 Minutes of scanning remaining.
 
int percentRemaining
 Percent of scanning time remaining.
 
double voltage
 Battery voltage.
 
com.ugrokit.api.Ugi.GeigerCounterSound Class Reference

Overview

Geiger counter sound configuration, used by getGeigerCounterSound and setGeigerCounterSound.

Public Attributes

int frequency
 Frequency for each click (Hz)
 
int durationMsec
 Duration of each click, in milliseconds.
 
double clickRate
 Ratio used for translating finds/second into clicks/second.
 
int maxClicksPerSecond
 Maximum number of clicks per second.
 
int historyDepthMsec
 Number of history periods to consider for determining click rate.
 
com.ugrokit.api.Ugi.DebugBattTempCompletion Interface Reference

Overview

Public Member Functions

void exec (boolean success)
 Completion with region names. More...
 

Member Function Documentation

◆ exec()

void com.ugrokit.api.Ugi.DebugBattTempCompletion.exec ( boolean  success)

Completion with region names.

Parameters
successtrue if successful
com.ugrokit.api.Ugi.SpeakerTone Class Reference

Overview

A single tone, used by setFoundItemSound and setFoundLastItemSound.

Public Member Functions

int getFrequency ()
 Get the frequency for the tone. More...
 
int getDurationMsec ()
 Get the duration of the tone in milliseconds. More...
 
 SpeakerTone (int frequency, int durationMsec)
 Create a speaker tone. More...
 

Member Function Documentation

◆ getFrequency()

int com.ugrokit.api.Ugi.SpeakerTone.getFrequency ( )

Get the frequency for the tone.

Returns
frequency

◆ getDurationMsec()

int com.ugrokit.api.Ugi.SpeakerTone.getDurationMsec ( )

Get the duration of the tone in milliseconds.

Returns
duration

Constructor & Destructor Documentation

◆ SpeakerTone()

com.ugrokit.api.Ugi.SpeakerTone.SpeakerTone ( int  frequency,
int  durationMsec 
)

Create a speaker tone.

Parameters
frequencyFrequency for the tone
durationMsecDuration of the tone in milliseconds
com.ugrokit.api.Ugi.AudioJackLocation Enum Reference

Overview

User settings for audio jack location.

Static Public Member Functions

static AudioJackLocation fromInt (int i)
 < Audio jack is on bottom (no auto rotation) More...
 

Public Member Functions

int getInt ()
 Get the int value for the enum. More...
 

Public Attributes

 Default
 Use SDK default for this device.
 
 Top
 Audio jack is on top (rotate the screen when connected)
 

Member Function Documentation

◆ fromInt()

static AudioJackLocation com.ugrokit.api.Ugi.AudioJackLocation.fromInt ( int  i)
static

< Audio jack is on bottom (no auto rotation)

Convert from int to enum value

Parameters
iint value
Returns
enum value

◆ getInt()

int com.ugrokit.api.Ugi.AudioJackLocation.getInt ( )

Get the int value for the enum.

Returns
int value
com.ugrokit.api.Ugi.ConnectionStateListener Interface Reference

Overview

Interface type for connection state callbacks.

Public Member Functions

void connectionStateChanged (ConnectionStates connectionState)
 Method called when the connection state changes. More...
 

Member Function Documentation

◆ connectionStateChanged()

void com.ugrokit.api.Ugi.ConnectionStateListener.connectionStateChanged ( ConnectionStates  connectionState)

Method called when the connection state changes.

Parameters
connectionStatenew connection state
com.ugrokit.api.Ugi.ReportConnectionStateAndBatteryInfoPeriodicallyCallback Interface Reference

Overview

Callback interface for completion for reportConnectionStateAndBatteryInfoPeriodically()

Public Member Functions

void exec (ConnectionStates connectionState, OngoingOperations ongoingOperation, boolean batteryInformationIsValid, boolean externalPowerIsConnected, boolean isCharging, boolean canScan, boolean canGetBatteryWhileScanning, boolean temperatureAtOrAboveThreshold, boolean temperatureWithin5DegreesOfThreshold, boolean temperatureWithin10DegreesOfThreshold, boolean temperatureWithin20DegreesOfThreshold, int averagedBatteryPercentage, String statusDescription)
 Callback with connection and battery information. More...
 

Member Function Documentation

◆ exec()

void com.ugrokit.api.Ugi.ReportConnectionStateAndBatteryInfoPeriodicallyCallback.exec ( ConnectionStates  connectionState,
OngoingOperations  ongoingOperation,
boolean  batteryInformationIsValid,
boolean  externalPowerIsConnected,
boolean  isCharging,
boolean  canScan,
boolean  canGetBatteryWhileScanning,
boolean  temperatureAtOrAboveThreshold,
boolean  temperatureWithin5DegreesOfThreshold,
boolean  temperatureWithin10DegreesOfThreshold,
boolean  temperatureWithin20DegreesOfThreshold,
int  averagedBatteryPercentage,
String  statusDescription 
)

Callback with connection and battery information.

Parameters
connectionStateConnection state
ongoingOperationOngoing operation
batteryInformationIsValidtrue if externalPowerIsConnected, isCharging, canScan and averagedBatteryPercentage are valid
externalPowerIsConnectedtrue if external power is connected
isChargingtrue if battery is charging
canScantrue if battery is capable of scanning
canGetBatteryWhileScanningtrue if this Grokker can return battery information while scanning (firmware 1.11.2 or above)
temperatureAtOrAboveThresholdtrue if temperature is at or above the threshold for scanning
temperatureWithin5DegreesOfThresholdtrue if temperature is within 5 degrees C of the threshold for scanning
temperatureWithin10DegreesOfThresholdtrue if temperature is within 10 degrees C of the threshold for scanning
temperatureWithin20DegreesOfThresholdtrue if temperature is within 20 degrees C of the threshold for scanning
averagedBatteryPercentageBattery percentage averaged over a short period, so more stable, -1 if not valid. Only valid if external power is not connected
statusDescriptionText description
com.ugrokit.api.Ugi.FirmwareUpdateDelegate Interface Reference

Overview

Delegate passed to firmwareUpdate method.

Public Member Functions

boolean firmwareUpdateProgress (int amountDone, int amountTotal, boolean canCancel)
 Firmware update progress. More...
 
void firmwareUpdateCompleted (FirmwareUpdateReturnValues result, int seconds)
 Firmware update complete. More...
 

Member Function Documentation

◆ firmwareUpdateProgress()

boolean com.ugrokit.api.Ugi.FirmwareUpdateDelegate.firmwareUpdateProgress ( int  amountDone,
int  amountTotal,
boolean  canCancel 
)

Firmware update progress.

Parameters
amountDoneamount of the update completed
amountTotalamount in the complete update
canCanceltrue if the update can be cancelled at this point
Returns
true to cancel (ignored if canCancel is false, however)

◆ firmwareUpdateCompleted()

void com.ugrokit.api.Ugi.FirmwareUpdateDelegate.firmwareUpdateCompleted ( FirmwareUpdateReturnValues  result,
int  seconds 
)

Firmware update complete.

Parameters
resultResult of the update
secondsTime the update took in seconds
com.ugrokit.api.Ugi.FirmwareUpdateReturnValues Enum Reference

Overview

States for the connection, sent with UGROKIT_NOTIFICAION_NAME_CONNECTION_STATE_CHANGED.

Public Attributes

 SUCCESS =(0)
 Update successful.
 
 NO_FILE =(100)
 No update file loaded.
 
 BAD_FILE =(101)
 The update file is corrupted.
 
 INCOMPATIBLE_HARDWARE =(102)
 The update is not compatible with the reader.
 
 INCOMPATIBLE_VERSION =(103)
 The update is incompatible with the existing firmware.
 
 CRC_MISMATCH =(3)
 CRC mismatch in the file.
 
 PROTOCOL_FAILURE =(104)
 Failure communicating with the Grokker.
 
 CANT_RECONNECT =(105)
 Can't reconnect to the Grokker.
 
 CANCELLED =(106)
 Update was cancelled.
 
 BATTERY_TOO_LOW =(107)
 Battery is too low to update the firmware.
 
com.ugrokit.api.Ugi.LoadUpdatesFromChannelCompletion Interface Reference

Overview

Completion interface passed to loadUpdatesFromChannel.

Public Member Functions

void exec (ArrayList< UgiFirmwareUpdateInfo > infos)
 Completion method. More...
 

Member Function Documentation

◆ exec()

void com.ugrokit.api.Ugi.LoadUpdatesFromChannelCompletion.exec ( ArrayList< UgiFirmwareUpdateInfo infos)

Completion method.

Parameters
infosFirmware updates loaded
com.ugrokit.api.Ugi.PD67TriggerButtonChangedListener Interface Reference

Overview

Callback for addOnPD67ButtonChangedListener()

Public Member Functions

void exec (boolean triggerButtonPressed)
 Completion with trigger button state. More...
 

Member Function Documentation

◆ exec()

void com.ugrokit.api.Ugi.PD67TriggerButtonChangedListener.exec ( boolean  triggerButtonPressed)

Completion with trigger button state.

Parameters
triggerButtonPressedtrue if trigger button is pressed
com.ugrokit.api.Ugi.BarcodeScanCompletion Interface Reference

Overview

Completion interface for barcodeScan()

Public Member Functions

void exec (byte[] barcode)
 Completion with barcode. More...
 

Member Function Documentation

◆ exec()

void com.ugrokit.api.Ugi.BarcodeScanCompletion.exec ( byte []  barcode)

Completion with barcode.

Parameters
barcodebarcode found, or null if none
com.ugrokit.api.Ugi.AudioConfigurationSource Enum Reference

Overview

Public Attributes

 Unknown
 Source unknown.
 
 Local
 Source is local SDK (compiled in device list)
 
 Server
 Source is device list from server.
 
com.ugrokit.api.Ugi.GetBatteryInfoCompletion Interface Reference

Overview

Completion interface for getBatteryInfo()

Public Member Functions

void exec (BatteryInfo info)
 Completion with battery information. More...
 

Member Function Documentation

◆ exec()

void com.ugrokit.api.Ugi.GetBatteryInfoCompletion.exec ( BatteryInfo  info)

Completion with battery information.

Parameters
infobattery information, or null if not successful
com.ugrokit.api.Ugi.OngoingOperations Enum Reference

Overview

Operation used by ReportConnectionStateAndBatteryInfoCallback.

Public Attributes

 INACTIVE
 No operation active.
 
 INVENTORY
 Running inventory.
 
 FIRMWARE_UPDATE
 Firmware update in progress.
 
 OTHER
 Other operation in progress.
 
 BARCODE_SCAN
 barcode scan in progress
 
com.ugrokit.api.Ugi.ConnectionStates Enum Reference

Overview

States for the connection, sent to observer registered with addConnectionStateListener.

Public Attributes

 NOT_CONNECTED
 Nothing connected to audio port.
 
 CONNECTING
 Something connected to audio port, trying to connect.
 
 INCOMPATIBLE_READER
 Connected to an reader with incompatible firmware.
 
 CONNECTED
 Connected to reader.
 
com.ugrokit.api.Ugi.SetGrokkerPasswordCompletion Interface Reference

Overview

Completion interface for setGrokkerPassword()

Public Member Functions

void exec (GrokkerPasswordReturnValues result)
 Completion. More...
 

Member Function Documentation

◆ exec()

void com.ugrokit.api.Ugi.SetGrokkerPasswordCompletion.exec ( GrokkerPasswordReturnValues  result)

Completion.

Parameters
resultresult of operation
com.ugrokit.api.Ugi.LoggingCallback Interface Reference

Overview

Interface for the logging callback.

Public Member Functions

void log (String s)
 Log a string. More...
 

Member Function Documentation

◆ log()

void com.ugrokit.api.Ugi.LoggingCallback.log ( String  s)

Log a string.

Parameters
sString to log
com.ugrokit.api.Ugi.GetJackOnTopCompletion Interface Reference

Overview

Completion interface for getJackOnTop()

Public Member Functions

void exec (boolean deviceRecognized, boolean jackOnTop)
 Completion with "jack on top" state. More...
 

Member Function Documentation

◆ exec()

void com.ugrokit.api.Ugi.GetJackOnTopCompletion.exec ( boolean  deviceRecognized,
boolean  jackOnTop 
)

Completion with "jack on top" state.

Parameters
deviceRecognizedtrue if this device is recognized
jackOnToptrue if he jack is on the top
com.ugrokit.api.Ugi.ActiveStatusListener Interface Reference

Overview

Public Member Functions

void exec (boolean isActive)
 Completion with active state. More...
 

Member Function Documentation

◆ exec()

void com.ugrokit.api.Ugi.ActiveStatusListener.exec ( boolean  isActive)

Completion with active state.

Parameters
isActivetrue if app is active
com.ugrokit.api.Ugi.GrokkerPasswordReturnValues Enum Reference

Overview


Values returned by setGrokkerPassword and authenticateGrokker

Public Attributes

 SUCCESS
 Successful.
 
 NOT_AUTHENTICATED
 Failure, grokker is not authenticated.
 
 WRONG_PASSWORD
 Incorrect password passed.
 
 NO_PASSWORD_SET
 No password is set, so can't authenticate.
 
 NOT_CONNECTED
 Grokker is not connected.
 
 OTHER_ERROR
 Other error (unknown)