UGrokItApi.Ugi Class Reference

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.

Class Methods

static Ugi Singleton ()
 Get the singleton object More...
 
static void CreateSingleton (Android.Content.Context context)
 ANDROID ONLY: Create a Ugi object Only one Ugi object may be created. This is normally called in onCreate() in the Application object. More...
 
static void CreateSingleton ()
 Create a Ugi object. Only one Ugi object may be created. More...
 
static void Log (string s)
 Log a string, either to android.util.Log or to the logging callback More...
 

Instance Methods

void ActivityOnCreate (Android.App.Activity activity, bool handleScreenRotation, bool allowRotationOnTablet)
 ANDROID ONLY: Notify Ugi that an Activity is created More...
 
void ActivityOnDestroy (Android.App.Activity activity)
 ANDROID ONLY: Notify Ugi that an Activity is being destroyed More...
 
void ActivityOnResume (Android.App.Activity activity)
 ANDROID ONLY: Notify Ugi that an activity is resuming More...
 
void ActivityOnPause (Android.App.Activity activity)
 ANDROID ONLY: Notify Ugi that an activity is pausing More...
 
void ActivityUpdateHandleScreenRotation (Android.App.Activity activity, bool handleScreenRotation, bool allowRotationOnTablet)
 ANDROID ONLY: Update the handleScreenRotation and allowRotationOnTablet flags for the activity More...
 
void Debug_setIsTablet (bool isTablet)
 Set the isTablet property. This can be useful for debugging. More...
 
void 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() More...
 
void CloseConnection ()
 Close connection to the reader. More...
 
delegate void ConnectionStateDelegate (ConnectionStates state)
 Delegate for connection state notifications More...
 
void SetGrokkerPassword (string password, Action< GrokkerPasswordReturnValues > completion)
 Authenticate the Grokker. More...
 
void AuthenticateGrokker (string password, Action< GrokkerPasswordReturnValues > completion)
 Set the Grokker's password. if a password is set, then the Grokker must be authenticated before any operation that changes tag data. More...
 
UgiInventory StartInventory (IUgiInventoryDelegate inventoryDelegate, UgiRfidConfiguration configuration, List< UgiEpc > epcs)
 Start running inventory to find specific EPCs More...
 
UgiInventory StartInventoryIgnoringEpcs (IUgiInventoryDelegate inventoryDelegate, UgiRfidConfiguration configuration, List< UgiEpc > epcsToIgnore)
 Start running inventory, ignoring specific EPCs More...
 
UgiInventory StartInventory (IUgiInventoryDelegate inventoryDelegate, UgiRfidConfiguration configuration)
 Start running inventory to find any tags More...
 
UgiInventory StartInventory (IUgiInventoryDelegate inventoryDelegate, UgiRfidConfiguration configuration, UgiEpc epc)
 Start running inventory to find one specific tag More...
 
delegate void InventoryStateDelegate ()
 Delegate for inventory state notifications More...
 
string GetLocalizedRegionName (string unlocalizedRegionName)
 Get the localized region name for an unlocalized region name More...
 
void RequiresFirmwareVersion (string firmwareVersion)
 Set that this app requires a minimum firmware version on the Grokker More...
 
void GetBatteryInfo (Action< BatteryInfo > completion)
 Get battery information from the reader More...
 
delegate void ReportConnectionStateAndBatteryInfoPeriodicallyDelegate (ConnectionStates connectionState, OngoingOperations ongoingOperation, bool batteryInformationIsValid, bool externalPowerIsConnected, bool isCharging, bool canScan, bool canGetBatteryWhileScanning, bool temperatureAtOrAboveThreshold, bool temperatureWithin5DegreesOfThreshold, bool temperatureWithin10DegreesOfThreshold, bool temperatureWithin20DegreesOfThreshold, int averagedBatteryPercentage, string statusDescription)
 Callback function for reportBatteryInfoPeriodically More...
 
Object ReportConnectionStateAndBatteryInfoPeriodically (ReportConnectionStateAndBatteryInfoPeriodicallyDelegate callback)
 Periodically report connection state and battery information to the callback. More...
 
void EndReportConnectionStateAndBatteryInfoPeriodically (Object objectFromReportConnectionStateAndBatteryInfoPeriodically)
 End periodic connection state and battery info reports. More...
 
void Debug_setBatteryPercentageAdjustment (int adjustment, Action< bool > 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. More...
 
void Debug_setTemperatureAdjustment (int adjustment, Action< bool > 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. More...
 
void InvokeAudioReconfiguration ()
 Invoke the audio reconfiguration process More...
 
void InvokeAudioJackLocation ()
 Invoke the audio jack location setting process More...
 

Properties

Android.App.Activity CurrentActivity [get]
 ANDROID ONLY: Get the current tracked activity More...
 
AudioJackLocation GetAudioJackLocationPreference [get, set]
 Gets or sets the get audio jack location preference. More...
 
bool IsTablet [get, set]
 Gets or whether the device is a tablet More...
 
bool IsInOpenConnection [get]
 Has openConnection has been called (without a corresponding call to closeConnecion) More...
 
bool IsAnythingPluggedIntoAudioJack [get]
 Is anything is plugged into the audio jack (as best we can determine) More...
 
ConnectionStates ConnectionState [get]
 Gets the current connection state More...
 
bool IsConnected [get]
 Gets a value indicating whether a reader is connected. More...
 
bool IsGrokkerAuthenticationRequired [get]
 Gets a value indicating whether the Grokker requires authentication. More...
 
bool GrokkerPasswordExists [get]
 Gets a value indicating whether the Grokker has a password. More...
 
UgiInventory ActiveInventory [get]
 Get the active inventory, if any More...
 
int RequiredProtocolVersion [get]
 Protocol version that the host requires More...
 
int SupportedProtocolVersion [get]
 Protocol version that the host supports More...
 
int ReaderProtocolVersion [get]
 Protocol version of the reader More...
 
string ReaderHardwareModel [get]
 Reader's model More...
 
int ReaderHardwareRevision [get]
 Reader's hardware version More...
 
int FirmwareVersionMajor [get]
 Firmware version in the reader, major More...
 
int FirmwareVersionMinor [get]
 Firmware version in the reader, minor More...
 
int FirmwareVersionBuild [get]
 Firmware version in the reader, build More...
 
int ReaderSerialNumber [get]
 Reader's unique serial number More...
 
string UnlocalizedRegionName [get]
 Name of the region of the world the Grokker is set to operate in More...
 
double MaxPower [get]
 Maximum power that the reader can use, in dBm More...
 
int MaxSensitivity [get]
 Maximum sensitivity that the reader can use, in dBm More...
 
bool DeviceInitializedSuccessfully [get]
 true if device initialized successfully More...
 
string ReaderDescription [get]
 description of the reader, generally used for debugging More...
 
int SdkVersionMajor [get]
 SDK Version, major Version 1.7.3 - February 18, 2015 - Reader protocol 19 First Xamarin SDK Version 1.7.5 - March 9, 2015 - Reader protocol 19 Bug fix for passing both a select mask and EPCs to startInventory Bug fix for connection state transitions while running inventory 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.10 - May 14, 2015 - Reader protocol 19 Expanded Android device support Version 1.7.10 - May 14, 2015 - Reader protocol 19 Expanded Android device support Minor bug fixes Version 1.7.11 - May 26, 2015 - Reader protocol 20 Android: Expanded device support (in conjunction with firmware 1.9.5) Version 1.7.13 - July 9, 2015 - Reader protocol 20 Do not allow getting battery level during firmware update Android: Expanded device support, bug fix Version 1.7.15 - July 9, 2015 - Reader protocol 20 Android: Expanded device support, bug fix Version 1.7.16 - August 15, 2015 - Reader protocol 20 Fix for crashing bug in set region Version 1.7.17 - August 26, 2015 - Reader protocol 20 Android: 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 iOS9 bug fix Android 6.0 (Marshmallow) support 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 Android: 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 iOS: Fix for iOS6 and initializing new Grokkers Android: Android 6.0 (Marshmallow) compatibility Version 1.8.4 - October 26, 2015 - Reader protocol 20 Android: Android 6.0 (Marshmallow) compatibility Version 1.8.5 - October 28, 2015 - Reader protocol 20 iOS: Fix for accidentally hitting the dictation key while Grokker is connected Android: Fix for crash on device with illegal audio properties Version 1.8.6 - November 24, 2015 - Reader protocol 20 Android: 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 Fix in Andropid sample app for OnPause and OnResume Android device compatibility Version 1.9.3 - February 11, 2016 - Reader protocol 21 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 in reportConnectionStateAndBatteryInfoPeriodically Version 1.10.1 - April 2, 2016 - Reader protocol 21 UgiUiUtils rework, added UI building blocks Version 1.11.1 - May 20, 2016, 2016 - Reader protocol 21 More work on UI building blocks, restructured Xamarin.Forms app Version 1.11.2 - May 31, 2016, 2016 - Reader protocol 21 Fix bug wqith ConnectionStateChanged introduced in 1.11.1 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 Version 1.13.2 - September 28, 2016 - Reader protocol 23 Bug fixes Version 1.13.3 - October 28, 2016 - Reader protocol 23 Check battery level before doing firmware update Small translation fixes Small bug fixes Version 1.13.4 - November 23, 2016 - Reader protocol 23 Add image option to UgiTitleView Android: Fix for race condition when starting an app with the device "off" (as from the debugger) Android: Fix UgiUiUtil.showOkNeutralCancel when using UGI style dialogs Android: Fix bug writing a data and passing data==previousData Android: Fix localRefTable issue with battery status strings Version 1.14.1 - December 15, 2016 - Reader protocol 23 Support a password in readTag (requires firmware 1.12.3) Support for killTag (requires firmware 1.12.3) Added LoggingTypes.BatteryStatus, LoggingTypes.InternalBatteryStatus and LoggingTypes.InternalPlatformSpecific 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) Version 1.15.2 - January 31, 2017 - Reader protocol 26 Android: fix for intermittent crash bug wso156th a few specific devices Version 1.15.3 - February 8, 2017 - Reader protocol 26 iOS: Fix bug in 64-bit devices and per-read data Version 1.15.4 - February 15, 2017 - Reader protocol 26 Small localization changes Version 1.15.6 - March 31, 2017 - Reader protocol 26 Updated iOS and Android SDKs Version 1.16.1 - July 14, 2017 - Reader protocol 26 Updated iOS and Android SDKs Version 1.16.2 - September 27, 2017 - Reader protocol 26 Fix minor memory leak Minor region table changes Add support for China frequencies Support iOS 11, drop support for iOS6 and iOS7 Version 1.16.4 - October 13, 2017 - Reader protocol 26 Fix SingleFind mode, broken in previous SDK Version 1.16.5 - January 11, 2018 - Reader protocol 27 Fix bug with GoForward(xxx, true) in Android forms app Fix to work with very old firmware (1.6.2) still in a few Grokkers Android Compatibility work Minor bug fixes Version 1.16.6 - March 9, 2018 - Reader protocol 27 Fix bug writing more than 200 bytes to memory when previous memory contents are unknown Android - Fix bug passing over 500 EPCs to ignore Distribute as NuGet package Version 1.16.7 - May 4, 2018 - Reader protocol 27 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 Fix ReportConnectionStateAndBatteryInfoPeriodically to work again on iOS Version 1.16.10 - June 14, 2018 - Reader protocol 28 Fix DateTime fields to return local time to be consistent with DateTime.Now, fix iOS times Version 1.16.11 - June 28, 2018 - Reader protocol 28 Add Ugi.Singleton().DoAutoRotationCheck Version 1.16.12 - July 23, 2018 - Reader protocol 28 Updated French translations Android: Fix crash when an unrelated USB device is detached Version 1.16.13 - October 25, 2018 - Reader protocol 28 UI tweaks and cleanups More...
 
int SdkVersionMinor [get]
 SDK Version, minor More...
 
int SdkVersionBuild [get]
 SDK Version, build More...
 
DateTime SdkVersionDateTime [get]
 SDK Version, date/time (local time, to be consistent with DateTime.Now) More...
 
LoggingTypes LoggingStatus [get, set]
 Gets or sets the logging status. More...
 
static Action< string > LoggingCallback [get, set]
 Gets or sets the logging callback. More...
 
bool SendGrokkerSerialNumber [get, set]
 Gets or sets a value indicating whether this UGrokItApi.Ugi send grokker serial number. More...
 
bool CheckServerForUnknownDevices [get, set]
 Gets or sets a value indicating whether this UGrokItApi.Ugi check server for unknown devices. More...
 
bool SendFirstConnectionAndAutomaticConfigurationReports [get, set]
 Gets or sets a value indicating whether this UGrokItApi.Ugi send first connection and automatic configuration reports. More...
 
bool DoAutomaticFirmwareUpdate [get, set]
 Gets or sets a value indicating whether to do automatic firmware update. More...
 
bool DoAutoRotationCheck [get, set]
 Gets or sets a value indicating whether to do the automatic rotation check. More...
 

Structures

class  BatteryInfo
 Information returned by GetBatteryInfo More...
 
class  ConnectionStateListenerHelper
 

Types

enum  AudioJackLocation { AudioJackLocation.Default = 0, AudioJackLocation.Top = 1, AudioJackLocation.Bottom = 2 }
 User settings for audio jack location More...
 
enum  ConnectionStates { ConnectionStates.NotConnected, ConnectionStates.Connecting, ConnectionStates.IncompatibleReader, ConnectionStates.Connected }
 States for the connection More...
 
enum  GrokkerPasswordReturnValues {
  GrokkerPasswordReturnValues.Success, GrokkerPasswordReturnValues.NotAuthenticated, GrokkerPasswordReturnValues.WrongPassword, GrokkerPasswordReturnValues.NoPasswordSet,
  GrokkerPasswordReturnValues.NotConnected, GrokkerPasswordReturnValues.OtherError
}
 Values returned by SetGrokkerPassword and AuthenticateGrokker More...
 
enum  OngoingOperations { OngoingOperations.Inactive, OngoingOperations.Inventory, OngoingOperations.FirmwareUpdate, OngoingOperations.Other }
 Operation used by ReportConnectionStateAndBatteryInfoCallback More...
 
enum  LoggingTypes : int {
  LoggingTypes.InternalByteProtocol = 1, LoggingTypes.InternalConnectionErrors = 2, LoggingTypes.InternalConnectionState = 4, LoggingTypes.InternalPacketProtocol = 8,
  LoggingTypes.InternalCommand = 16, LoggingTypes.InternalInventory = 32, LoggingTypes.InternalFirmwareUpdate = 64, LoggingTypes.InternalBatteryStatus = 128,
  LoggingTypes.InternalPlatformSpecific = 256, LoggingTypes.State = 4096, LoggingTypes.Inventory = 8192, LoggingTypes.InventoryDetail = 16384,
  LoggingTypes.BatteryStatus = 32768
}
 Types of logging. The default is "State" logging. The internal logging types are primarily for debugging of the API itself. More...
 

Public Attributes

ConnectionStateDelegate ConnectionStateChanged
 Connection state delegate list More...
 
InventoryStateDelegate InventoryStateChanged
 Inventory state delegate list More...
 

Instance Method Documentation

◆ ActivityOnCreate()

void UGrokItApi.Ugi.ActivityOnCreate ( Android.App.Activity  activity,
bool  handleScreenRotation,
bool  allowRotationOnTablet 
)
inline

ANDROID ONLY: Notify Ugi that an Activity is created

Parameters
activityActivity being created
handleScreenRotationtrue to handle screen rotations
allowRotationOnTablettrue to rotate to any orientation on a tablet

◆ ActivityOnDestroy()

void UGrokItApi.Ugi.ActivityOnDestroy ( Android.App.Activity  activity)
inline

ANDROID ONLY: Notify Ugi that an Activity is being destroyed

Parameters
activityActivity being destroyed

◆ ActivityOnResume()

void UGrokItApi.Ugi.ActivityOnResume ( Android.App.Activity  activity)
inline

ANDROID ONLY: Notify Ugi that an activity is resuming

Parameters
activityActivity being resumed

◆ ActivityOnPause()

void UGrokItApi.Ugi.ActivityOnPause ( Android.App.Activity  activity)
inline

ANDROID ONLY: Notify Ugi that an activity is pausing

Parameters
activityActivity being paused

◆ ActivityUpdateHandleScreenRotation()

void UGrokItApi.Ugi.ActivityUpdateHandleScreenRotation ( Android.App.Activity  activity,
bool  handleScreenRotation,
bool  allowRotationOnTablet 
)
inline

ANDROID ONLY: Update the handleScreenRotation and allowRotationOnTablet flags for the activity

Parameters
activityActivity to change flags for
handleScreenRotationtrue to handle screen rotations
allowRotationOnTablettrue to rotate to any orientation on a tablet

◆ Singleton()

static Ugi UGrokItApi.Ugi.Singleton ( )
inlinestatic

Get the singleton object

Returns
The singleton object

◆ CreateSingleton() [1/2]

static void UGrokItApi.Ugi.CreateSingleton ( Android.Content.Context  context)
inlinestatic

ANDROID ONLY: Create a Ugi object Only one Ugi object may be created. This is normally called in onCreate() in the Application object.

Parameters
contextContext object (usually the application)

◆ CreateSingleton() [2/2]

static void UGrokItApi.Ugi.CreateSingleton ( )
inlinestatic

Create a Ugi object. Only one Ugi object may be created.

◆ Debug_setIsTablet()

void UGrokItApi.Ugi.Debug_setIsTablet ( bool  isTablet)
inline

Set the isTablet property. This can be useful for debugging.

Parameters
isTabletvalue to set

◆ OpenConnection()

void UGrokItApi.Ugi.OpenConnection ( )
inline

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.

◆ CloseConnection()

void UGrokItApi.Ugi.CloseConnection ( )
inline

Close connection to the reader.

◆ ConnectionStateDelegate()

delegate void UGrokItApi.Ugi.ConnectionStateDelegate ( ConnectionStates  state)

Delegate for connection state notifications

Parameters
stateNew connection state

◆ SetGrokkerPassword()

void UGrokItApi.Ugi.SetGrokkerPassword ( string  password,
Action< GrokkerPasswordReturnValues completion 
)
inline

Authenticate the Grokker.

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

◆ AuthenticateGrokker()

void UGrokItApi.Ugi.AuthenticateGrokker ( string  password,
Action< GrokkerPasswordReturnValues completion 
)
inline

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

◆ StartInventory() [1/3]

UgiInventory UGrokItApi.Ugi.StartInventory ( IUgiInventoryDelegate  inventoryDelegate,
UgiRfidConfiguration  configuration,
List< UgiEpc epcs 
)
inline

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
inventoryDelegateDelegate object to report back to
configurationConfiguration to use
epcsEPCs to find
Returns
UgiInventory object that will hold the results of this inventory

◆ StartInventoryIgnoringEpcs()

UgiInventory UGrokItApi.Ugi.StartInventoryIgnoringEpcs ( IUgiInventoryDelegate  inventoryDelegate,
UgiRfidConfiguration  configuration,
List< UgiEpc epcsToIgnore 
)
inline

Start running inventory, ignoring specific EPCs

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

◆ StartInventory() [2/3]

UgiInventory UGrokItApi.Ugi.StartInventory ( IUgiInventoryDelegate  inventoryDelegate,
UgiRfidConfiguration  configuration 
)
inline

Start running inventory to find any tags

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

◆ StartInventory() [3/3]

UgiInventory UGrokItApi.Ugi.StartInventory ( IUgiInventoryDelegate  inventoryDelegate,
UgiRfidConfiguration  configuration,
UgiEpc  epc 
)
inline

Start running inventory to find one specific tag

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

◆ InventoryStateDelegate()

delegate void UGrokItApi.Ugi.InventoryStateDelegate ( )

Delegate for inventory state notifications

◆ GetLocalizedRegionName()

string UGrokItApi.Ugi.GetLocalizedRegionName ( string  unlocalizedRegionName)
inline

Get the localized region name for an unlocalized region name

Parameters
unlocalizedRegionNameUnlocalized region name.
Returns
The localized region name.

◆ RequiresFirmwareVersion()

void UGrokItApi.Ugi.RequiresFirmwareVersion ( string  firmwareVersion)
inline

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

Parameters
firmwareVersionThe minimum firmware version

◆ GetBatteryInfo()

void UGrokItApi.Ugi.GetBatteryInfo ( Action< BatteryInfo completion)
inline

Get battery information from the reader

Parameters
completionCode called with the batery information

◆ ReportConnectionStateAndBatteryInfoPeriodicallyDelegate()

delegate void UGrokItApi.Ugi.ReportConnectionStateAndBatteryInfoPeriodicallyDelegate ( ConnectionStates  connectionState,
OngoingOperations  ongoingOperation,
bool  batteryInformationIsValid,
bool  externalPowerIsConnected,
bool  isCharging,
bool  canScan,
bool  canGetBatteryWhileScanning,
bool  temperatureAtOrAboveThreshold,
bool  temperatureWithin5DegreesOfThreshold,
bool  temperatureWithin10DegreesOfThreshold,
bool  temperatureWithin20DegreesOfThreshold,
int  averagedBatteryPercentage,
string  statusDescription 
)

Callback function for reportBatteryInfoPeriodically

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

◆ ReportConnectionStateAndBatteryInfoPeriodically()

Object UGrokItApi.Ugi.ReportConnectionStateAndBatteryInfoPeriodically ( ReportConnectionStateAndBatteryInfoPeriodicallyDelegate  callback)
inline

Periodically report connection state and battery information to the callback.

Returns
The connection state and battery info periodically.
Parameters
callbackCallback function
Returns
Object to pass to endReportConnectionStateAndBatteryInfoPeriodically

◆ EndReportConnectionStateAndBatteryInfoPeriodically()

void UGrokItApi.Ugi.EndReportConnectionStateAndBatteryInfoPeriodically ( Object  objectFromReportConnectionStateAndBatteryInfoPeriodically)
inline

End periodic connection state and battery info reports.

Parameters
objectFromReportConnectionStateAndBatteryInfoPeriodicallyObject returned from reportConnectionStateAndBatteryInfoPeriodically.

◆ Debug_setBatteryPercentageAdjustment()

void UGrokItApi.Ugi.Debug_setBatteryPercentageAdjustment ( int  adjustment,
Action< bool >  completion 
)
inline

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 UGrokItApi.Ugi.Debug_setTemperatureAdjustment ( int  adjustment,
Action< bool >  completion 
)
inline

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
completionCode to run afterwards

◆ Log()

static void UGrokItApi.Ugi.Log ( string  s)
inlinestatic

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

Parameters
sstring to log

◆ InvokeAudioReconfiguration()

void UGrokItApi.Ugi.InvokeAudioReconfiguration ( )
inline

Invoke the audio reconfiguration process

◆ InvokeAudioJackLocation()

void UGrokItApi.Ugi.InvokeAudioJackLocation ( )
inline

Invoke the audio jack location setting process

Property Documentation

◆ CurrentActivity

Android.App.Activity UGrokItApi.Ugi.CurrentActivity
get

ANDROID ONLY: Get the current tracked activity

The current activity.

◆ GetAudioJackLocationPreference

AudioJackLocation UGrokItApi.Ugi.GetAudioJackLocationPreference
getset

Gets or sets the get audio jack location preference.

The get audio jack location preference.

◆ IsTablet

bool UGrokItApi.Ugi.IsTablet
getset

Gets or whether the device is a tablet

true if device is a tablet

◆ IsInOpenConnection

bool UGrokItApi.Ugi.IsInOpenConnection
get

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

true if in open connection

◆ IsAnythingPluggedIntoAudioJack

bool UGrokItApi.Ugi.IsAnythingPluggedIntoAudioJack
get

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

true if anything is plugged into audio jack

◆ ConnectionState

ConnectionStates UGrokItApi.Ugi.ConnectionState
get

Gets the current connection state

The state of the connection.

◆ IsConnected

bool UGrokItApi.Ugi.IsConnected
get

Gets a value indicating whether a reader is connected.

true if a reader is connected

◆ IsGrokkerAuthenticationRequired

bool UGrokItApi.Ugi.IsGrokkerAuthenticationRequired
get

Gets a value indicating whether the Grokker requires authentication.

true if the Grokker requires authentication

◆ GrokkerPasswordExists

bool UGrokItApi.Ugi.GrokkerPasswordExists
get

Gets a value indicating whether the Grokker has a password.

true if the Grokker has a password

◆ ActiveInventory

UgiInventory UGrokItApi.Ugi.ActiveInventory
get

Get the active inventory, if any

The active inventory.

◆ RequiredProtocolVersion

int UGrokItApi.Ugi.RequiredProtocolVersion
get

Protocol version that the host requires

The required protocol version.

◆ SupportedProtocolVersion

int UGrokItApi.Ugi.SupportedProtocolVersion
get

Protocol version that the host supports

The supported protocol version.

◆ ReaderProtocolVersion

int UGrokItApi.Ugi.ReaderProtocolVersion
get

Protocol version of the reader

The reader protocol version.

◆ ReaderHardwareModel

string UGrokItApi.Ugi.ReaderHardwareModel
get

Reader's model

The reader hardware model.

◆ ReaderHardwareRevision

int UGrokItApi.Ugi.ReaderHardwareRevision
get

Reader's hardware version

The reader hardware revision.

◆ FirmwareVersionMajor

int UGrokItApi.Ugi.FirmwareVersionMajor
get

Firmware version in the reader, major

The firmware version major.

◆ FirmwareVersionMinor

int UGrokItApi.Ugi.FirmwareVersionMinor
get

Firmware version in the reader, minor

The firmware version minor.

◆ FirmwareVersionBuild

int UGrokItApi.Ugi.FirmwareVersionBuild
get

Firmware version in the reader, build

The firmware version build.

◆ ReaderSerialNumber

int UGrokItApi.Ugi.ReaderSerialNumber
get

Reader's unique serial number

The reader serial number.

◆ UnlocalizedRegionName

string UGrokItApi.Ugi.UnlocalizedRegionName
get

Name of the region of the world the Grokker is set to operate in

The name of the region.

◆ MaxPower

double UGrokItApi.Ugi.MaxPower
get

Maximum power that the reader can use, in dBm

The max power.

◆ MaxSensitivity

int UGrokItApi.Ugi.MaxSensitivity
get

Maximum sensitivity that the reader can use, in dBm

The max sensitivity.

◆ DeviceInitializedSuccessfully

bool UGrokItApi.Ugi.DeviceInitializedSuccessfully
get

true if device initialized successfully

true if device initialized successfully; otherwise, false.

◆ ReaderDescription

string UGrokItApi.Ugi.ReaderDescription
get

description of the reader, generally used for debugging

The reader description.

◆ SdkVersionMajor

int UGrokItApi.Ugi.SdkVersionMajor
get

SDK Version, major Version 1.7.3 - February 18, 2015 - Reader protocol 19 First Xamarin SDK Version 1.7.5 - March 9, 2015 - Reader protocol 19 Bug fix for passing both a select mask and EPCs to startInventory Bug fix for connection state transitions while running inventory 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.10 - May 14, 2015 - Reader protocol 19 Expanded Android device support Version 1.7.10 - May 14, 2015 - Reader protocol 19 Expanded Android device support Minor bug fixes Version 1.7.11 - May 26, 2015 - Reader protocol 20 Android: Expanded device support (in conjunction with firmware 1.9.5) Version 1.7.13 - July 9, 2015 - Reader protocol 20 Do not allow getting battery level during firmware update Android: Expanded device support, bug fix Version 1.7.15 - July 9, 2015 - Reader protocol 20 Android: Expanded device support, bug fix Version 1.7.16 - August 15, 2015 - Reader protocol 20 Fix for crashing bug in set region Version 1.7.17 - August 26, 2015 - Reader protocol 20 Android: 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 iOS9 bug fix Android 6.0 (Marshmallow) support 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 Android: 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 iOS: Fix for iOS6 and initializing new Grokkers Android: Android 6.0 (Marshmallow) compatibility Version 1.8.4 - October 26, 2015 - Reader protocol 20 Android: Android 6.0 (Marshmallow) compatibility Version 1.8.5 - October 28, 2015 - Reader protocol 20 iOS: Fix for accidentally hitting the dictation key while Grokker is connected Android: Fix for crash on device with illegal audio properties Version 1.8.6 - November 24, 2015 - Reader protocol 20 Android: 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 Fix in Andropid sample app for OnPause and OnResume Android device compatibility Version 1.9.3 - February 11, 2016 - Reader protocol 21 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 in reportConnectionStateAndBatteryInfoPeriodically Version 1.10.1 - April 2, 2016 - Reader protocol 21 UgiUiUtils rework, added UI building blocks Version 1.11.1 - May 20, 2016, 2016 - Reader protocol 21 More work on UI building blocks, restructured Xamarin.Forms app Version 1.11.2 - May 31, 2016, 2016 - Reader protocol 21 Fix bug wqith ConnectionStateChanged introduced in 1.11.1 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 Version 1.13.2 - September 28, 2016 - Reader protocol 23 Bug fixes Version 1.13.3 - October 28, 2016 - Reader protocol 23 Check battery level before doing firmware update Small translation fixes Small bug fixes Version 1.13.4 - November 23, 2016 - Reader protocol 23 Add image option to UgiTitleView Android: Fix for race condition when starting an app with the device "off" (as from the debugger) Android: Fix UgiUiUtil.showOkNeutralCancel when using UGI style dialogs Android: Fix bug writing a data and passing data==previousData Android: Fix localRefTable issue with battery status strings Version 1.14.1 - December 15, 2016 - Reader protocol 23 Support a password in readTag (requires firmware 1.12.3) Support for killTag (requires firmware 1.12.3) Added LoggingTypes.BatteryStatus, LoggingTypes.InternalBatteryStatus and LoggingTypes.InternalPlatformSpecific 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) Version 1.15.2 - January 31, 2017 - Reader protocol 26 Android: fix for intermittent crash bug wso156th a few specific devices Version 1.15.3 - February 8, 2017 - Reader protocol 26 iOS: Fix bug in 64-bit devices and per-read data Version 1.15.4 - February 15, 2017 - Reader protocol 26 Small localization changes Version 1.15.6 - March 31, 2017 - Reader protocol 26 Updated iOS and Android SDKs Version 1.16.1 - July 14, 2017 - Reader protocol 26 Updated iOS and Android SDKs Version 1.16.2 - September 27, 2017 - Reader protocol 26 Fix minor memory leak Minor region table changes Add support for China frequencies Support iOS 11, drop support for iOS6 and iOS7 Version 1.16.4 - October 13, 2017 - Reader protocol 26 Fix SingleFind mode, broken in previous SDK Version 1.16.5 - January 11, 2018 - Reader protocol 27 Fix bug with GoForward(xxx, true) in Android forms app Fix to work with very old firmware (1.6.2) still in a few Grokkers Android Compatibility work Minor bug fixes Version 1.16.6 - March 9, 2018 - Reader protocol 27 Fix bug writing more than 200 bytes to memory when previous memory contents are unknown Android - Fix bug passing over 500 EPCs to ignore Distribute as NuGet package Version 1.16.7 - May 4, 2018 - Reader protocol 27 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 Fix ReportConnectionStateAndBatteryInfoPeriodically to work again on iOS Version 1.16.10 - June 14, 2018 - Reader protocol 28 Fix DateTime fields to return local time to be consistent with DateTime.Now, fix iOS times Version 1.16.11 - June 28, 2018 - Reader protocol 28 Add Ugi.Singleton().DoAutoRotationCheck Version 1.16.12 - July 23, 2018 - Reader protocol 28 Updated French translations Android: Fix crash when an unrelated USB device is detached Version 1.16.13 - October 25, 2018 - Reader protocol 28 UI tweaks and cleanups

