1. Home
  2. Docs
  3. Handheld Common
  4. Anysend
  5. Usage

Usage

Installation

You can download and install the app from here.

Preamble

There are two different ways to use this app. The “Keyboard” method will write any data through the keyboard buffer to the currently focused text field. This means the RFID reader and scanner can be used in any 3rd party app without any code change.
The “Broadcast” method will send RFID and barcode data as a broadcast which has to be received in your app’s code. The second approach will require you to add some code to your app but will give you much more control over the service.
This document will guide you through the different methods you can integrate this service into your code.

Basic usage

In the most basic implementation, you’ll start the service to make sure it’s running and register a broadcast receiver to get the results.

When exiting your app you can stop the service and should unregister the receiver

Advanced usage

The basic example will work in most cases but there is one important thing to consider regarding the RFID Reader.
The module will scan for tags at a very short interval. While this means that tags will be detected quickly, it can also mean that the same tag will be scanned twice which will call the receiver more than once.
To prevent this, the reader can be turned on an off from your app. This can be used to only scan if a button is pressed and to stop after a successful read.

The following to functions let you control the reader

To only scan one tag, call disableRfid() at the beginning of your receiver function.

To only scan while a button is pressed you can use the following code in your activity