Answer the question
In order to leave comments, you need to log in
Why such strange results of Google Analytics for android?
There is the following code:
public class DialogActivity extends Activity { // определен как <string name="org.rosspam.DialogActivity">Spam dialog</string> в analytics.xml
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EasyTracker easyTracker = EasyTracker.getInstance(this);
easyTracker.send(MapBuilder.createEvent("ui_action", "dialog_show", "dialog_spam", null).build());
...
// в диалоге есть две кнопки - Yes и No, клавиша Back отключена
dialogBtnYes.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
EasyTracker easyTracker = EasyTracker.getInstance(getBaseContext());
easyTracker.send(MapBuilder.createEvent("ui_action", "button_press", "spam", (long) 1).build());
...
}
});
dialogBtnNo.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
EasyTracker easyTracker = EasyTracker.getInstance(getBaseContext());
easyTracker.send(MapBuilder.createEvent("ui_action", "button_press", "spam", (long) 0).build());
...
}
});
...
@Override
public void onStart() {
super.onStart();
EasyTracker.getInstance(this).activityStart(this);
}
@Override
public void onStop() {
super.onStop();
EasyTracker.getInstance(this).activityStop(this);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question