apidocs / com.nimmsta.core.android.accessibilityservice / NimmstaAccessibilityService

NimmstaAccessibilityService

class NimmstaAccessibilityService : AccessibilityService, NIMMSTAEventHandler

Provides an Accessibility Service to the Android System. Shows permanent Notification with the Connection Status of the Scanner using AccessibilityNotificationService Inputs scanned barcodes into editable Views using AccessibilityInputService

Constructors

<init>

Provides an Accessibility Service to the Android System. Shows permanent Notification with the Connection Status of the Scanner using AccessibilityNotificationService Inputs scanned barcodes into editable Views using AccessibilityInputService

NimmstaAccessibilityService()

Properties

serviceConnection

var serviceConnection: NIMMSTAServiceConnection?

Functions

didConnectAndInit

Gets called if a scanner gets connected updates notification and scanner display

fun didConnectAndInit(device: NIMMSTADevice): Unit

didScanBarcode

Gets called if the scanner has scanned a barcode Tries to input barcode in input field Handles success

fun didScanBarcode(device: NIMMSTADevice, barcode: Barcode, event: ScanEvent): Unit

onAccessibilityEvent

Gets called if the view of the device changed

fun onAccessibilityEvent(event: AccessibilityEvent?): Unit

onDestroy

fun onDestroy(): Unit

onError

Get's called if the scanner throws an error

fun onError(device: NIMMSTADevice?, throwable: Throwable): Boolean

onInterrupt

fun onInterrupt(): Unit

onServiceConnected

Gets called when the AccessibilityService is activated in the Settings and on Phone starts Connects to the NimmstaService Creates Notification Service

fun onServiceConnected(): Unit

onUnbind

Gets called if the Accessibility service gets stopped for some reason Disabled or Phone Shutdown

fun onUnbind(intent: Intent?): Boolean

Companion Object Properties

clipboardManager

var clipboardManager: ClipboardManager?

TAG

const val TAG: String

Companion Object Functions

isEnabled

fun isEnabled(context: Context): Boolean