This section will go over how to download and run the app.
You can download the sample app from our GitHub
RevTwoSample app has a deployment target of Android 4.0.3 (ICE_CREAM_SANDWICH_MR1, API Level: 15) so make sure you have the latest updated version of Android Studio.
Add Your App Keys
- After you clone the sample app from our GitHub, log into your account at revtwo.com and go to your app models page. Click on the RevTwoSample app logo.
- Clicking on the app takes you to the definition page of the app. Here you can edit an app’s info and change which widgets are enabled on the app. For now, we just need the app key. Scroll down to the section called: Add RevTwo to RevTwo Sample.
- Now open up the RevTwo Sample App in Android Studio by clicking Open an existing Android Studio project and navigating to the Sample App folder you have downloaded from GitHub, then clicking OK.
- Download revtwolib_android.zip, extract revtwolib.aar file and add it under the app/libs folder.
- Uncomment the following line inside dependencies block in app build.gradle
- Open RevTwoSplashActivity.java (app > java > com.revtwo.revtwo > RevTwoSplashActivity.java) and replace initialize call with the code snippet on your Model’s page under Java tab.
- Save the file and run the app on your device or simulator and it will register with RevTwo Portal.
- Go to the Developer tab and you will see your device or simulator in the list.
App Code Overview
The RevTwoSample App is a simple app written in Java. Once you have added your product keys, RevTwoSample will be all set to communicate with your account.
The goal of RevTwoSample is to demonstrate the functionality offered by the RevTwo In-App Support library. Using this app will give you a platform to see the library in action and easily find examples of how to use various features.
For simplicity, all the views for the app have been added into app > res > layout.
The tutorials in this folder cover the RevTwo features that will require some work by the app developer. All other functionality, such as screen sharing, is provided with no additional work by the developer. The following sections will cover these tutorials in greater detail.