Skip to content

Commit

Permalink
Merge pull request #245 from cagryInside/master
Browse files Browse the repository at this point in the history
Fix #244 - Add Google Analytics individually for trip/stop problem reports
  • Loading branch information
barbeau committed Mar 5, 2015
2 parents fb8df7e + e92f65e commit 0cdc7a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import android.widget.TextView;

import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.joulespersecond.oba.ObaAnalytics;
import com.joulespersecond.oba.elements.ObaStop;
import com.joulespersecond.oba.request.ObaReportProblemWithStopRequest;
import com.joulespersecond.seattlebusbot.util.LocationHelp;
Expand Down Expand Up @@ -113,6 +114,8 @@ protected void sendReport() {
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mUserComment.getWindowToken(), 0);
ObaAnalytics.reportEventWithCategory(ObaAnalytics.ObaEventCategory.SUBMIT.toString(),
getString(R.string.analytics_action_problem), getString(R.string.analytics_label_report_stop_problem));
super.sendReport();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import android.widget.TextView;

import com.actionbarsherlock.app.SherlockFragmentActivity;
import com.joulespersecond.oba.ObaAnalytics;
import com.joulespersecond.oba.elements.ObaArrivalInfo;
import com.joulespersecond.oba.request.ObaReportProblemWithTripRequest;
import com.joulespersecond.seattlebusbot.util.LocationHelp;
Expand Down Expand Up @@ -159,6 +160,8 @@ protected void sendReport() {
InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(
Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(mUserComment.getWindowToken(), 0);
ObaAnalytics.reportEventWithCategory(ObaAnalytics.ObaEventCategory.SUBMIT.toString(),
getString(R.string.analytics_action_problem), getString(R.string.analytics_label_report_trip_problem));
super.sendReport();
}

Expand Down
4 changes: 3 additions & 1 deletion onebusaway-android/src/main/res/values/do_not_translate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<string name="analytics_label_button_press_settings">Clicked Settings Link</string>
<string name="analytics_label_button_press_donate">Clicked Donate Link</string>
<string name="analytics_label_button_press_help">Clicked Help Link</string>
<string name="analytics_label_button_press_feedback">Clicked Send Feedback Link</string>
<string name="analytics_label_button_press_feedback">Clicked Email Link</string>
<string name="analytics_label_button_press_map_icon">Clicked MapStopIcon</string>
<string name="analytics_label_button_press_search_box">Search box selected</string>
<string name="analytics_label_button_press_search_button">Search button clicked</string>
Expand All @@ -69,6 +69,8 @@
<string name="analytics_label_set_region">Set Region:\u0020</string>
<string name="analytics_label_app_switch">Loaded Twitter via Web</string>
<string name="analytics_label_report_problem">Reported Problem</string>
<string name="analytics_label_report_stop_problem">Reported Stop Problem</string>
<string name="analytics_label_report_trip_problem">Reported Trip Problem</string>
<string name="analytics_label_talkback">Loaded view:\u0020</string>
<string name="analytics_label_custom_url">Custom URL</string>
<string name="analytics_label_analytic_preference">Set Send anonymous usage data:\u0020</string>
Expand Down

0 comments on commit 0cdc7a8

Please sign in to comment.