Connect a Contactless Reader
You need to install and configure the Reader SDK.
Did you know?
If you are using a Magstripe Reader, you do not need to write explicit code to connect the Reader. If you are using a Contactless and Chip Reader, you must add code to handle pairing.
Add code to your checkout activity to display a button that launches the Square Card Reader settings flow by calling
ReaderManager#startReaderSettingsActivity() and passing in the activity.
Add a callback (
onReaderSettingsResult()) to the Reader Manager in the
onCreate() method of your checkout activity using
onReaderSettingsResult() method by adding code to respond to the pairing result.
The result object provided to
ReaderSettingsActivityCallback.onResult() does not contain a success value. It only contains a
ResultError object in the case of an error.
Add code to clear the Reader settings callback reference in your
onDestroy() method to avoid memory leaks.