diff --git a/app/build.gradle b/app/build.gradle index d6642a773b49..8db2a025be7a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,6 +25,16 @@ buildscript { classpath "org.jacoco:org.jacoco.report:$jacoco_version" classpath "org.jacoco:org.jacoco.agent:$jacoco_version" } + + //NMC Customization + allprojects { + repositories { + jcenter() + maven { + url "https://maven.tealiumiq.com/android/releases/" + } + } + } } plugins { @@ -107,6 +117,10 @@ android { buildConfigField 'boolean', 'CI', ciBuild.toString() buildConfigField 'boolean', 'RUNTIME_PERF_ANALYSIS', perfAnalysis.toString() + //NMC customization + buildConfigField "String", "ADJUST_APP_TOKEN", "${ADJUST_APP_TOKEN}" + buildConfigField "String", "MOENGAGE_APP_ID", "${MOENGAGE_APP_ID}" + javaCompileOptions { annotationProcessorOptions { arguments += ["room.schemaLocation": "$projectDir/schemas".toString()] @@ -422,6 +436,20 @@ dependencies { ksp "androidx.room:room-compiler:$roomVersion" androidTestImplementation "androidx.room:room-testing:$roomVersion" + //Adjust SDK --> https://github.com/adjust/android_sdk + implementation 'com.adjust.sdk:adjust-android:4.28.1' + implementation 'com.android.installreferrer:installreferrer:2.2' + //google play services identifier required for Adjust SDK + implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0' + + //tealium sdk + implementation 'com.tealium:library:5.8.0' + + //MoEngage SDK + implementation 'com.moengage:moe-android-sdk:11.3.01' + //lifecycle required for MoEngage SDK + implementation 'androidx.lifecycle:lifecycle-process:2.2.0' + implementation "io.coil-kt:coil:2.6.0" // splash screen dependency ref: https://developer.android.com/develop/ui/views/launch/splash-screen/migrate diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 8b1b9cc71c6c..9558faa7b68d 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -529,6 +529,17 @@ android:name="com.nextcloud.client.etm.EtmActivity" android:exported="false" android:theme="@style/Theme.ownCloud.Toolbar" /> + + + + + + + + androidInjector() { return dispatchingAndroidInjector; } + //NMC Customization + private void initMarketTrackingSdks(){ + TealiumSdkUtils.initialiseTealiumSDK(this); + AdjustSdkUtils.initialiseAdjustSDK(this); + MoEngageSdkUtils.initMoEngageSDK(this); + } + public static void setAppTheme(DarkMode mode) { switch (mode) { case LIGHT -> AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO); diff --git a/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java b/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java index f285b2abb635..25287b5d2885 100644 --- a/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -57,6 +57,8 @@ import com.nextcloud.client.onboarding.OnboardingService; import com.nextcloud.client.preferences.AppPreferences; import com.nextcloud.utils.extensions.BundleExtensionsKt; +import com.nmc.android.marketTracking.AdjustSdkUtils; +import com.nmc.android.marketTracking.TealiumSdkUtils; import com.owncloud.android.MainApp; import com.owncloud.android.R; import com.owncloud.android.databinding.AccountSetupBinding; @@ -1190,6 +1192,10 @@ public void onAuthenticatorTaskCallback(RemoteOperationResult result) } private void endSuccess() { + //track successful login event + AdjustSdkUtils.trackEvent(AdjustSdkUtils.EVENT_TOKEN_SUCCESSFUL_LOGIN, preferences); + TealiumSdkUtils.trackEvent(TealiumSdkUtils.EVENT_SUCCESSFUL_LOGIN, preferences); + if (onlyAdd) { finish(); } else { @@ -1526,4 +1532,11 @@ public void onSavedCertificate() { public void onFailedSavingCertificate() { DisplayUtils.showSnackMessage(this, R.string.ssl_validator_not_saved); } + + @Override + protected void onStart() { + super.onStart(); + //track screen view when activity is visible + TealiumSdkUtils.trackView(TealiumSdkUtils.SCREEN_VIEW_LOGIN, preferences); + } } diff --git a/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java index 4e7496dc62ec..fae81f870f85 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -59,6 +59,7 @@ import com.nextcloud.client.network.ConnectivityService; import com.nextcloud.client.preferences.AppPreferences; import com.nextcloud.client.utils.IntentUtil; +import com.nmc.android.marketTracking.TealiumSdkUtils; import com.nextcloud.model.WorkerState; import com.nextcloud.model.WorkerStateLiveData; import com.nextcloud.utils.extensions.BundleExtensionsKt; @@ -2289,6 +2290,9 @@ public void onStart() { EventBus.getDefault().post(new TokenPushEvent()); checkForNewDevVersionNecessary(getApplicationContext()); + + //track screen view when activity is visible + TealiumSdkUtils.trackView(TealiumSdkUtils.SCREEN_VIEW_FILE_BROWSER, preferences); } private void registerRefreshFolderEventReceiver() { diff --git a/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java index bb6793eb7867..49d7e69b39ff 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/SettingsActivity.java @@ -46,6 +46,7 @@ import com.nextcloud.client.network.ClientFactory; import com.nextcloud.client.network.ConnectivityService; import com.nextcloud.client.preferences.AppPreferences; +import com.nmc.android.marketTracking.TealiumSdkUtils; import com.nextcloud.client.preferences.AppPreferencesImpl; import com.nextcloud.client.preferences.DarkMode; import com.owncloud.android.BuildConfig; @@ -1045,6 +1046,13 @@ protected void onPostCreate(Bundle savedInstanceState) { getDelegate().onPostCreate(savedInstanceState); } + @Override + protected void onStart() { + super.onStart(); + //track screen view when activity is visible + TealiumSdkUtils.trackView(TealiumSdkUtils.SCREEN_VIEW_SETTINGS, preferences); + } + @Override protected void onDestroy() { super.onDestroy(); diff --git a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt index 53fa9c3e60ec..aa2dde3cdbbe 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt +++ b/app/src/main/java/com/owncloud/android/ui/activity/SyncedFoldersActivity.kt @@ -33,6 +33,8 @@ import com.nextcloud.client.jobs.upload.FileUploadWorker import com.nextcloud.client.preferences.AppPreferences import com.nextcloud.client.preferences.SubFolderRule import com.nextcloud.utils.extensions.getParcelableArgument +import com.nmc.android.marketTracking.AdjustSdkUtils +import com.nmc.android.marketTracking.TealiumSdkUtils import com.owncloud.android.BuildConfig import com.owncloud.android.MainApp import com.owncloud.android.R @@ -574,6 +576,9 @@ class SyncedFoldersActivity : backgroundJobManager.startImmediateFilesSyncJob(overridePowerSaving = false) showBatteryOptimizationInfo() } + + //track event when user enable/disable auto upload on/off + trackAutoUploadEvent(syncedFolderDisplayItem.isEnabled) } override fun onSyncFolderSettingsClick(section: Int, syncedFolderDisplayItem: SyncedFolderDisplayItem) { @@ -692,6 +697,14 @@ class SyncedFoldersActivity : if (syncedFolder.isEnabled) { showBatteryOptimizationInfo() } + + //track event when user enable/disable auto upload on/off + trackAutoUploadEvent(syncedFolder.isEnabled) + } + + private fun trackAutoUploadEvent(enabled: Boolean) { + AdjustSdkUtils.trackEvent(if (enabled) AdjustSdkUtils.EVENT_TOKEN_SETTINGS_AUTO_UPLOAD_ON else AdjustSdkUtils.EVENT_TOKEN_SETTINGS_AUTO_UPLOAD_OFF, preferences) + TealiumSdkUtils.trackEvent(if (enabled) TealiumSdkUtils.EVENT_SETTINGS_AUTO_UPLOAD_ON else TealiumSdkUtils.EVENT_SETTINGS_AUTO_UPLOAD_OFF, preferences) } private fun saveOrUpdateSyncedFolder(item: SyncedFolderDisplayItem) { diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/AccountRemovalDialog.kt b/app/src/main/java/com/owncloud/android/ui/dialog/AccountRemovalDialog.kt index e04d85944095..5fef73667980 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/AccountRemovalDialog.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/AccountRemovalDialog.kt @@ -9,27 +9,23 @@ package com.owncloud.android.ui.dialog import android.app.Dialog -import android.graphics.drawable.Drawable +import android.content.DialogInterface import android.os.Bundle -import android.view.View -import androidx.appcompat.app.AlertDialog import androidx.fragment.app.DialogFragment -import com.google.android.material.button.MaterialButton import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.nextcloud.client.account.User -import com.nextcloud.client.account.UserAccountManager import com.nextcloud.client.di.Injectable import com.nextcloud.client.jobs.BackgroundJobManager +import com.nextcloud.client.preferences.AppPreferences +import com.nmc.android.marketTracking.AdjustSdkUtils +import com.nmc.android.marketTracking.TealiumSdkUtils import com.nextcloud.utils.extensions.getParcelableArgument import com.owncloud.android.R -import com.owncloud.android.databinding.AccountRemovalDialogBinding -import com.owncloud.android.datamodel.FileDataStorageManager -import com.owncloud.android.utils.DisplayUtils -import com.owncloud.android.utils.DisplayUtils.AvatarGenerationListener import com.owncloud.android.utils.theme.ViewThemeUtils import javax.inject.Inject -class AccountRemovalDialog : DialogFragment(), AvatarGenerationListener, Injectable { +// NMC Customization: We don't need two option for logout. On logout directly logout the user locally from the app +class AccountRemovalDialog : DialogFragment(), Injectable { @Inject lateinit var backgroundJobManager: BackgroundJobManager @@ -37,137 +33,37 @@ class AccountRemovalDialog : DialogFragment(), AvatarGenerationListener, Injecta @Inject lateinit var viewThemeUtils: ViewThemeUtils + @Inject + lateinit var appPreferences: AppPreferences + private var user: User? = null - private lateinit var alertDialog: AlertDialog - private var _binding: AccountRemovalDialogBinding? = null - private val binding get() = _binding!! override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) user = requireArguments().getParcelableArgument(KEY_USER, User::class.java) } - override fun onStart() { - super.onStart() - - // disable positive button and apply theming - alertDialog = dialog as AlertDialog - alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).isEnabled = false - - viewThemeUtils.platform.themeRadioButton(binding.radioLocalRemove) - viewThemeUtils.platform.themeRadioButton(binding.radioRequestDeletion) - viewThemeUtils.material.colorMaterialButtonPrimaryTonal( - alertDialog.getButton(AlertDialog.BUTTON_POSITIVE) as MaterialButton - ) - viewThemeUtils.material.colorMaterialButtonPrimaryBorderless( - alertDialog.getButton(AlertDialog.BUTTON_NEGATIVE) as MaterialButton - ) - - binding.userName.text = UserAccountManager.getDisplayName(user) - binding.account.text = user?.let { DisplayUtils.convertIdn(it.accountName, false) } - } - override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { - _binding = AccountRemovalDialogBinding.inflate(layoutInflater) - - // start avatar generation - setAvatar() - - // hide second option when plug-in isn't installed - if (hasDropAccount()) { - binding.requestDeletion.visibility = View.VISIBLE - } - - val builder = - MaterialAlertDialogBuilder(requireActivity()) - .setTitle(R.string.delete_account) - .setView(binding.root) - .setNegativeButton(R.string.common_cancel) { _, _ -> } - .setPositiveButton(R.string.delete_account) { _, _ -> removeAccount() } - - // allow selection by clicking on list element - binding.localRemove.setOnClickListener { - binding.radioLocalRemove.performClick() - } - binding.requestDeletion.setOnClickListener { - binding.radioRequestDeletion.performClick() - } - - // set listeners for custom radio button list - binding.radioLocalRemove.setOnClickListener { - binding.radioRequestDeletion.isChecked = false - alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).apply { - text = getText(R.string.delete_account) - isEnabled = true - } - } - binding.radioRequestDeletion.setOnClickListener { - binding.radioLocalRemove.isChecked = false - alertDialog.getButton(AlertDialog.BUTTON_POSITIVE).apply { - text = getString(R.string.request_account_deletion_button) - isEnabled = true + val builder = MaterialAlertDialogBuilder(requireActivity()) + .setTitle(R.string.delete_account) + .setMessage(resources.getString(R.string.delete_account_warning, user!!.accountName)) + .setIcon(R.drawable.ic_warning) + .setPositiveButton(R.string.common_ok) { _: DialogInterface?, _: Int -> + // track adjust and tealium events on logout confirmed + AdjustSdkUtils.trackEvent(AdjustSdkUtils.EVENT_TOKEN_SETTINGS_LOGOUT, appPreferences) + TealiumSdkUtils.trackEvent(TealiumSdkUtils.EVENT_SETTINGS_LOGOUT, appPreferences) + backgroundJobManager.startAccountRemovalJob( + user!!.accountName, + false + ) } - } - - viewThemeUtils.dialog.colorMaterialAlertDialogBackground(requireActivity(), builder) + .setNegativeButton(R.string.common_cancel, null) return builder.create() } - /** - * Get value of `drop-account` capability. - */ - private fun hasDropAccount(): Boolean { - val capability = FileDataStorageManager(user, context?.contentResolver).getCapability(user) - return capability.dropAccount.isTrue - } - - /** - * Start removal of account. Depending on which option is checked, either a browser will open to request deletion, - * or the local account will be removed immediately. - */ - private fun removeAccount() { - user?.let { user -> - if (binding.radioRequestDeletion.isChecked) { - DisplayUtils.startLinkIntent(activity, user.server.uri.toString() + DROP_ACCOUNT_URI) - } else { - backgroundJobManager.startAccountRemovalJob(user.accountName, false) - } - } - } - - /** - * Start avatar generation. - */ - private fun setAvatar() { - try { - val imageView = binding.userIcon - imageView.tag = user!!.accountName - DisplayUtils.setAvatar( - user!!, - this, - resources.getDimension(R.dimen.list_item_avatar_icon_radius), - resources, - imageView, - context - ) - } catch (_: Exception) { - } - } - - override fun avatarGenerated(avatarDrawable: Drawable?, callContext: Any?) { - avatarDrawable?.let { - binding.userIcon.setImageDrawable(it) - } - } - - override fun shouldCallGeneratedCallback(tag: String?, callContext: Any?): Boolean { - return binding.userIcon.tag == tag - } - companion object { private const val KEY_USER = "USER" - private const val DROP_ACCOUNT_URI = "/settings/user/drop_account" @JvmStatic fun newInstance(user: User) = AccountRemovalDialog().apply { diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java index 71b991cb1069..ab19e5022679 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java @@ -35,6 +35,7 @@ import com.nextcloud.ui.fileactions.FileActionsBottomSheet; import com.nextcloud.utils.MenuUtils; import com.nextcloud.utils.extensions.BundleExtensionsKt; +import com.nmc.android.marketTracking.TealiumSdkUtils; import com.owncloud.android.MainApp; import com.owncloud.android.R; import com.owncloud.android.databinding.FileDetailsFragmentBinding; @@ -352,6 +353,8 @@ public void onStart() { super.onStart(); listenForTransferProgress(); EventBus.getDefault().register(this); + //track screen view when fragment is visible + TealiumSdkUtils.trackView(TealiumSdkUtils.SCREEN_VIEW_SHARING, preferences); } @Override diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java index 68241a44e69e..8f184b999c20 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailSharingFragment.java @@ -54,6 +54,9 @@ import com.owncloud.android.ui.adapter.ShareeListAdapter; import com.owncloud.android.ui.adapter.ShareeListAdapterListener; import com.owncloud.android.ui.asynctasks.RetrieveHoverCardAsyncTask; +import com.nextcloud.client.preferences.AppPreferences; +import com.nmc.android.marketTracking.AdjustSdkUtils; +import com.nmc.android.marketTracking.TealiumSdkUtils; import com.owncloud.android.ui.dialog.SharePasswordDialogFragment; import com.owncloud.android.ui.fragment.util.FileDetailSharingFragmentHelper; import com.owncloud.android.ui.helpers.FileOperationsHelper; @@ -99,6 +102,7 @@ public class FileDetailSharingFragment extends Fragment implements ShareeListAda @Inject ClientFactory clientFactory; @Inject ViewThemeUtils viewThemeUtils; @Inject UsersAndGroupsSearchConfig searchConfig; + @Inject AppPreferences appPreferences; public static FileDetailSharingFragment newInstance(OCFile file, User user) { FileDetailSharingFragment fragment = new FileDetailSharingFragment(); @@ -309,6 +313,10 @@ public void createPublicShareLink() { // create without password if not enforced by server or we don't know if enforced; fileOperationsHelper.shareFileViaPublicShare(file, null); } + + //track event on creating share link + AdjustSdkUtils.trackEvent(AdjustSdkUtils.EVENT_TOKEN_CREATE_SHARING_LINK, appPreferences); + TealiumSdkUtils.trackEvent(TealiumSdkUtils.EVENT_CREATE_SHARING_LINK, appPreferences); } @Override diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java index fd1a98f89655..5db04f9a4217 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListBottomSheetDialog.java @@ -15,7 +15,9 @@ import com.nextcloud.client.device.DeviceInfo; import com.nextcloud.client.di.Injectable; import com.nextcloud.client.documentscan.AppScanOptionalFeature; +import com.nextcloud.client.preferences.AppPreferencesImpl; import com.nextcloud.utils.EditorUtils; +import com.nmc.android.marketTracking.TealiumSdkUtils; import com.owncloud.android.R; import com.owncloud.android.databinding.FileListActionsBottomSheetCreatorBinding; import com.owncloud.android.databinding.FileListActionsBottomSheetFragmentBinding; @@ -156,6 +158,12 @@ protected void onCreate(Bundle savedInstanceState) { } setupClickListener(); + + //track screen view when fragment is visible + TealiumSdkUtils.trackView(TealiumSdkUtils.SCREEN_VIEW_FAB_PLUS, + //Need to create direct instance of AppPreferences as Injection doesn't work in Dialogs + //If we take AppPreferences as parameter in constructor it will affect the other NMC PRs test cases + AppPreferencesImpl.fromContext(fileActivity)); } private void setupClickListener() { diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java index 4bd1e91c379c..5e4de72862b7 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -57,7 +57,11 @@ import com.nextcloud.utils.ShortcutUtil; import com.nextcloud.utils.extensions.BundleExtensionsKt; import com.nextcloud.utils.extensions.IntentExtensionsKt; +import com.nmc.android.marketTracking.TrackingScanInterface; import com.nextcloud.utils.view.FastScrollUtils; +import com.nmc.android.marketTracking.AdjustSdkUtils; +import com.nmc.android.marketTracking.TrackingScanInterfaceImpl; +import com.nmc.android.marketTracking.TealiumSdkUtils; import com.owncloud.android.MainApp; import com.owncloud.android.R; import com.owncloud.android.datamodel.ArbitraryDataProvider; @@ -228,6 +232,13 @@ public class OCFileListFragment extends ExtendedListFragment implements @Inject DeviceInfo deviceInfo; + /** + * Things to note about both the branches. 1. nmc/1867-scanbot branch: --> interface won't be initialised --> + * calling of interface method will be done here 2. nmc/1925-market_tracking --> interface will be initialised --> + * calling of interface method won't be done here + */ + private TrackingScanInterface trackingScanInterface; + protected enum MenuItemAddRemove { DO_NOTHING, REMOVE_SORT, @@ -252,6 +263,9 @@ public void onCreate(Bundle savedInstanceState) { } searchFragment = currentSearchType != null && isSearchEventSet(searchEvent); + + //NMC customization will be initialised in nmc/1925-market_tracking + trackingScanInterface = new TrackingScanInterfaceImpl(); } @Override @@ -515,6 +529,10 @@ public void uploadFromApp() { Intent.createChooser(action, getString(R.string.upload_chooser_title)), FileDisplayActivity.REQUEST_CODE__SELECT_CONTENT_FROM_APPS ); + + //track event photo/video/any upload button click + AdjustSdkUtils.trackEvent(AdjustSdkUtils.EVENT_TOKEN_FAB_BOTTOM_PHOTO_VIDEO_UPLOAD, preferences); + TealiumSdkUtils.trackEvent(TealiumSdkUtils.EVENT_FAB_BOTTOM_PHOTO_VIDEO_UPLOAD, preferences); } @Override @@ -527,6 +545,10 @@ public void directCameraUpload() { } else { DisplayUtils.showSnackMessage(getView(), getString(R.string.error_starting_direct_camera_upload)); } + + //track event for camera upload button click + AdjustSdkUtils.trackEvent(AdjustSdkUtils.EVENT_TOKEN_FAB_BOTTOM_CAMERA_UPLOAD, preferences); + TealiumSdkUtils.trackEvent(TealiumSdkUtils.EVENT_FAB_BOTTOM_CAMERA_UPLOAD, preferences); } @Override @@ -556,6 +578,10 @@ public void uploadFiles() { ((FileActivity) getActivity()).getUser().orElseThrow(RuntimeException::new), FileDisplayActivity.REQUEST_CODE__SELECT_FILES_FROM_FILE_SYSTEM, getCurrentFile().isEncrypted()); + + // track event for uploading files button click + AdjustSdkUtils.trackEvent(AdjustSdkUtils.EVENT_TOKEN_FAB_BOTTOM_FILE_UPLOAD, preferences); + TealiumSdkUtils.trackEvent(TealiumSdkUtils.EVENT_FAB_BOTTOM_FILE_UPLOAD, preferences); } @Override @@ -584,6 +610,14 @@ public void onShareIconClick(OCFile file) { mContainerActivity.getFileOperationsHelper().sendShareFile(file); }); } + + //track event on click of Share button + trackSharingClickEvent(); + } + + private void trackSharingClickEvent() { + AdjustSdkUtils.trackEvent(AdjustSdkUtils.EVENT_TOKEN_FILE_BROWSER_SHARING, preferences); + TealiumSdkUtils.trackEvent(TealiumSdkUtils.EVENT_FILE_BROWSER_SHARING, preferences); } @Override @@ -1155,6 +1189,8 @@ public boolean onFileActionChosen(@IdRes final int itemId, Set checkedFi if (itemId == R.id.action_send_share_file) { mContainerActivity.getFileOperationsHelper().sendShareFile(singleFile); + //track event on click of Share button + trackSharingClickEvent(); return true; } else if (itemId == R.id.action_open_file_with) { mContainerActivity.getFileOperationsHelper().openFile(singleFile); @@ -1185,6 +1221,9 @@ public boolean onFileActionChosen(@IdRes final int itemId, Set checkedFi mContainerActivity.showDetails(singleFile); mContainerActivity.showSortListGroup(false); + + //track event on click of Share button + trackSharingClickEvent(); return true; } else if (itemId == R.id.action_set_as_wallpaper) { mContainerActivity.getFileOperationsHelper().setPictureAs(singleFile, getView()); diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 5761430919e7..16468b76f87e 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -211,6 +211,7 @@ Zu sichernde Daten Zugangsdaten falsch Benutzerkonto löschen + Konto %s und alle lokalen Dateien löschen?\n\nLöschung kann nicht rückgängig gemacht werden. Einträgen entfernen Link löschen Auswahl aufheben diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a7ebed20a682..39337d799e6d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -177,6 +177,7 @@ Request deletion Request permanent deletion of account by service provider Remove account + Remove account %s and delete all local files?\n\nDeletion cannot be undone. Avatar Active user Upload from… diff --git a/gradle.properties b/gradle.properties index 4d5b97426b19..0dea3e77e4b9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,6 +10,8 @@ android.useAndroidX=true android.nonTransitiveRClass=false android.nonFinalResIds=false #android.debug.obsoleteApi=true +ADJUST_APP_TOKEN="54qd7rraqav4" +MOENGAGE_APP_ID="XGJ4VU4OZ7HFU7EV5WTATM9K" # JVM arguments to optimize heap usage, enable heap dump on out-of-memory errors, and set the file encoding