Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
7b6fb51
refactor: force flush RQ
arifBurakDemiray Dec 18, 2025
0193057
feat: use it in refresh
arifBurakDemiray Dec 18, 2025
b98a7ca
feat: force flush tick
arifBurakDemiray Dec 18, 2025
1ef4de5
feat: make it final
arifBurakDemiray Dec 18, 2025
4c20f37
feat: wait mech for testing
arifBurakDemiray Dec 18, 2025
84bc806
feat: changelog
arifBurakDemiray Dec 18, 2025
4306495
Merge branch 'staging' into refactor_refresh
arifBurakDemiray Dec 18, 2025
d4d6dba
fix: sync thingies
arifBurakDemiray Dec 18, 2025
bca9b13
Merge branch 'refactor_refresh' of https://github.com/Countly/countly…
arifBurakDemiray Dec 18, 2025
8ed6d19
feat: await all resources
arifBurakDemiray Jan 14, 2026
46176f6
Change API badge from 9+ to 21+
arifBurakDemiray Feb 10, 2026
6a4705a
fix: top on 35 and bottom below 30
arifBurakDemiray Feb 26, 2026
3590e2f
feat: revert changes
arifBurakDemiray Feb 26, 2026
f6c3ea3
Merge branch 'staging' into refactor_refresh
arifBurakDemiray Feb 26, 2026
53ff449
feat: new design for rq flush
arifBurakDemiray Feb 26, 2026
2838cd8
fix: move tests to new way
arifBurakDemiray Feb 26, 2026
cd30239
Merge pull request #537 from Countly/staging
arifBurakDemiray Feb 26, 2026
05c57a0
feat: more secure js bridge
arifBurakDemiray Feb 27, 2026
03af7f8
feat: preview content
arifBurakDemiray Feb 27, 2026
23fd875
feat: add tests
arifBurakDemiray Feb 27, 2026
959e011
feat: changelog
arifBurakDemiray Feb 27, 2026
d3a231d
Merge pull request #526 from Countly/refactor_refresh
turtledreams Feb 27, 2026
7907ad6
Merge pull request #535 from Countly/arifBurakDemiray-patch-2
turtledreams Feb 27, 2026
26aea8f
Merge branch 'staging' into content_fix
turtledreams Feb 27, 2026
1d785fc
Merge pull request #536 from Countly/content_fix
turtledreams Feb 27, 2026
b563471
feat: wait correctly
arifBurakDemiray Feb 27, 2026
8b9bcb5
feat: webview comm await via js bridge
arifBurakDemiray Mar 9, 2026
a1f17d0
refactor: contents
arifBurakDemiray Mar 10, 2026
e2f0859
feat: example fragment menu
arifBurakDemiray Mar 10, 2026
48f786e
refactor: modernize example app
arifBurakDemiray Mar 10, 2026
6c7d8da
Merge pull request #540 from Countly/remake_example_app
turtledreams Mar 10, 2026
4d7272f
Merge pull request #541 from Countly/staging
arifBurakDemiray Mar 10, 2026
3b1116d
fix: for api level below 30
arifBurakDemiray Mar 10, 2026
48701e2
feat: letting touchs work
arifBurakDemiray Mar 11, 2026
dc65741
feat: add missing func
arifBurakDemiray Mar 11, 2026
de266a2
fix: store tests
arifBurakDemiray Mar 11, 2026
240d39e
fix: changelog
arifBurakDemiray Mar 11, 2026
77fe3fe
fix: refreshContentZone tests
arifBurakDemiray Mar 12, 2026
8a208c0
fix: sbs tests
arifBurakDemiray Mar 12, 2026
3fdc7ff
feat: changelog for es write hc
arifBurakDemiray Mar 12, 2026
1fccbb5
Merge branch 'staging' into preview_content
arifBurakDemiray Mar 12, 2026
f01c106
feat: add activity removal notice
arifBurakDemiray Mar 12, 2026
ffd9d44
Update CHANGELOG.md
turtledreams Mar 12, 2026
22f8a74
Merge pull request #539 from Countly/remake_content
turtledreams Mar 12, 2026
62fc7b0
Merge branch 'staging' into preview_content
arifBurakDemiray Mar 12, 2026
eb63b5a
Merge pull request #538 from Countly/preview_content
turtledreams Mar 12, 2026
3a3d7c6
Merge pull request #528 from Countly/await_all_rsrcs
turtledreams Mar 12, 2026
fcff6a7
fix: merge conflict
arifBurakDemiray Mar 12, 2026
a120de1
Merge pull request #543 from Countly/fix_merge_conflict
turtledreams Mar 12, 2026
259e5b6
feat: 26.1.1
arifBurakDemiray Mar 12, 2026
5c74696
Merge pull request #544 from Countly/26_1_1
turtledreams Mar 12, 2026
a0cbc58
feat: changelog
arifBurakDemiray Mar 30, 2026
93586d3
feat: feature impl
arifBurakDemiray Mar 30, 2026
72e127f
feat: tests
arifBurakDemiray Mar 30, 2026
9880d38
feat: disk metric impl
arifBurakDemiray Apr 2, 2026
57007ab
feat: content provider
arifBurakDemiray Apr 7, 2026
6aad6c5
feat: 26.1.2-rc1
arifBurakDemiray Apr 7, 2026
96beb8f
Merge pull request #548 from Countly/content_provider
turtledreams Apr 7, 2026
3753d5a
feat: 26.1.2
arifBurakDemiray Apr 8, 2026
a18f363
Merge pull request #550 from Countly/staging
arifBurakDemiray Apr 9, 2026
b01c13a
Update CHANGELOG.md
arifBurakDemiray Apr 9, 2026
05b6124
Update DeviceInfo.java
arifBurakDemiray Apr 9, 2026
ecbb0ed
Merge pull request #547 from Countly/metricprovider_override
turtledreams Apr 9, 2026
5ac9cd6
Merge pull request #549 from Countly/26_1_2
turtledreams Apr 9, 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
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 26.1.2
* Added `CountlyInitProvider` ContentProvider to register activity lifecycle callbacks before `Application.onCreate()`. This ensures the SDK captures the current activity in single-activity frameworks (Flutter, React Native) and apps with deferred initialization.
* Added `CountlyConfig.setInitialActivity(Activity)` as an explicit way for wrapper SDKs to provide the host activity during initialization.
* Added a new config option `setMetricProvider(MetricProvider)` to allow overriding default device metrics with custom values.

