Skip to main content

SoftSpot API

Command Intents

Applications can send commands to Datalogic SoftSpot through a set of API intents. These intents perform the same actions that are available through the SoftSpot application. They can be useful to issues commands in response to a system event, such as the start of a user login, or the reporting of an error.

To avoid the potential for any application other than Datalogic SoftSpot from processing the Intent, all intents should be created using the following package name for the recipient:

com.datalogic.softspot

The available intents with specific details on their behavior are listed below.

Enable SoftSpot

  • Intent Action: com.datalogic.softspot.ENABLE
  • Intent Data: None
  • Intent Extra Data: None

SoftSpot is enabled (started) using the existing configuration settings. If SoftSpot is already started, this command will be ignored.

Disable SoftSpot

  • Intent Action: com.datalogic.softspot.DISABLE
  • Intent Data: None
  • Intent Extra Data: None

Any currently running SoftSpot is disabled. If SoftSpot was not started, this command will be ignored.

Show SoftSpot

  • Intent Action: com.datalogic.softspot.SHOW
  • Intent Data: None
  • Intent Extra Data: None

Show any currently running SoftSpot (assuming it was hidden). If SoftSpot was not enabled, this command will be ignored.

Hide SoftSpot

  • Intent Action: com.datalogic.softspot.HIDE
  • Intent Data: None
  • Intent Extra Data: None

Hide any currently visible SoftSpot. If SoftSpot was not enabled, this command will be ignored.

Sample code

The following code fragment illustrates how to issue each of the SoftSpot intents from an activity.

fun spotDemo()
{
val spotPackage = "com.datalogic.softspot"

// Create/Send intent to enable SoftSpot.
val enableSpot = Intent("com.datalogic.softspot.ENABLE")
enableSpot.setPackage(spotPackage)
sendBroadcast(enableSpot)

// Create/Send intent to hide SoftSpot.
val hideSpot = Intent("com.datalogic.softspot.HIDE")
hideSpot.setPackage(spotPackage)
sendBroadcast(hideSpot)

// Create/Send intent to show SoftSpot.
val showSpot = Intent("com.datalogic.softspot.SHOW")
showSpot.setPackage(spotPackage)
sendBroadcast(showSpot)

// Create/Send intent to disable SoftSpot.
val disableSpot = Intent("com.datalogic.softspot.DISABLE")
disableSpot.setPackage(spotPackage)
sendBroadcast(disableSpot)
}