Last active
June 15, 2017 18:55
-
-
Save stephenlaughton/8bc8d27347738a1e4cea664f6555c646 to your computer and use it in GitHub Desktop.
Kochava Android integration at Invoice Simple
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class App extends Application { | |
private static KochavaHandler handler; | |
@Override | |
public void onCreate() { | |
handler = new KochavaHandler(); | |
Feature.setAttributionHandler(handler); | |
HashMap<String, Object> datamap = new HashMap<String, Object>(); | |
datamap.put(Feature.INPUTITEMS.KOCHAVA_APP_ID ,"koinvoice-simple-sm2" ); | |
datamap.put(Feature.INPUTITEMS.REQUEST_ATTRIBUTION, true); | |
kTracker = new Feature( this.getApplicationContext() , datamap); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Handler; | |
import android.os.Message; | |
import android.util.Log; | |
import com.kochava.android.tracker.Feature; | |
public class KochavaHandler extends Handler { | |
private static final String TAG = "KochavaHandler"; | |
@Override | |
public void handleMessage(Message msg) | |
{ | |
String attributionDataString = msg.getData().getString(Feature.ATTRIBUTION_DATA); | |
Log.d(TAG, attributionDataString); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment