Skip to content

Commit

Permalink
Added logs in widgts we want to deprecate (getodk#2616)
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 authored and lognaturel committed Oct 4, 2018
1 parent 5e7ec70 commit b680314
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import android.view.View;
import android.widget.Button;

import com.google.android.gms.analytics.HitBuilders;

import org.javarosa.form.api.FormEntryPrompt;
import org.odk.collect.android.R;
import org.odk.collect.android.activities.FormEntryActivity;
Expand Down Expand Up @@ -67,6 +69,13 @@ public AlignedImageWidget(Context context, FormEntryPrompt prompt) {
setUpLayout();
setUpBinary();
addAnswerView(answerLayout);

Collect.getInstance().getDefaultTracker()
.send(new HitBuilders.EventBuilder()
.setCategory("AlignedImageWidget")
.setAction("created")
.setLabel(Collect.getCurrentFormIdentifierHash())
.build());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
import android.widget.TextView;
import android.widget.Toast;

import com.google.android.gms.analytics.HitBuilders;

import org.javarosa.core.model.data.IAnswerData;
import org.javarosa.core.model.data.StringData;
import org.javarosa.form.api.FormEntryPrompt;
Expand Down Expand Up @@ -127,6 +129,13 @@ public ImageWebViewWidget(Context context, FormEntryPrompt prompt) {
answerLayout.addView(imageDisplay);
}
addAnswerView(answerLayout);

Collect.getInstance().getDefaultTracker()
.send(new HitBuilders.EventBuilder()
.setCategory("ImageWebViewWidget")
.setAction("created")
.setLabel(Collect.getCurrentFormIdentifierHash())
.build());
}

private String constructImageElement() {
Expand Down

0 comments on commit b680314

Please sign in to comment.