Android Shuttle Usage - skpdi/sentinel-document GitHub Wiki

This is how to use the Shuttle library for Android created on the Sentinel Log Definitions page.
Shuttle for Android was developed in Java.

For Obfuscation

When you obfuscate Android APK, Shuttle must be exempted from the obfuscation object.

-keep class com.skplanet.pdp.sentinel.shuttle.** { *; }

How to use

// Create Shuttle Instance
SampleSentinelShuttle shuttle = new SampleSentinelShuttle();

// You can use setter method that the name is same as the field name to record data in the header or body
// For example, use 'page_id' method to record 'page_id' value. 
shuttle.page_id("/main/card/list")
       .action_id("tap.my_card")
       .card_num("2012-3XXX-XXXX-XXXX")
       .card_company("Hana SK")
       .expired_date("MM/YY");


// Or you can set Body value at once using 'setBodyOf' method. 
// In this case, only *Body* is set like the method name.
// *KEY* header value in the method name will be set automatically. 
// (In this example, 'page_id', 'action_id' are set to 'main_card_list', 'tap_my_card')
shuttle.setBodyOfMain_card_list__tap_my_card(
                                        "2012-3XXX-XXXX-XXXX", 
                                        null /* if you don't want set value, please insert null */,
                                        "MM/YY"
);

// When you record session_id header value and record other Body value using setBodyOf method.
shuttle.session_id("AF0EF")
       .setBodyOfMain_card_list__tap_my_card("2012-3XXX-XXXX-XXXX", null ,"MM/YY"); 

To transfer the Shuttle that values are entered to Rake Android, use like the below. ( Refer to Rake-Android API )

rake.track(shuttle.toJSONObject());

toJSONString method can be used for debugging.

Log.d(shuttle.toJSONString());
⚠️ **GitHub.com Fallback** ⚠️