Skip to main content
Version: 3.x.x

Integration

To enable androidX add next parameters to yours gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

Check if you have the necessary settings in the build.gradle (project level) file, if not, please add them:

buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://maven.google.com/' }
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'com.google.gms:google-services:4.3.15'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5'
}
}

allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://maven.google.com/' }
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com/' }
maven { url "https://plugins.gradle.org/m2/" }
}
}

In the file build.gradle (application level) add:

android {
defaultConfig {
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
}

repositories {
google()
maven {
url 'https://artifactory101xp.jfrog.io/artifactory101xp/p101xp-android-stage/'
credentials {
username = "sdk-user"
password = "Dt!k(5JR&6"
}
}
maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
maven { url 'https://maven.google.com/'}
maven { url 'https://jitpack.io' }
maven { url 'https://android-sdk.is.com/' }
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation "androidx.appcompat:appcompat:1.6.1"
implementation "androidx.multidex:multidex:2.0.1"

implementation 'com.platform101xp:sdk_amazon:3.XX.XX'
implementation 'com.platform101xp:advertising_amazon:3.XX.XX'
implementation 'com.platform101xp:api_amazon:3.XX.XX'
implementation 'com.platform101xp:authorization_amazon:3.XX.XX'
implementation 'com.platform101xp:base_amazon:3.XX.XX'
implementation 'com.platform101xp:billing_amazon:3.XX.XX'
implementation 'com.platform101xp:utils_amazon:3.XX.XX'
}

apply plugin: 'com.google.gms.google-services'
danger

if add implementation 'com.platform101xp:advertising_amazon:3.XX.XX' please read Advertising

Editing AndroidManifest.xml

Also, you should edit the AndroidManifest.xml file before using the SDK.

Add the following items to your manifest:

  • In <manifest> add:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
**xmlns:amazon="http://schemas.amazon.com/apk/res/android"**
package="your_package_name">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

<queries>
<package android:name="com.amazon.venezia"/>
<package android:name="com.amazon.sdktestclient"/>
</queries>
  • In <application> add:
<application
...
android:allowBackup="true"
android:icon="..."
android:label="@string/app_name"
android:theme="@style/AppSDKTheme"
android:name="androidx.multidex.MultiDexApplication">
...
<!-- AMAZON -->
<receiver android:name="com.amazon.device.iap.ResponseReceiver" android:exported="true"
android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY" >
<intent-filter>
<action
android:name="com.amazon.inapp.purchasing.NOTIFY" />
</intent-filter>
</receiver>
<receiver android:name = "com.amazon.device.drm.ResponseReceiver" android:exported="true"
android:permission = "com.amazon.drm.Permission.NOTIFY" >
<intent-filter>
<action android:name = "com.amazon.drm.NOTIFY" />
</intent-filter>
</receiver>
...
<activity
android:name="com.platform101xp.authorize.social_networks.activity.InviteActivity"
android:exported="true" />

Gradle settings for SDK

Please make sure your gradle version is >=7, compileSdkVersion >= 34, targetSdkVersion >= 34, buildToolsVersion >= 33, minSdkVersion >= 21. If your application contains kotlin gradle plugin please set his version >= 1.8.*

gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
build.gradle (project level):
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:7.2.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.21"
...
}
}
build.gradle (app level):
android {
...
compileSdkVersion 34
buildToolsVersion '33.0.0'
...
defaultConfig {
minSdkVersion 21
targetSdkVersion 34
...
}

google-service

Copy google-services.json file to [app folder]

For that file ask your manager.

assets

Copy AppstoreAuthenticationKey.pem file to [app folder]/src/main/assets/

For that file ask your manager.