Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
3ff3fed
Analytics rewrite: generic provider SPI with GDPR consent and multipl…
shai-almog Jun 20, 2026
d494beb
Analytics: avoid StringBuilder.substring (not in CLDC11 core API)
shai-almog Jun 20, 2026
3b2a733
Analytics: drop dead legacy fields (SpotBugs URF_UNREAD_FIELD gate)
shai-almog Jun 20, 2026
b38ac97
Analytics: satisfy PMD forbidden-rules gate
shai-almog Jun 20, 2026
2422a15
docs: fix LanguageTool gate in Analytics chapter (US spelling, Piwik)
shai-almog Jun 20, 2026
1aaa317
Analytics: enrich first-party batch with device segmentation metadata
shai-almog Jun 21, 2026
2d756b3
Analytics: custom dimensions API, browser/OS reporting, auto-instrume…
shai-almog Jun 21, 2026
cd66aaa
Merge remote-tracking branch 'origin/master' into analytics-spi-rewrite
shai-almog Jun 22, 2026
0325a30
Analytics: drop redundant null check (SpotBugs RCN forbidden gate)
shai-almog Jun 22, 2026
0f95553
Analytics: add AnalyticsConsent.all()/none() for app-managed consent
shai-almog Jun 23, 2026
2f6d1db
docs: document AnalyticsConsent.all() and the consent escape hatches
shai-almog Jun 23, 2026
fd44648
Analytics: clarify crash vs Crash Protection, consent reference; drop…
shai-almog Jun 23, 2026
1e664ce
Analytics: replace Firebase NativeInterface with a registerable Bridge
shai-almog Jun 23, 2026
da6e862
Builders: generate + register the Firebase analytics Bridge
shai-almog Jun 23, 2026
5139be8
docs: correct Firebase setup paths (Maven) + device-only warning
shai-almog Jun 23, 2026
52cb49d
docs: fix stale native/android paths in the push chapter
shai-almog Jun 24, 2026
b9ca898
Analytics: auto-instrument login + purchase-initiation funnel
shai-almog Jun 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/*
* Copyright (c) 2026, Codename One and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Codename One designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Codename One through http://www.codenameone.com/ if you
* need additional information or have any questions.
*/
package com.codename1.analytics;

/// Convenience base class for {@link AnalyticsProvider} implementations. Every
/// SPI method has an empty / no-op body so a concrete provider only overrides
/// the calls it actually supports. The {@link AnalyticsContext} handed to
/// {@link #init(AnalyticsContext)} is retained and exposed via
/// {@link #getContext()}; {@link #supports(AnalyticsCapability)} returns
/// {@code false} for every capability and should be overridden.
public abstract class AbstractAnalyticsProvider implements AnalyticsProvider {
private AnalyticsContext context;

@Override
public abstract String getName();

@Override
public void init(AnalyticsContext context) {
this.context = context;
}

/// The context supplied at {@link #init(AnalyticsContext)} time.
///
/// #### Returns
///
/// the context, or null if not yet initialised
protected AnalyticsContext getContext() {
return context;
}

@Override
public void trackScreen(String name, String referrer) {
}

@Override
public void trackEvent(AnalyticsEvent event) {
}

@Override
public void setUserId(String id) {
}

@Override
public void setUserProperty(String key, String value) {
}

@Override
public void reportCrash(AnalyticsCrashReport report) {
}

@Override
public void onConsentChanged(AnalyticsConsent consent) {
}

@Override
public void flush() {
}

@Override
public boolean supports(AnalyticsCapability capability) {
return false;
}
}
Loading
Loading