Skip to content

Instantly share code, notes, and snippets.

@kayahanbaskeser
Last active June 23, 2020 22:53
Show Gist options
  • Save kayahanbaskeser/86d1754dd98c9c11cc7c6fce527c25bc to your computer and use it in GitHub Desktop.
Save kayahanbaskeser/86d1754dd98c9c11cc7c6fce527c25bc to your computer and use it in GitHub Desktop.
DTM
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
// Obtain the HiAnalyticsInstance instance.
HiAnalyticsInstance instance = HiAnalytics.getInstance(this);
HiAnalyticsTools.enableLog();
// Insert tracing points to report custom events.
// Set the custom event name to BLABLA.
String eventName = "BLABLA";
// Customize event parameters.
Bundle bundle = new Bundle();
bundle.putDouble("Hello", 999);
bundle.putString("Word", "as");
// Report events.
if (instance != null) {
instance.onEvent(eventName, bundle);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment