forked from organicmaps/organicmaps
[android] Flurry statistics added.
This commit is contained in:
parent
65a53f3b44
commit
d0796d67d6
3 changed files with 23 additions and 0 deletions
|
@ -930,6 +930,9 @@ public class MWMActivity extends NvEventQueueActivity implements LocationService
|
|||
// TODO Auto-generated method stub
|
||||
if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_UP)
|
||||
{
|
||||
if (ActivationSettings.isSearchActivated(getApplicationContext()))
|
||||
return false;
|
||||
|
||||
showDialog(PROMO_DIALOG);
|
||||
dismissDialog(PRO_VERSION_DIALOG);
|
||||
return true;
|
||||
|
|
|
@ -15,6 +15,7 @@ import android.widget.TextView;
|
|||
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.promo.request.PromoActivationRequest;
|
||||
import com.mapswithme.util.Statistics;
|
||||
import com.mapswithme.util.Utils;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
@ -73,6 +74,9 @@ public class PromocodeActivationDialog extends Dialog
|
|||
hideError();
|
||||
|
||||
mHandler = new Handler();
|
||||
|
||||
// Track dialog creation
|
||||
Statistics.INSTANCE.trackPromocodeDialogOpenedEvent();
|
||||
}
|
||||
|
||||
private String getString(int id)
|
||||
|
@ -190,6 +194,9 @@ public class PromocodeActivationDialog extends Dialog
|
|||
ActivationSettings.setSearchActivated(getContext(), true);
|
||||
dismiss();
|
||||
Utils.toastShortcut(getContext(), getString(R.string.promocode_success));
|
||||
|
||||
// Track successful activation
|
||||
Statistics.INSTANCE.trackPromocodeActivatedEvent();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -8,6 +8,9 @@ import com.mapswithme.maps.R;
|
|||
public enum Statistics
|
||||
{
|
||||
INSTANCE;
|
||||
|
||||
private static String TAG_PROMO_DE = "PROMO-DE: ";
|
||||
|
||||
private Statistics()
|
||||
{
|
||||
Log.d("Stats", "Created Statistics instance.");
|
||||
|
@ -18,6 +21,16 @@ public enum Statistics
|
|||
FlurryAgent.setLogLevel(Log.DEBUG);
|
||||
}
|
||||
|
||||
public void trackPromocodeDialogOpenedEvent()
|
||||
{
|
||||
FlurryAgent.logEvent(TAG_PROMO_DE + "opened promo code dialog");
|
||||
}
|
||||
|
||||
public void trackPromocodeActivatedEvent()
|
||||
{
|
||||
FlurryAgent.logEvent(TAG_PROMO_DE + "promo code activated");
|
||||
}
|
||||
|
||||
public void startActivity(Context context)
|
||||
{
|
||||
synchronized ("live")
|
||||
|
|
Loading…
Add table
Reference in a new issue