Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

In this page:

...

Code Block
languagegroovy
dependencies {
    implementation 'com.github.relateddigital:euromessage-android:45.61.13'
}

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

...

2.2 Please add code block to project / build.gradle

Code Block
languagegroovy
buildscript {
    repositories {
        google()
        jcenter()
        maven {url 'http://developer.huawei.com/repo/'}
    }

dependencies {
        classpath "com.android.tools.build:gradle:$gradle_version"
        classpath 'com.google.gms:google-services:$google_version'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.huawei.agconnect:agcp:$huawei_version'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {url 'http://developer.huawei.com/repo/'}
        maven { url 'https://jitpack.io' }
    }
}

...

You will see example implementation below. For this you need to define FIREBASE_APP_ALIAS and HUAWEI_APP_ALIAS through the RMC panel.

Code Block
languagejava
public class MainApplication extends Application {

    private final String FIREBASE_APP_ALIAS = "euromessage-android";
    private final String HUAWEI_APP_ALIAS = "euromsg-huawei";

    private static EuroMobileManager euroMobileManager;

    @Override
  	 public void onCreate() {
        super.onCreate();

        euroMobileManager = EuroMobileManager.init(FIREBASE_APP_ALIAS, HUAWEI_APP_ALIAS, this);
        euroMobileManager.registerToFCM(getBaseContext());
    }
}

...

As soon as an application is installed on the mobile device, the token information of this device is written to the RMC database with the push subscription service. A token; “anonymous”, that is, it is recorded without being paired with any user until the user logs in to the application. In order for this token to be paired with a user, it must be logged in the device and an information identifying the owner of this token (KEY_ID or EMAIL) must be sent to the RMC. This information is located in the "extra": {} block in the push message payload.

In order for your data from the mobile channel to be uploaded to RMC, please pay attention that whatever reference value you have used in your active RMC account (KEY_ID * or E-Mail) comes from the mobile channel with this reference.

*KEY_ID: These are the id values ​​used by the application owner to deduplicate the customer. These can be expressed with different names such as CRMid, userid, customerid, accountid.

...