Methods and Arguments

Actions and functionality within the Hurree dashboard and user notifications are controlled and require the appropriate use of the SDK methods. Each is listed below, along with the relevant arguments.

Each method requires its own successCallback and errorCallback function.

Method Functionality
deportKeyValues Logs device specific values
deportUserLoginValues Logs user specific values
sendLoginDetails Send the device and user specific values to the platform.
logoutUser Logs all the logout events
changeUser Ensure successful logging and transfer of user details
logPurchaseWithCurrencyWithPriceAndQuantity Registering Purchase events
setCustomLogWithEventName Registering custom/bespoke events
pushNotificationWasSentFromHurree Determines if Hurree sent the push notification
shownotification Creates the notification view

Depending on how you want the Hurree functionality to work, you can decide from where each method will be called in your app, (though we have made some suggestions below). If you need more guidance, you can refer to the Android sample application which provides a complete suggested integration overview of how to use the included framework.

Note:

To enable the application to start the SDK, start the login process and receive notifications from the server - the following sequence of method calls is recommended and required on user login.

// ====================================================================================
// deportKeyValues
// Send the known User ID for the login - along with other values we can determine -
// e.g. your app & group keys and the device token generated. The 
// timer value here is how often you want your events sent back to the Platform. 
// The min is 30 secs - depending on your app and your needs, you can increase this.
//
// deportUserValues
// Method sends user-specific values to Hurree.
//
// We require that you call these methods together before the sendLoginDetails method. 
// Depending on your scenario  and the type of analysis you are interested in you may 
// want to consider the changeUser SDK method if you have user churn.
//
// You may want to consider calling these methods when your app is opened.
// This will allow you gather events on when your user is coming back to your app.
// ====================================================================================
analytics.deportKeyValues(Config.APP_KEY, 
                          Config.APP_GROUP_KEY, 
                          userID, 
                          tokenVal, 
                          Config.TIMER_VALUE_MINUTES);


analytics.deportUserLoginValues(userForename, 
                                userSurname, 
                                userPhone, 
                                userEmail, 
                                "", 
                                Config.GENDER_MALE, 
                                userDOB);


// ====================================================================================
// sendLoginDetails
// This method is used to log in to the HurreeSDK.
// ====================================================================================
analytics.sendLoginDetails(new CallBack() {

    @Override
    public void onSuccess(String response) {
        if (response.contains(Config.SUCCESS)) {

        }
    }
    @Override
    public void onFailure(String error) {

    }
});

results matching ""

    No results matching ""