diff --git a/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/EncodingDialogFragment.java b/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/EncodingDialogFragment.java index 1134ea18..2934719e 100644 --- a/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/EncodingDialogFragment.java +++ b/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/EncodingDialogFragment.java @@ -23,6 +23,8 @@ import java.util.SortedMap; import org.alfresco.mobile.android.application.R; +import org.alfresco.mobile.android.platform.extensions.AnalyticsHelper; +import org.alfresco.mobile.android.platform.extensions.AnalyticsManager; import org.alfresco.mobile.android.ui.fragments.BaseListAdapter; import org.alfresco.mobile.android.ui.holder.SingleLineViewHolder; import org.alfresco.mobile.android.ui.utils.UIUtils; @@ -71,6 +73,8 @@ public static EncodingDialogFragment newInstance(String defaultCharset) // /////////////////////////////////////////////////////////////////////////// public Dialog onCreateDialog(Bundle savedInstanceState) { + AnalyticsHelper.reportScreen(getActivity(), AnalyticsManager.SCREEN_TEXT_EDITOR_ENCODING); + if (getArguments() != null && getArguments().containsKey(ARGUMENT_DEFAULT_CHARSET)) { defaultCharset = getArguments().getString(ARGUMENT_DEFAULT_CHARSET, "UTF-8"); diff --git a/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextEditorActivity.java b/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextEditorActivity.java index 8fab7d39..5bd4a827 100644 --- a/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextEditorActivity.java +++ b/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextEditorActivity.java @@ -36,6 +36,8 @@ import org.alfresco.mobile.android.async.file.open.OpenFileEvent; import org.alfresco.mobile.android.async.file.open.OpenFileRequest; import org.alfresco.mobile.android.platform.AlfrescoNotificationManager; +import org.alfresco.mobile.android.platform.extensions.AnalyticsHelper; +import org.alfresco.mobile.android.platform.extensions.AnalyticsManager; import org.alfresco.mobile.android.platform.intent.AlfrescoIntentAPI; import org.alfresco.mobile.android.platform.intent.PrivateIntent; import org.alfresco.mobile.android.ui.utils.UIUtils; @@ -101,6 +103,9 @@ public class TextEditorActivity extends BaseActivity @Override public void onCreate(Bundle savedInstanceState) { + + AnalyticsHelper.reportScreen(this, AnalyticsManager.SCREEN_TEXT_EDITOR); + supportRequestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); super.onCreate(savedInstanceState); diff --git a/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextSizeDialogFragment.java b/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextSizeDialogFragment.java index d6cd91e9..728ae49e 100644 --- a/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextSizeDialogFragment.java +++ b/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/editors/text/TextSizeDialogFragment.java @@ -22,6 +22,8 @@ import java.util.List; import org.alfresco.mobile.android.application.R; +import org.alfresco.mobile.android.platform.extensions.AnalyticsHelper; +import org.alfresco.mobile.android.platform.extensions.AnalyticsManager; import org.alfresco.mobile.android.ui.fragments.BaseListAdapter; import org.alfresco.mobile.android.ui.holder.SingleLineViewHolder; import org.alfresco.mobile.android.ui.utils.UIUtils; @@ -110,6 +112,8 @@ public static TextSizeDialogFragment newInstance(int textSize) // /////////////////////////////////////////////////////////////////////////// public Dialog onCreateDialog(Bundle savedInstanceState) { + AnalyticsHelper.reportScreen(getActivity(), AnalyticsManager.SCREEN_TEXT_EDITOR_TEXT_SIZE); + int title = R.string.file_editor_text_size; if (getArguments() != null && getArguments().containsKey(ARGUMENT_DEFAULT_SIZE)) diff --git a/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/fragments/node/search/DocumentFolderSearchFragment.java b/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/fragments/node/search/DocumentFolderSearchFragment.java index e4560e03..a34291be 100644 --- a/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/fragments/node/search/DocumentFolderSearchFragment.java +++ b/alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/fragments/node/search/DocumentFolderSearchFragment.java @@ -87,6 +87,7 @@ public DocumentFolderSearchFragment() super(); loadState = LOAD_VISIBLE; displayAsList = false; + reportAtCreation = false; screenName = AnalyticsManager.SCREEN_SEARCH_RESULT_FILES; } diff --git a/platform/foundation/src/main/java/org/alfresco/mobile/android/platform/extensions/AnalyticsManager.java b/platform/foundation/src/main/java/org/alfresco/mobile/android/platform/extensions/AnalyticsManager.java index 29469069..2e2662fc 100644 --- a/platform/foundation/src/main/java/org/alfresco/mobile/android/platform/extensions/AnalyticsManager.java +++ b/platform/foundation/src/main/java/org/alfresco/mobile/android/platform/extensions/AnalyticsManager.java @@ -395,15 +395,17 @@ public abstract class AnalyticsManager extends Manager public static final String SCREEN_SEARCH_RESULT_FILES = PREFIX_SEARCH_RESULT + "Files"; + public static final String SCREEN_SEARCH_RESULT_FOLDERS = PREFIX_SEARCH_RESULT + "Folders"; + public static final String SCREEN_SEARCH_RESULT_USERS = PREFIX_SEARCH_RESULT + "People"; public static final String SCREEN_SEARCH_ADVANCED = PREFIX_SEARCH + "Advanced - "; - public static final String SCREEN_SEARCH_ADVANCED_FILES = PREFIX_SEARCH_RESULT + "Files"; + public static final String SCREEN_SEARCH_ADVANCED_FILES = SCREEN_SEARCH_ADVANCED + "Files"; - public static final String SCREEN_SEARCH_ADVANCED_FOLDERS = PREFIX_SEARCH_RESULT + "Folders"; + public static final String SCREEN_SEARCH_ADVANCED_FOLDERS = SCREEN_SEARCH_ADVANCED + "Folders"; - public static final String SCREEN_SEARCH_ADVANCED_USERS = PREFIX_SEARCH_RESULT + "People"; + public static final String SCREEN_SEARCH_ADVANCED_USERS = SCREEN_SEARCH_ADVANCED + "People"; public static final String PREFIX_TASKS = "Tasks - "; @@ -461,6 +463,12 @@ public abstract class AnalyticsManager extends Manager public static final String SCREEN_SAMSUNG_SNOTE_EDITOR = "Samsung - SNote Editor"; + public static final String SCREEN_TEXT_EDITOR = "Text Editor"; + + public static final String SCREEN_TEXT_EDITOR_ENCODING = "Text Editor - Encoding"; + + public static final String SCREEN_TEXT_EDITOR_TEXT_SIZE = "Text Editor - Text Size"; + // //////////////////////////////////////////////////// // SETTINGS // //////////////////////////////////////////////////// diff --git a/platform/foundation/src/main/java/org/alfresco/mobile/android/ui/node/search/SearchNodesFragment.java b/platform/foundation/src/main/java/org/alfresco/mobile/android/ui/node/search/SearchNodesFragment.java index bc014669..9e3691b9 100644 --- a/platform/foundation/src/main/java/org/alfresco/mobile/android/ui/node/search/SearchNodesFragment.java +++ b/platform/foundation/src/main/java/org/alfresco/mobile/android/ui/node/search/SearchNodesFragment.java @@ -1,20 +1,20 @@ -/******************************************************************************* - * Copyright (C) 2005-2014 Alfresco Software Limited. +/* + * Copyright (C) 2005-2016 Alfresco Software Limited. * - * This file is part of Alfresco Mobile for Android. + * This file is part of Alfresco Mobile for Android. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *******************************************************************************/ + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.alfresco.mobile.android.ui.node.search; import org.alfresco.mobile.android.api.model.Folder; @@ -25,6 +25,8 @@ import org.alfresco.mobile.android.async.node.search.SearchEvent; import org.alfresco.mobile.android.async.node.search.SearchRequest; import org.alfresco.mobile.android.foundation.R; +import org.alfresco.mobile.android.platform.extensions.AnalyticsHelper; +import org.alfresco.mobile.android.platform.extensions.AnalyticsManager; import org.alfresco.mobile.android.ui.fragments.BaseGridFragment; import org.alfresco.mobile.android.ui.utils.UIUtils; @@ -101,6 +103,9 @@ protected void onRetrieveParameters(Bundle bundle) ARGUMENT_INCLUDE_DESCENDANTS) : includeDescendants; searchFolderOnly = (getArguments().containsKey(ARGUMENT_SEARCH_FOLDER)) ? getArguments().getBoolean( ARGUMENT_SEARCH_FOLDER) : searchFolderOnly; + + AnalyticsHelper.reportScreen(getActivity(), searchFolderOnly ? AnalyticsManager.SCREEN_SEARCH_RESULT_FOLDERS + : AnalyticsManager.SCREEN_SEARCH_RESULT_FILES); } protected OperationBuilder onCreateOperationRequest(ListingContext listingContext)