Skip to content

Commit 9d28362

Browse files
Integrated extensive analytics tracking throughout the application.
- Expanded `AnalyticsHelper` with new methods for logging screen views, setting changes, profile updates, and errors. - Added screen tracking to `MainActivity` and `PermissionTrampolineActivity`. - Implemented event logging for various user interactions, including tab selection, theme changes, and device spoofing. - Integrated analytics into `AudioCaptureService` to track service lifecycle and audio capture events. - Added tracking for app updates, Shizuku permission results, and leaderboard synchronization. - Refined debug "thanks" message logic to trigger based on app open count.
1 parent 1b3d0bb commit 9d28362

4 files changed

Lines changed: 217 additions & 16 deletions

File tree

app/src/main/java/com/better/nothing/music/vizualizer/service/AudioCaptureService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ public enum CaptureSource { INTERNAL, MIC, VIZUALIZER, SHIZUKU }
131131
private static volatile boolean sIsRunning = false;
132132
public static AudioCaptureService sInstance = null;
133133

134+
private com.better.nothing.music.vizualizer.util.AnalyticsHelper mAnalyticsHelper;
134135
private final IBinder mBinder = new LocalBinder();
135136
private final Object mCaptureLock = new Object();
136137
private final MediaProjection.Callback mProjectionCallback = new MediaProjection.Callback() {
@@ -376,6 +377,8 @@ public AudioCaptureService getService() {
376377
public void onCreate() {
377378
super.onCreate();
378379
sInstance = this;
380+
mAnalyticsHelper = new com.better.nothing.music.vizualizer.util.AnalyticsHelper(this);
381+
mAnalyticsHelper.logEvent("service_created", null);
379382

380383
mWorkerThread = new HandlerThread("GlyphVizWorker", Process.THREAD_PRIORITY_BACKGROUND);
381384
mWorkerThread.start();
@@ -1178,6 +1181,7 @@ public void startVizualizerCapture() {
11781181
}
11791182

11801183
private void startCaptureInternal(CaptureSource source, int resultCode, Intent data) {
1184+
mAnalyticsHelper.logEvent("capture_start_attempt_" + source.name().toLowerCase(), null);
11811185
mCaptureSource = source;
11821186
MediaProjectionManager projectionManager = null;
11831187
if (source == CaptureSource.INTERNAL) {
@@ -1316,6 +1320,7 @@ public void stopCapture() {
13161320
}
13171321

13181322
private void stopCaptureLocked() {
1323+
mAnalyticsHelper.logEvent("capture_stopped", null);
13191324
mCapturing = false;
13201325
sIsRunning = false;
13211326
updateOverlayVisibility();

0 commit comments

Comments
 (0)