Versions Compared

Key

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


You can register your application to GCM service using the following link:

https://developers.google.com/cloud-messaging/android/client

After a token is generated in your application, the token should be sent to our server using the following method. When initializing the EuroMobileManager the context and application key must be given.
In the Euromessage Push UI you should enter the server key value given by the Google API console for GCM applications.

The application key is generated in the Related Marketing Cloud UI and it is unique for your application.

Code Block
languagejava
linenumberstrue
public class Constant {
    public static final String EURO_KEY = "AppcentAndroidTest1";
}

After doing this, EuroMobileManager Singleton class can be called within application as below:

Code Block
languagejava
linenumberstrue
EuroMobileManager.sharedManager(getApplicationContext(),Constant.EURO_KEY);

If several parameters of the user are known, then at the registering stage or after they can be added as follows:

Code Block
languagejava
linenumberstrue
final EuroMobileManager manager = EuroMobileManager.sharedManager(getApplicationContext(),Constant.EURO_KEY);

manager.setEmail("uysalmo@gmail.com");
manager.setEuroUserKey("userOuysal");
manager.setAppVersion("1.1");
manager.setFacebook("euroFB");
manager.setTwitterId("ouysal");
manager.setMsisdn("5326301028");

EuroUserKey is an assigned code to every user by EuroMsg and if it can be matched, then mobile and email campaigns of the users can be analyzed commonly. Because of that this definition is very important .

The updates of users location can be reported via following method:

Code Block
languagejava
linenumberstrue
manager.setLocation(41.12,29.11);

You can sync any updated information via sync method;

Code Block
languagejava
linenumberstrue
EuroMobileManager.sharedManager(getApplicationContext(), Constant.EURO_KEY).sync();

When application registers itself to GCM service, then Google assigns a special token to the application. It is very important to send this token to EuroMsg because it is essential for push operations. This token is sent to EuroMsg server using the following method. This operation is executed either as an IntentService or using an AsyncTask:

Code Block
languagejava
linenumberstrue
EuroMobileManager.sharedManager(getApplicationContext(),Constant.EURO_KEY).subscribe(regid);

When push notification is read, the following method should be called. This method sends the “read” information of the message to Euro message side and it is very important for analysis. The place of the following method can be changed depending on the applications flow.

Code Block
languagejava
linenumberstrue
EuroMobileManager.sharedManager(getApplicationContext(), Constant.EURO_KEY).reportRead(new Message(intent).getPushId());

If you use Visilabs SDK in your application, then you can use the following method to inform the read status to Visilabs. URL to be called is produced within Visilabs SDK and is sent through setVisiUrl method:

Code Block
languagejava
linenumberstrue
String visiUrl = Visilabs.CreateAPI("52332F6C70796A757752413D"
        , "377878514D744237416C553D"
        , "http://weblogger.visilabs.com"
        , "euromsgmobilapp"
        , "http://rt.visilabs.com"
        , "Android"
        , getApplicationContext()
        , 5
        , "http://ssrlgr.visilabs.net/Logging.svc/SendRequest"
        , "54617433456D586B3636715765356868343149636B673D3D").getPushURL("src","cmp","mdm","cnt");

EuroMobileManager.sharedManager(getApplicationContext(), Constant.EURO_KEY).setVisiUrl(visiUrl);

The variables defined in EuroMsg UI can be accessed within Message class. Intent type message can be modeled for Message class via new Message (intent) constructor. The following variables exists in Message class:

 

...


Please visit documentation below

Euromessage Android SDK Setup

Status
colourGreen
titleVisit

Euromessage Android SDK Other Features

Status
colourGreen
titleVisit
FCM and HMS on RMC
Status
colourGreen
titleVisit


You can check latest release notes: here. Do not forget to follow us from github

*Türkçe Dokümantasyon 


Parent Topic: Push SDK