On GitHub, you will find the SDKs for Android and iOS. A sample app is included in each repository inside a folder titled Example.


In your existing Android application, open your build.gradle file and add the following dependencies:

// SDK dependency
compile 'com.digital2go:sdk:1.0.0'
// External dependencies
compile ''
compile ''
compile ''
compile ''
compile ''
compile ''
compile 'com.kontaktio:sdk:3.0.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.retrofit:retrofit:1.9.0'
// Push Notifications
compile ''
compile 'com.amazonaws:aws-android-sdk-sns:2.2.11'

Also in your build.gradle file, enable the multidex in your defaultConfig{} as shown below:

defaultConfig {
	multiDexEnabled true

Now, go into your strings.xml file located at app -> src -> main -> res -> values -> strings.xml and add the following:

<string name="kontakt_io_api_key">YOUR KONTAKTIO API KEY</string>
<string name="aws_key">YOUR AWS KEY</string>
<string name="aws_secret">YOUR AWS SECRET</string>
<string name="app_name">YOUR APP NAME WITHOUT SPACES</string>
<string name="d2go_app_name">YOUR D2GO APP USERNAME</string>
<string name="d2go_app_pass">YOUR D2GO APP PASSWORD</string>

To make use of the SDK, you need to start with the initContext represents application context and the token attribute stands for value provided by the Firebase Cloud Messaging.

public class Activity extends AppCompatActivity {
  private String firebaseToken;
      protected void onCreate(Bundle savedInstanceState) {
          firebaseToken = FirebaseInstanceId.getInstance().getToken();
      protected void onResume() {
          D2GOSDK.init(getApplicationContext(), firebaseToken);


To create a new project in Xcode, click File -> New -> Project, then select your template, indicate your product name, organization name, organization identifier, and select the Swift programming language.

Our example iOS app uses Amazon Web Services (specifically, Cognito) to handle the creation, confirmation, and authentication of user accounts. If you wish to add this functionality to your project, add the Amazon static libraries. This can be accomplished by right-clicking under your app folder, creating a new group, renaming it to “AmazonServices”, and copying the Amazon iOS SDK folder into this group.

We use Kubernetes to deploy, scale, and manage our application. To use it, you must prepare your AWS account for use with the Kubernetes CLI tool, which requires setting up an IAM user. More information is available here.

Run ruby pod init inside your project folder to create a podfile. Add the D2GOClient pod and its dependencies to your podfile as shown below:

source ''

platform :ios, '10.0'
    target :'YourAppName' do
        pod 'AWSCore', '~> 2.4.12'
        pod 'AWSMobileAnalytics', '~> 2.4.12'
        pod 'AWSCognitoIdentityProvider', '~> 2.4.12'
        pod 'AWSSNS', '~> 2.4.12'
        pod 'AWSS3', '~> 2.4.12'
        pod 'KontaktSDK'
        pod 'KeyChainSwift'

        pod 'D2GOClient'

Next, you need to insert some keys into your Info.plist file as demonstrated below:


<!-- Contact Digital2Go SDK support -->


In reference to the code snippet shown above, the D2GOApiLoginPasswordD2GOApiLoginUsernameD2GOBeaconUUIDForD2Go, and D2GOKonkaktAPIKey keys can be obtained via the D2GO platform.

The CognitoUserPoolAppCleintIDCognitoUserPoolAppClientSecret, and CognitoUserPoolID keys can be obtained upon creating an Amazon Web Services account and creating a Cognito User Pool.

The SNSAccessKey and SNSSecretKey keys can be acquired via our login API (see the authorization section for more details).

You should also copy and paste the following authorizations for location services into your Info.plist file:

<string>App explanation for always: "Need permission to spot iBeacons" If your only allow access to your location while your are using the app, some features may not work while this app is in the background.</string>
<string>Do you allow this app to know your current location?</string>