[old map downloader][android] add: Downloader statistics.

This commit is contained in:
Alexander Marchuk 2016-01-28 17:31:13 +03:00 committed by Sergey Yershov
parent 393abac32f
commit 3ac96c7f94
3 changed files with 10 additions and 1 deletions

View file

@ -16,6 +16,7 @@ import com.mapswithme.util.Config;
import com.mapswithme.util.ThemeUtils;
import com.mapswithme.util.UiUtils;
import com.mapswithme.util.Utils;
import com.mapswithme.util.statistics.Statistics;
public class DownloadFragment extends BaseMwmListFragment implements View.OnClickListener, ActiveCountryTree.ActiveCountryListener, OnBackPressListener
{
@ -251,6 +252,7 @@ public class DownloadFragment extends BaseMwmListFragment implements View.OnClic
break;
case R.id.download_all:
Statistics.INSTANCE.trackEvent(Statistics.EventName.DOWNLOADER_MAP_DOWNLOAD_ALL);
CountryTree.downloadGroup();
getDownloadAdapter().notifyDataSetInvalidated();
break;

View file

@ -284,6 +284,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
void showMigrateDialog()
{
Statistics.INSTANCE.trackEvent(Statistics.EventName.DOWNLOADER_MIGRATE_DIALOG_SEEN);
new AlertDialog.Builder(MwmActivity.this)
.setTitle(R.string.migrate_title)
.setMessage(R.string.migrate_and_split_mwms_message)
@ -293,6 +295,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
@Override
public void onClick(DialogInterface dialog, int which)
{
Statistics.INSTANCE.trackEvent(Statistics.EventName.DOWNLOADER_MIGRATE_PERFORMED);
RoutingController.get().cancel();
ActiveCountryTree.migrate();
showDownloader(false);

View file

@ -34,10 +34,13 @@ public enum Statistics
public static class EventName
{
// actions with maps
// Downloader
public static final String DOWNLOADER_MAP_DOWNLOAD = "Country download";
public static final String DOWNLOADER_MAP_DOWNLOAD_ALL = "Download all country clicks counter";
public static final String DOWNLOADER_MAP_UPDATE = "Country update";
public static final String DOWNLOADER_MAP_DELETE = "Country delete";
public static final String DOWNLOADER_MIGRATE_DIALOG_SEEN = "Big mwms to small mwms dialog appearing counter";
public static final String DOWNLOADER_MIGRATE_PERFORMED = "Big mwms to small mwms migration counter";
public static final String MAP_DOWNLOADED = "DownloadMap";
public static final String MAP_UPDATED = "UpdateMap";
// bookmarks