com.mapp.sdk

Mapp Android SDK

License

License

GroupId

GroupId

com.mapp.sdk
ArtifactId

ArtifactId

mapp-android-sdk
Last Version

Last Version

6.0.16
Release Date

Release Date

Type

Type

aar
Description

Description

com.mapp.sdk
Mapp Android SDK
Project URL

Project URL

https://mapp.com
Source Code Management

Source Code Management

https://github.com/MappCloud/Android-sdk

Download mapp-android-sdk

How to add to project

<!-- https://jarcasting.com/artifacts/com.mapp.sdk/mapp-android-sdk/ -->
<dependency>
    <groupId>com.mapp.sdk</groupId>
    <artifactId>mapp-android-sdk</artifactId>
    <version>6.0.16</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.mapp.sdk/mapp-android-sdk/
implementation 'com.mapp.sdk:mapp-android-sdk:6.0.16'
// https://jarcasting.com/artifacts/com.mapp.sdk/mapp-android-sdk/
implementation ("com.mapp.sdk:mapp-android-sdk:6.0.16")
'com.mapp.sdk:mapp-android-sdk:aar:6.0.16'
<dependency org="com.mapp.sdk" name="mapp-android-sdk" rev="6.0.16">
  <artifact name="mapp-android-sdk" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.mapp.sdk', module='mapp-android-sdk', version='6.0.16')
)
libraryDependencies += "com.mapp.sdk" % "mapp-android-sdk" % "6.0.16"
[com.mapp.sdk/mapp-android-sdk "6.0.16"]

Dependencies

compile (1)

Group / Artifact Type Version
com.google.firebase » firebase-messaging jar 20.0.0

runtime (8)

Group / Artifact Type Version
com.google.android.gms » play-services-location jar 16.0.0
com.google.code.gson : gson jar 2.8.5
com.google.dagger : dagger jar 2.24
androidx.appcompat » appcompat jar 1.1.0
com.github.bumptech.glide : glide jar 4.12.0
androidx.constraintlayout » constraintlayout jar 2.0.4
androidx.media » media jar 1.0.1
androidx.legacy » legacy-support-v13 jar 1.0.0

Project Modules

There are no modules declared in this project.

Android-sdk

The Mapp Mobile SDK is available for Mapp Engage mobile integrated customers. The SDKs enable you to integrate mobile push and in-app messaging into your campaign orchestration. SDK documentation is available at Mapp Cloud Mobile Integration.

Contents

We use mavenCentral for version 6.0.15+, instead of Jcenter Lattest verison on Jcenter is 6.0.12

Installation

Gradle

implementation 'com.mapp.sdk:mapp-android:6.0.16'

The SDK requires that you enable Java 8 in your builds.

compileOptions {
       sourceCompatibility JavaVersion.VERSION_1_8
       targetCompatibility JavaVersion.VERSION_1_8
}

Allow the network permission in your app manifest.

<uses-permission android:name="android.permission.INTERNET" />

The SDK supports min Android SDK (19).

Note that the SDK uses AndroidX, make sure to migrate your app to AndroidX Migration to avoid Manifest merger failure.

Initialization

Make sure your application build.gradle file include the applicationId attribute for android defaultConfig. Alternately, you can replace ${applicationId} with your application package (e.g com.yourapppackage.app). Include the following dependencies to your app's gradle.build dependencies section :

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.yourapppackage.app" . //make sure you have this   
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.mapp.sdk:mapp-android:6.0.12'
}

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

In the Application class of your android project, add following code

public class AppoxeeTestApp extends Application {
...
@Override
public void onCreate() {
    super.onCreate();
    ...
    AppoxeeOptions opt = new AppoxeeOptions();
    opt.sdkKey = SDK_KEY;
    opt.googleProjectId = GOOGLE_PROJECT_ID;
    opt.cepURL= CEP_URL;//(optional for SDK 6.0.0 and above)
    opt.appID = APP_ID;
    opt.tenantID= TENANT_ID;
   //Only for version 5.0.10+
    opt.notificationMode = NotificationMode.BACKGROUND_AND_FOREGROUND; (optional)
    //for SDK 6.0.0 and above
    opt.server = Appoxee.Server.L3;
 
    Appoxee.engage(this, opt);
    //This line is necessary for Android Oreo.
    Appoxee.instance().setReceiver(MyPushBroadcastReceiver.class);
    //Necessary for applications with locked screen rotation. 
    Appoxee.setOrientation(this, ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
    //Registered users are opt-outed by default.
    Appoxee.instance().setPushEnabled(true);
    ...
}
  
...
}

pass your sdk key and google project id, sdk key is present in your CEP dashboard. Add the application in the Android manifest file.

NotificationMode is enum and you can choose one of three options:

  • BACKGROUND_ONLY - notification will show only when the app is closed or in idle mode.
  • BACKGROUND_AND_FOREGROUND - notification will show every time when push notification comes.
  • SILENT_ONLY - notification never show on the device. If you don't choose one of these options, by default is BACKGROUND_ONLY. This feature is available only for user who use SDK above 5.0.10.

AppoxeeOptions. The server is enum and you can choose one of four options:

  • L3
  • EMC
  • CROC
  • TEST

An account manager will provide you info which one you should use in your application (L3, EMC or CROC).
Our developers use TEST for development purpose and you shouldn't use this one.


If you don't choose one of these options, by default is a TEST. This feature is available only for users who use SDK 6.0.0 and above.
In SDK 6.0.0 and above is opt.cepURL= CEP URL is optional.

You can find older version of SDK at this link

com.mapp.sdk

Mapp

Versions

Version
6.0.16
6.0.15-beta3
6.0.15-beta2
6.0.14