## 26.1.1
* Added Content feature method `previewContent(String contentId)` (Experimental!).
* Improved content display and refresh mechanics.

* Mitigated an issue about health checks storage in explicit storage mode.

## 26.1.0
* Extended server configuration capabilities with server-controlled listing filters:
* Event filters (blacklist/whitelist) to control which events are recorded.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b26d1acc435c47af88b4e4b9eb94f59f)](https://app.codacy.com/gh/Countly/countly-sdk-android/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![API](https://img.shields.io/badge/API-9%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=9)
![API](https://img.shields.io/badge/API-21%2B-brightgreen.svg?style=flat)

# Countly Android SDK

Expand Down
9 changes: 1 addition & 8 deletions app-kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
jvmTarget = '1.8'
}

dataBinding {
enabled = true
}
Expand Down
9 changes: 9 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,19 @@ repositories {
}
}

kotlin {
jvmToolchain(17)
}

android {
compileSdk 35
namespace 'ly.count.android.demo'

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

signingConfigs {
release {
storeFile file('keys')
Expand Down
21 changes: 21 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"
android:configChanges="orientation|screenSize"
android:exported="true">
<intent-filter>
Expand Down Expand Up @@ -105,6 +106,11 @@
android:label="@string/activity_name_content_zone"
android:configChanges="orientation|screenSize"/>

<activity
android:name=".ActivityExampleFragments"
android:label="Fragment Navigation Test"
android:configChanges="orientation|screenSize"/>

<activity
android:name=".ActivityExampleTests"
android:exported="false"/>
Expand Down Expand Up @@ -149,6 +155,21 @@
</intent-filter>
</activity>
<activity android:name=".ActivityExampleKotlin"/>

<activity
android:name=".ActivityExampleConsent"
android:label="@string/activity_name_consent"
android:configChanges="orientation|screenSize"/>

<activity
android:name=".ActivityExampleLocation"
android:label="@string/activity_name_location"
android:configChanges="orientation|screenSize"/>

<activity
android:name=".ActivityExampleSessions"
android:label="@string/activity_name_sessions"
android:configChanges="orientation|screenSize"/>
</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package ly.count.android.demo;

import android.os.Bundle;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

import com.google.android.material.switchmaterial.SwitchMaterial;

import ly.count.android.sdk.Countly;

public class ActivityExampleConsent extends AppCompatActivity {

private static final String[][] FEATURES = {
{"sessions", "switchSessions"},
{"events", "switchEvents"},
{"views", "switchViews"},
{"crashes", "switchCrashes"},
{"attribution", "switchAttribution"},
{"users", "switchUsers"},
{"push", "switchPush"},
{"starRating", "switchStarRating"},
{"remoteConfig", "switchRemoteConfig"},
{"location", "switchLocation"},
{"feedback", "switchFeedback"},
{"apm", "switchApm"},
{"content", "switchContent"},
};

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_example_consent);

// Set initial switch states and listeners
for (String[] feature : FEATURES) {
String featureName = feature[0];
int resId = getResources().getIdentifier(feature[1], "id", getPackageName());
SwitchMaterial sw = findViewById(resId);
if (sw != null) {
sw.setChecked(Countly.sharedInstance().consent().getConsent(featureName));
sw.setOnCheckedChangeListener((buttonView, isChecked) -> {
if (isChecked) {
Countly.sharedInstance().consent().giveConsent(new String[]{featureName});
} else {
Countly.sharedInstance().consent().removeConsent(new String[]{featureName});
}
});
}
}

findViewById(R.id.btnGiveAllConsent).setOnClickListener(v -> {
Countly.sharedInstance().consent().giveConsentAll();
refreshSwitches();
Toast.makeText(this, "All consent given", Toast.LENGTH_SHORT).show();
});

findViewById(R.id.btnRemoveAllConsent).setOnClickListener(v -> {
Countly.sharedInstance().consent().removeConsentAll();
refreshSwitches();
Toast.makeText(this, "All consent removed", Toast.LENGTH_SHORT).show();
});
}

private void refreshSwitches() {
for (String[] feature : FEATURES) {
int resId = getResources().getIdentifier(feature[1], "id", getPackageName());
SwitchMaterial sw = findViewById(resId);
if (sw != null) {
sw.setChecked(Countly.sharedInstance().consent().getConsent(feature[0]));
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,6 @@ public void onClickChangeDeviceIdContentZone(View v) {
String newDeviceId = deviceId.isEmpty() ? UUID.randomUUID().toString() : deviceId;

Countly.sharedInstance().deviceId().setID(newDeviceId);
Countly.sharedInstance().consent().giveConsentAll();
}
}
Loading
Loading