Running the Clover Go Android SDK sample app
(Legacy Content)
Initial SDK setup
- In Android Studio, create or open your own project.
- Clone
remote-pay-android-go
into a separate project. - Using Finder (Finder/Explorer), copy the
roam
folder into the root of your project. - Update your
settings.gradle
file to include the roam module. It will look something like the following:
include ':roam', ':<your_app_module_name>
- In your project’s
build.gradle
file, add themavenCentral()
repository in thebuildscript
block:
buildscript {
repositories {
mavenCentral()
jcenter()
google()
}
- In your app module’s
build.gradle
file, add the following dependencies forroam
andremote-pay-android-go-connector
:
dependencies {
...
api project(':roam')
implementation ("com.firstdata.clovergo:remote-pay-android-go-connector:3.3.1.4@aar") {
transitive = true
}
}
- In your
GoStartupActivity.java
, set yourdemoAccessToken
,goApiKey
,goSecret
,oAuthClientId
, andoAuthClientSecret
for the sandbox environment:
goApiKey = "Get this value from your DevRel representative";
goSecret = "Get this value from your DevRel representative";
demoAccessToken = "Access token generated with the OAuth flow";
oAuthClientId = "Clover app ID";
oAuthClientSecret = "Clover app secret";
Important sample code to review
Once you have your app module created, you can look at the remote-pay-android-example-pos activities, such as StartupActivity
and ExamplePOSActivity
, to see how the Clover or Clover Go connectors are created and implemented. The ExamplePOSActivity
also has listener implementations you can reference.
The remote-pay-android-connector
module contains the connector implementations for both Clover (CloverConnector
) and Clover Go (CloverGoConnector
). CloverConnector
is used with the Clover Mini and Flex. CloverGoConnector
is used with standard Android phones and tablets using Clover's audio jack (RP350) and Bluetooth (RP450) card readers.
Updated about 1 month ago