Set up your environment
- Prerequisites
- Adding Drawable Folder to Resources
- Adding Mobile Associates JAR to your Eclipse project
- Adding Mobile Associates API Reference to your Eclipse Environment
Prerequisites
The Mobile Associates API is provided as a JAR library which you include in your Android project. This can be done with any IDE. The following guide will walk you through the steps using Eclipse. Before getting started you will need to have Eclipse and the Android SDK installed. You can find detailed information on Eclipse and Android at the following links:
Adding Drawable Folder to Resources
A Drawable folder is included in the Mobile Associates folder. You need to copy the content into application's res/drawable folder.
Adding Mobile Associates JAR to your Eclipse project
- In Eclipse, create or navigate to your Android project root folder, right click, and select the Properties view.
- Click Java Build Path on the left
- Click on the Libraries tab at the top
- Click Add External Jars on the right
- Navigate to the where you extracted the APPs-SDK.zip file, navigate to Apps-SDK/Android/MobileAssociates/lib folder and select the Mobile Associates jar file
- Click Open
- Click OK
Adding Mobile Associates API Reference to your Eclipse Environment
Many developers find it useful to add Mobile Associates API Reference to their project as well. This allows you to view the reference documentation within Eclipse, similar to Java and the Android SDK.
- In Eclipse, navigate to your Android project root folder, right click, and select the Properties view.
- Click Java Build Path on the left
- Click on the Libraries tab at the top
- Expand the Mobile Associates Jar
- Select Javadoc location
- Click Edit
- Click Browse
- Navigate to the directory you extracted the APPs-SDK.zip file, then to the Apps-SDK/Android/MobileAssociates/documentation/API-Reference folder
- Click OK
- Click OK
The Mobile Associates API reference is now integrated into Eclipse and you should see windows like the below screenshot directly from Eclipse.