The sdk version major.

◆ SdkVersionMinor

int UGrokItApi.Ugi.SdkVersionMinor
get

SDK Version, minor

The sdk version minor.

◆ SdkVersionBuild

int UGrokItApi.Ugi.SdkVersionBuild
get

SDK Version, build

The sdk version build.

◆ SdkVersionDateTime

DateTime UGrokItApi.Ugi.SdkVersionDateTime
get

SDK Version, date/time (local time, to be consistent with DateTime.Now)

When the SDK was built

◆ LoggingStatus

LoggingTypes UGrokItApi.Ugi.LoggingStatus
getset

Gets or sets the logging status.

The logging status

◆ LoggingCallback

Action<string> UGrokItApi.Ugi.LoggingCallback
staticgetset

Gets or sets the logging callback.

The logging callback.

◆ SendGrokkerSerialNumber

bool UGrokItApi.Ugi.SendGrokkerSerialNumber
getset

Gets or sets a value indicating whether this UGrokItApi.Ugi send grokker serial number.

true if send grokker serial number; otherwise, false.

◆ CheckServerForUnknownDevices

bool UGrokItApi.Ugi.CheckServerForUnknownDevices
getset

Gets or sets a value indicating whether this UGrokItApi.Ugi check server for unknown devices.

true if check server for unknown devices; otherwise, false.

