Some GA for Floating Calculator
This commit is contained in:
@@ -90,4 +90,19 @@ public final class Ga implements SharedPreferences.OnSharedPreferenceChangeListe
|
||||
reportLayout(Preferences.Gui.layout.getPreferenceNoError(preferences));
|
||||
reportTheme(Preferences.Gui.theme.getPreferenceNoError(preferences));
|
||||
}
|
||||
|
||||
public void onBootStart() {
|
||||
final HitBuilders.EventBuilder b = new HitBuilders.EventBuilder();
|
||||
b.setCategory("lifecycle");
|
||||
b.setAction("boot");
|
||||
tracker.send(b.build());
|
||||
}
|
||||
|
||||
public void onFloatingCalculatorOpened() {
|
||||
final HitBuilders.EventBuilder b = new HitBuilders.EventBuilder();
|
||||
b.setCategory("lifecycle");
|
||||
b.setAction("floating_calculator");
|
||||
b.setLabel("start");
|
||||
tracker.send(b.build());
|
||||
}
|
||||
}
|
||||
|
@@ -30,6 +30,7 @@ import android.preference.PreferenceManager;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import org.solovyev.android.calculator.App;
|
||||
import org.solovyev.android.calculator.Preferences;
|
||||
|
||||
/**
|
||||
@@ -50,6 +51,7 @@ public final class CalculatorOnscreenBroadcastReceiver extends BroadcastReceiver
|
||||
if (Preferences.OnscreenCalculator.startOnBoot.getPreferenceNoError(preferences)) {
|
||||
CalculatorOnscreenService.showNotification(context);
|
||||
}
|
||||
App.getGa().onBootStart();
|
||||
} else {
|
||||
final Intent newIntent = new Intent(intent);
|
||||
newIntent.setClass(context, CalculatorOnscreenService.class);
|
||||
|
@@ -154,6 +154,7 @@ public class CalculatorOnscreenService extends Service implements OnscreenViewLi
|
||||
if (isShowWindowIntent(intent)) {
|
||||
hideNotification();
|
||||
createView();
|
||||
App.getGa().onFloatingCalculatorOpened();
|
||||
} else if (isShowNotificationIntent(intent)) {
|
||||
showNotification();
|
||||
}
|
||||
|
Reference in New Issue
Block a user