Permalink
Browse files

Added Flurry onstart and onend to all activities

  • Loading branch information...
1 parent e9b6b8a commit 6811feadc19fad975497b6f1095d6c83c969452f @hiteshsondhi88 hiteshsondhi88 committed Mar 19, 2012
View
@@ -4,7 +4,7 @@
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
- <classpathentry kind="lib" path="lib/FlurryAgent.jar"/>
<classpathentry kind="lib" path="lib/AndroidPdfLib.jar"/>
+ <classpathentry kind="lib" path="lib/FlurryAgent.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
View
@@ -107,7 +107,7 @@
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation" />
<activity
- android:name=".helpers.GenerateReport"
+ android:name=".GenerateReport"
android:screenOrientation="portrait"
android:configChanges="keyboardHidden|orientation" />
</application>
View
Binary file not shown.
@@ -84,12 +84,11 @@
private List<Entry> mEntryList;
private final int REQUEST_CODE = 1055;
-
+
@Override
protected void onStart() {
super.onStart();
FlurryAgent.onStartSession(this, getString(R.string.flurry_key));
- FlurryAgent.onEvent(getString(R.string.generate_report));
}
@Override
@@ -137,12 +136,10 @@ public void onClick(View v) {
switch ((int)((Spinner) findViewById(R.id.type_spinner)).getSelectedItemId()) {
//case if Exporting to PDF
case 0:
- FlurryAgent.onEvent(getString(R.string.export_pdf));
exportToPDF();
break;
//case if Exporting to CSV
case 1:
- FlurryAgent.onEvent(getString(R.string.export_csv));
exportToCSV();
break;
@@ -121,7 +121,6 @@ public void onClick(View clickedView) {
switch (idOfClickedView) {
// //// ******* opens TextEntry Activity ******** ///////////
case R.id.main_text:
- FlurryAgent.onEvent(getString(R.string.finished_textentry));
Intent intentTextEntry = new Intent(this, TextEntry.class);
createDatabaseEntry(R.string.text);
intentTextEntry.putExtras(bundle);
@@ -130,7 +129,6 @@ public void onClick(View clickedView) {
// //// ******* opens Voice Activity ******** ///////////
case R.id.main_voice:
- FlurryAgent.onEvent(getString(R.string.finished_voiceentry));
if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) {
Intent intentVoice = new Intent(this, Voice.class);
createDatabaseEntry(R.string.voice);
@@ -143,7 +141,6 @@ public void onClick(View clickedView) {
// //// ******* opens Camera Activity ******** ///////////
case R.id.main_camera:
- FlurryAgent.onEvent(getString(R.string.finished_cameraentry));
if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) {
Intent intentCamera = new Intent(this, CameraActivity.class);
bundle = new Bundle();
@@ -156,7 +153,6 @@ public void onClick(View clickedView) {
// //// ******* opens Favorite Activity ******** ///////////
case R.id.main_favorite:
- FlurryAgent.onEvent(getString(R.string.favorite));
Intent intentFavorite = new Intent(this, FavoriteActivity.class);
bundle = new Bundle();
intentFavorite.putExtras(bundle);
@@ -165,15 +161,13 @@ public void onClick(View clickedView) {
// //// ******* opens List Activity and adds unknown entry to database ******** ///////////
case R.id.main_save_reminder:
- FlurryAgent.onEvent(getString(R.string.save_reminder));
insertToDatabase(R.string.unknown);
Intent intentListView = new Intent(this, ExpenseListing.class);
startActivity(intentListView);
break;
////// ******* opens ListView Activity ******** ///////////
case R.id.main_listview:
- FlurryAgent.onEvent(getString(R.string.list_view));
Intent intentListView2 = new Intent(this, ExpenseListing.class);
startActivity(intentListView2);
break;
@@ -5,6 +5,8 @@
package com.vinsol.expensetracker;
+import com.flurry.android.FlurryAgent;
+
import android.graphics.Color;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
@@ -16,6 +18,18 @@
public class SetPreferences extends PreferenceActivity {
@Override
+ protected void onStart() {
+ super.onStart();
+ FlurryAgent.onStartSession(this, getString(R.string.flurry_key));
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ FlurryAgent.onEndSession(this);
+ }
+
+ @Override
public void onCreate(Bundle savedInstanceState) {
requestWindowFeature(Window.FEATURE_NO_TITLE);
super.onCreate(savedInstanceState);
@@ -54,6 +54,7 @@
import android.view.WindowManager;
import android.widget.Toast;
+import com.flurry.android.FlurryAgent;
import com.vinsol.expensetracker.Constants;
import com.vinsol.expensetracker.ExpenseTrackerApplication;
import com.vinsol.expensetracker.R;
@@ -137,6 +138,12 @@
public long mJpegCallbackFinishTime;
public static boolean mMediaServerDied = false;
+
+ @Override
+ protected void onStart() {
+ super.onStart();
+ FlurryAgent.onStartSession(this, getString(R.string.flurry_key));
+ }
private final Handler mHandler = new MainHandler();
@@ -454,6 +461,7 @@ public void onClickListener(int item) {
@Override
public void onStop() {
super.onStop();
+ FlurryAgent.onEndSession(this);
if (mMediaProviderClient != null) {
mMediaProviderClient.release();
mMediaProviderClient = null;
@@ -71,7 +71,7 @@ protected void onStart() {
super.onStart();
FlurryAgent.onStartSession(this, getString(R.string.flurry_key));
}
-
+
@Override
protected void onStop() {
super.onStop();
@@ -454,7 +454,6 @@ public void onClick(View v) {
////////******** Adding Action to save entry ********* ///////////
switch (v.getId()) {
case R.id.edit_save_entry:
- FlurryAgent.onEvent(getString(R.string.save_button));
if(isFromFavorite) {
saveFavoriteEntry();
} else {
@@ -497,7 +496,6 @@ public void onDismiss(DialogInterface dialog) {
}
private void deleteEntry() {
- FlurryAgent.onEvent(getString(R.string.delete_button));
isChanged = true;
deleteFile();
////// ******* Delete entry from database ******** /////////
@@ -525,7 +523,6 @@ private void deleteEntry() {
}
private void deleteFavorite() {
- FlurryAgent.onEvent(getString(R.string.delete_button));
isChanged = true;
fileHelper.deleteAllFavoriteFiles(mFavoriteList.favId);
////// ******* Delete entry from database ******** /////////
@@ -546,7 +543,6 @@ private void deleteFavorite() {
@Override
public void onBackPressed() {
- FlurryAgent.onEvent(getString(R.string.back_pressed));
ConfirmSaveEntryDialog mConfirmSaveEntryDialog = new ConfirmSaveEntryDialog(this);
if(intentExtras.containsKey(Constants.KEY_IS_COMING_FROM_SHOW_PAGE) || intentExtras.containsKey(Constants.KEY_POSITION)) {
mConfirmSaveEntryDialog.setMessage(getString(R.string.backpress_edit_entry_text));
@@ -17,7 +17,6 @@
import android.widget.Toast;
import android.widget.ToggleButton;
-import com.flurry.android.FlurryAgent;
import com.vinsol.expensetracker.R;
import com.vinsol.expensetracker.models.Entry;
@@ -132,7 +131,6 @@ public void onClick(View v) {
switch (v.getId()) {
case R.id.show_add_favorite:
case R.id.show_add_favorite_textView:
- FlurryAgent.onEvent(activity.getString(R.string.added_to_favorite));
Boolean toCheck;
if(v.getId() == R.id.show_add_favorite) {
toCheck = showAddFavorite.isChecked();
@@ -20,6 +20,7 @@
import android.widget.TextView;
import android.widget.Toast;
+import com.flurry.android.FlurryAgent;
import com.vinsol.expensetracker.Constants;
import com.vinsol.expensetracker.ExpenseTrackerApplication;
import com.vinsol.expensetracker.R;
@@ -37,6 +38,18 @@
private static TextView unfinishedEntryCountThisYear;
@Override
+ protected void onStart() {
+ super.onStart();
+ FlurryAgent.onStartSession(this, getString(R.string.flurry_key));
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ FlurryAgent.onEndSession(this);
+ }
+
+ @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.expense_listing_tab);
@@ -73,6 +73,18 @@
private EditText searchBox;
@Override
+ protected void onStart() {
+ super.onStart();
+ FlurryAgent.onStartSession(this, getString(R.string.flurry_key));
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ FlurryAgent.onEndSession(this);
+ }
+
+ @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -194,13 +206,11 @@ public boolean onContextItemSelected(MenuItem item) {
switch (item.getItemId()) {
//Edit Action
case 0:
- FlurryAgent.onEvent(getString(R.string.context_item_edit));
startEditPage(info.position);
break;
//Delete Action
case 1:
- FlurryAgent.onEvent(getString(R.string.context_item_delete));
removeItem(info.position);
break;
@@ -15,7 +15,6 @@
import android.view.View.OnClickListener;
import android.widget.Toast;
-import com.flurry.android.FlurryAgent;
import com.vinsol.expensetracker.R;
import com.vinsol.expensetracker.edit.CameraActivity;
import com.vinsol.expensetracker.edit.TextEntry;
@@ -32,7 +31,6 @@
private long timeInMillis;
public GroupedIconDialogClickListener(UnknownEntryDialog unknownDialog,Activity activity,Bundle bundle,Long timeInMillis) {
- FlurryAgent.onEvent(activity.getString(R.string.grouped_icon_click));
this.unknownDialog = unknownDialog;
this.activity = activity;
if(bundle != null) {
@@ -251,13 +251,11 @@ public boolean onContextItemSelected(MenuItem item) {
switch (item.getItemId()) {
//Edit Action
case 0:
- FlurryAgent.onEvent(getString(R.string.context_item_edit));
startEditPage(info.position);
break;
//Delete Action
case 1:
- FlurryAgent.onEvent(getString(R.string.context_item_delete));
Toast.makeText(this, "Deleted", Toast.LENGTH_SHORT).show();
removeItem(info.position);
ExpenseListing.resetUnfinishedEntryCount();
@@ -28,7 +28,6 @@
import android.widget.RelativeLayout;
import android.widget.TextView;
-import com.flurry.android.FlurryAgent;
import com.vinsol.expensetracker.Constants;
import com.vinsol.expensetracker.R;
import com.vinsol.expensetracker.helpers.CheckEntryComplete;
@@ -359,13 +358,11 @@ public void onClick(View v) {
if (mListenerList != null)
if (android.os.Environment.getExternalStorageState().equals(android.os.Environment.MEDIA_MOUNTED)) {
if (mListenerList.type.equals(mContext.getString(R.string.voice))) {
- FlurryAgent.onEvent(mContext.getString(R.string.list_audio_dialog));
File mFile = fileHelper.getAudioFileEntry(mListenerList.id);
if (mFile.canRead()) {
new AudioPlayDialog(mContext, mListenerList.id);
}
} else if (mListenerList.type.equals(mContext.getString(R.string.camera))) {
- FlurryAgent.onEvent(mContext.getString(R.string.list_image_dialog));
File mFile = fileHelper.getCameraFileLargeEntry(mListenerList.id);
if (mFile.canRead()) {
Intent intent = new Intent(mContext, ImagePreview.class);
@@ -375,7 +372,6 @@ public void onClick(View v) {
}
}
if (mListenerList.type.equals(mContext.getString(R.string.text))) {
- FlurryAgent.onEvent(mContext.getString(R.string.list_text_dialog));
if (!mListenerList.description.equals(mContext.getString(R.string.unfinished_textentry))) {
new DescriptionDialog(mContext, mListenerList.description);
}
@@ -171,7 +171,6 @@ public void onClick(View v) {
break;
case R.id.show_edit:
- FlurryAgent.onEvent(getString(R.string.edit_button));
intentExtras.putBoolean(Constants.KEY_IS_COMING_FROM_SHOW_PAGE, true);
intentExtras.remove(Constants.KEY_ENTRY_LIST_EXTRA);
if(mShowList.amount.endsWith(".00")) {
@@ -187,7 +186,6 @@ public void onClick(View v) {
}
private void delete() {
- FlurryAgent.onEvent(getString(R.string.delete_button));
if (mShowList.id != null) {
deleteFile();
mDatabaseAdapter.open();
@@ -14,6 +14,7 @@
import android.view.Window;
import android.widget.Toast;
+import com.flurry.android.FlurryAgent;
import com.vinsol.expensetracker.Constants;
import com.vinsol.expensetracker.ExpenseTrackerApplication;
import com.vinsol.expensetracker.R;
@@ -27,6 +28,18 @@
private AsyncTask<Void, Void, Void> imageViewAsyncTask;
@Override
+ protected void onStart() {
+ super.onStart();
+ FlurryAgent.onStartSession(this, getString(R.string.flurry_key));
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ FlurryAgent.onEndSession(this);
+ }
+
+ @Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);

0 comments on commit 6811fea

Please sign in to comment.