◆ SendFirstConnectionAndAutomaticConfigurationReports

bool UGrokItApi.Ugi.SendFirstConnectionAndAutomaticConfigurationReports
getset

Gets or sets a value indicating whether this UGrokItApi.Ugi send first connection and automatic configuration reports.

true if send first connection and automatic configuration reports

◆ DoAutomaticFirmwareUpdate

bool UGrokItApi.Ugi.DoAutomaticFirmwareUpdate
getset

Gets or sets a value indicating whether to do automatic firmware update.

true to do automatic firmware update

◆ DoAutoRotationCheck

bool UGrokItApi.Ugi.DoAutoRotationCheck
getset

Gets or sets a value indicating whether to do the automatic rotation check.

true to do the automatic rotation check

Enumeration Documentation

◆ AudioJackLocation

User settings for audio jack location

Enumerator
Default 

Use the SDK's notion of where the audio jack is

Top 

Audio jack is on top of the device

Bottom 

Audio jack is on bottom of the device

◆ ConnectionStates

States for the connection

Enumerator
NotConnected 

Nothing connected to audio port

Connecting 

Something connected to audio port, trying to connect

IncompatibleReader 

Connected to an reader with incompatible firmware

Connected 

Connected to reader

◆ GrokkerPasswordReturnValues

