Summary
The following will help you integrate Amazon API Libraries with Android Studio.
IAP: Covered here: https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs-v2/getting-started-with-iap-v2.0#Setting Up Your Development Environment: Android Studio
Mobile Ads:
- Add the amazon ads jar to your libs directory for your Android Studio project, usually located at [Projectname]/app/libs
- Under File>Project Structure, click on the module for your app from the left hand list.
- Click on the dependencies tab
- Click on the green plus sign on the right of the window and select “File dependency”
- Navigate to the Amazon ads jar in the libs folder, and click okay
- Click Apply
- Amazon Ads should now be included as a library in your app
- Follow the instructions located at https://developer.amazon.com/public/apis/earn/mobile-ads/docs/quick-start#2. Update the Android Manifest to complete mobile ads integration
GameCircle:
- Download and unzip the Amazon Mobile App SDK: https://developer.amazon.com/public/resources/development-tools/sdk
- Either create a new project or open an existing android project in Android Studio
- Import the GameCircleSDK folder from the Mobile App SDK via File>”Import Module”
- Under File>”Project Structure”, navigate to your main application, then the dependencies tab.
- Under the dependencies tab, click the green plus sign on the right, then click “module dependency” and select the GameCircleSDK module that was imported earlier.
- In the AndroidManifest.xml for the GameCircleSDK module, change the package name under “package=”. The exact name does not matter, as long as it is not “com.amazon.ags”.
- In the AndroidManifest.xml for the main application, add the following: a. In the entry, add “xmlns:tools=http://schemas.android.com/tools” b. In the entry, add “tools:replace=”android:label””
- At this point, doing a normal build will work
Mobile Associates:
- Add the Drawable folder from the Mobile Associates sdk folder to your projects res/drawable folder
- Add the Mobile Associates jar to your libs directory for your Android Studio project, usually located at [Projectname]/app/libs
- Under File>Project Structure, click on the module for your app from the left hand list.
- Click on the dependencies tab
- Click on the green plus sign on the right of the window and select “File dependency”
- Navigate to the Amazon Mobile Associates jar in the libs folder, and click okay
- Click Apply 8. Amazon Mobile Associates should now be included as a library in your app
Amazon Device Messaging:
- Add the Amazon Device Messasing jar to your libs directory for your Android Studio project, usually located at [Projectname]/app/libs
- Under File>Project Structure, click on the module for your app from the left hand list.
- Click on the dependencies tab
- Click on the green plus sign on the right of the window and select “File dependency”
- Navigate to the Amazon Device Messaging jar in the libs folder, and click okay
- Click Apply
- Amazon Device Messaging should now be included as a library in your app
Amazon Maps:
See the Amazon Maps API Support Library for Android Studio Instructions https://developer.amazon.com/public/apis/experience/maps/docs-v2/configuring-your-project-to-use-the-amazon-maps-api-v2#Referencing
Keywords: Android Studio, Libraries, GameCircle, Amazon Device Messaging, Mobile Associates, Mobile Ads
KB_0002