Versions Compared

Key

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

...

The application key is generated in the RMC 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, the EuroMobileManager Singleton class can be called within the application as shown below:

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

 

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

...

EuroUserKey is an assigned code to every user by RMC and if it can be matched in order to analyse the mobile and email campaigns of users. 

 

The updates of users' location can be reported by the following method:

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

 

You can sync any updated information via the sync method:

...

This token is sent to the RMC 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 a push notification is read, the following method should be called. This method sends the message “read” information to RMC 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());

...

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 RMC UI can be accessed within the Message Class. Intent type message can be modelled for the Message Class via the new Message (intent) constructor. The following variables exists in the Message Class:

 

Data TypeVariableDescription
StringmediaUrlURL for images and video
StringaltUrlAlternate URL
StringcampaignIdCampaign ID
StringurlCampaign URL
StringmessageMessage
StringsoundSound file
PushTypepushTypePush Type
Map<String, String>paramsCustom parameters

 

...