Values returned by SetGrokkerPassword and AuthenticateGrokker

Enumerator
Success 

Successful

NotAuthenticated 

Failure, grokker is not authenticated

WrongPassword 

Incorrect password passed

NoPasswordSet 

No password is set, so can't authenticate

NotConnected 

Grokker is not connected

OtherError 

other error

◆ OngoingOperations

Operation used by ReportConnectionStateAndBatteryInfoCallback

Enumerator
Inactive 

No operation active

Inventory 

Running inventory

FirmwareUpdate 

Firmware update in progress

Other 

Other operation in progress

◆ LoggingTypes

enum UGrokItApi.Ugi.LoggingTypes : int
strong

Types of logging. The default is "State" logging. The internal logging types are primarily for debugging of the API itself.

Enumerator
InternalByteProtocol 

Lowest level communication protocol, connection handshaking and byte send/receive

InternalConnectionErrors 

Low level communication errors

InternalConnectionState 

Low level connection state changes

InternalPacketProtocol 

Packet send/receive

InternalCommand 

Command send/receive

InternalInventory 

Low-level inventory

InternalFirmwareUpdate 

Low-level firmware update

InternalBatteryStatus 

Low-level battery status reporting

InternalPlatformSpecific 

Low-level platform specific debugging

State 

Connection and inventory state

Inventory 

Inventory activity

InventoryDetail 

Inventory details

BatteryStatus 

Battery status details


Class Documentation

◆ UGrokItApi::Ugi::BatteryInfo

class UGrokItApi::Ugi::BatteryInfo
Class Members
bool CanScan true if battery is capable of scanning
bool ExternalPowerIsConnected true if external power is connected
bool IsCharging true if battery is charging
bool TemperatureAtOrAboveThreshold true if temperature is at or above the threshold for scanning
bool TemperatureWithin5DegreesOfThreshold true if temperature is within 5 degrees C of the threshold for scanning
bool TemperatureWithin10DegreesOfThreshold true if temperature is within 10 degrees C of the threshold for scanning
bool 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

Member Data Documentation

◆ ConnectionStateChanged

ConnectionStateDelegate UGrokItApi.Ugi.ConnectionStateChanged

Connection state delegate list

◆ InventoryStateChanged

InventoryStateDelegate UGrokItApi.Ugi.InventoryStateChanged

Inventory state delegate list