Added a couple new events for usage feedback of various Astrid features: producteev login/signup and repeated task creation

pull/14/head
Tim Su 14 years ago
parent 83b2876254
commit 18381e06e5

@ -31,6 +31,7 @@ import android.widget.Button;
import android.widget.EditText; import android.widget.EditText;
import android.widget.TextView; import android.widget.TextView;
import com.flurry.android.FlurryAgent;
import com.timsu.astrid.R; import com.timsu.astrid.R;
import com.todoroo.andlib.service.ContextManager; import com.todoroo.andlib.service.ContextManager;
import com.todoroo.andlib.service.DependencyInjectionService; import com.todoroo.andlib.service.DependencyInjectionService;
@ -38,6 +39,7 @@ import com.todoroo.andlib.utility.DialogUtilities;
import com.todoroo.astrid.producteev.api.ApiAuthenticationException; import com.todoroo.astrid.producteev.api.ApiAuthenticationException;
import com.todoroo.astrid.producteev.api.ProducteevInvoker; import com.todoroo.astrid.producteev.api.ProducteevInvoker;
import com.todoroo.astrid.producteev.sync.ProducteevSyncProvider; import com.todoroo.astrid.producteev.sync.ProducteevSyncProvider;
import com.todoroo.astrid.utility.Constants;
import com.todoroo.astrid.utility.Preferences; import com.todoroo.astrid.utility.Preferences;
/** /**
@ -142,6 +144,8 @@ public class ProducteevLoginActivity extends Activity {
Preferences.setString(R.string.producteev_PPr_password, password); Preferences.setString(R.string.producteev_PPr_password, password);
ProducteevUtilities.INSTANCE.setToken(invoker.getToken()); ProducteevUtilities.INSTANCE.setToken(invoker.getToken());
FlurryAgent.onEvent("producteev-login");
synchronize(); synchronize();
} catch (ApiAuthenticationException e) { } catch (ApiAuthenticationException e) {
errorMessage.append(getString(R.string.producteev_PLA_errorAuth)); errorMessage.append(getString(R.string.producteev_PLA_errorAuth));
@ -181,6 +185,8 @@ public class ProducteevLoginActivity extends Activity {
Preferences.setString(R.string.producteev_PPr_password, password); Preferences.setString(R.string.producteev_PPr_password, password);
ProducteevUtilities.INSTANCE.setToken(invoker.getToken()); ProducteevUtilities.INSTANCE.setToken(invoker.getToken());
FlurryAgent.onEvent("producteev-signup"); //$NON-NLS-1$
synchronize(); synchronize();
} catch (Exception e) { } catch (Exception e) {
errorMessage.append(e.getMessage()); errorMessage.append(e.getMessage());
@ -207,4 +213,14 @@ public class ProducteevLoginActivity extends Activity {
this, ProducteevBackgroundService.class)); this, ProducteevBackgroundService.class));
finish(); finish();
} }
@Override
protected void onStart() {
super.onStart();
FlurryAgent.onStartSession(this, Constants.FLURRY_KEY);
}
private void onEn() {
FlurryAgent.onEndSession(this);
}
} }

@ -7,6 +7,7 @@ import java.util.Calendar;
import java.util.Date; import java.util.Date;
import android.app.Activity; import android.app.Activity;
import android.text.TextUtils;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -20,6 +21,7 @@ import android.widget.Spinner;
import android.widget.AdapterView.OnItemSelectedListener; import android.widget.AdapterView.OnItemSelectedListener;
import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.CompoundButton.OnCheckedChangeListener;
import com.flurry.android.FlurryAgent;
import com.google.ical.values.Frequency; import com.google.ical.values.Frequency;
import com.google.ical.values.RRule; import com.google.ical.values.RRule;
import com.google.ical.values.Weekday; import com.google.ical.values.Weekday;
@ -239,6 +241,10 @@ public class RepeatControlSet implements TaskEditControlSet {
if(!enabled.isChecked()) if(!enabled.isChecked())
result = ""; result = "";
else { else {
if(TextUtils.isEmpty(task.getValue(Task.RECURRENCE))) {
FlurryAgent.onEvent("repeat-task-create"); //$NON-NLS-1$
}
RRule rrule = new RRule(); RRule rrule = new RRule();
rrule.setInterval((Integer)value.getTag()); rrule.setInterval((Integer)value.getTag());
switch(interval.getSelectedItemPosition()) { switch(interval.getSelectedItemPosition()) {

@ -145,5 +145,7 @@ public class WidgetConfigActivity extends ExpandableListActivity {
Preferences.setString(TasksWidget.PREF_TITLE + mAppWidgetId, title); Preferences.setString(TasksWidget.PREF_TITLE + mAppWidgetId, title);
Preferences.setString(TasksWidget.PREF_SQL + mAppWidgetId, sql); Preferences.setString(TasksWidget.PREF_SQL + mAppWidgetId, sql);
Preferences.setString(TasksWidget.PREF_VALUES + mAppWidgetId, contentValuesString); Preferences.setString(TasksWidget.PREF_VALUES + mAppWidgetId, contentValuesString);
FlurryAgent.onEvent("widget-config"); //$NON-NLS-1$
} }
} }

Loading…
Cancel
Save