Skip to content

Commit eaf2428

Browse files
authored
Merge pull request #4 from trustwallet/SC-51749-update-ph-sdk
[SC-51749] Update PostHog SDK
2 parents c7a04ee + 0b7af62 commit eaf2428

File tree

146 files changed

+7512
-1065
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+7512
-1065
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Cancel Previous Runs
15-
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # [email protected].0
15+
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # [email protected].1
1616
with:
1717
access_token: ${{ github.token }}
1818

@@ -30,13 +30,13 @@ jobs:
3030
uses: actions/checkout@v4
3131

3232
- name: 'Set up Java: ${{ matrix.java }}'
33-
uses: actions/setup-java@v3
33+
uses: actions/setup-java@v4
3434
with:
3535
java-version: ${{ matrix.java }}
3636
distribution: 'temurin'
3737

3838
- name: Cache Gradle packages
39-
uses: actions/cache@v3
39+
uses: actions/cache@v4
4040
with:
4141
path: |
4242
~/.gradle/caches

.github/workflows/danger.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/gradle-wrapper-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15-
- uses: gradle/wrapper-validation-action@56b90f209b02bf6d1deae490e9ef18b21a389cd4 # pin@v1.1.0
15+
- uses: gradle/wrapper-validation-action@f9c9c575b8b21b6485636a91ffecd10e558c62f6 # pin@v3.5.0

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Cancel Previous Runs
12-
uses: styfle/cancel-workflow-action@01ce38bf961b4e243a6342cbade0dbc8ba3f0432 # [email protected].0
12+
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # [email protected].1
1313
with:
1414
access_token: ${{ github.token }}
1515

@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/checkout@v4
3333

3434
- name: 'Set up Java: ${{ matrix.java }}'
35-
uses: actions/setup-java@v3
35+
uses: actions/setup-java@v4
3636
with:
3737
java-version: ${{ matrix.java }}
3838
distribution: 'temurin'

CHANGELOG.md

Lines changed: 254 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,256 @@
11
## Next
22

3+
## 1.1.7
4+
- Add upstream changes 3.0.0-RC.1 - 3.11.2
5+
6+
## 3.11.2 - 2025-02-04
7+
8+
- fix: touches fall back to single touches if out of bounds ([#221](https://github.com/PostHog/posthog-android/pull/221))
9+
10+
## 3.11.1 - 2025-01-30
11+
12+
- fix: do not allow default integrations multiple times ([#219](https://github.com/PostHog/posthog-android/pull/219))
13+
14+
## 3.11.0 - 2025-01-27
15+
16+
- chore: Session Replay - GA
17+
- fix: session replay and auto capture works with 'with' method ([#217](https://github.com/PostHog/posthog-android/pull/217))
18+
- fix: sending cached events null check ([#218](https://github.com/PostHog/posthog-android/pull/218))
19+
20+
## 3.10.0 - 2025-01-07
21+
22+
- chore: change screenshots debouncing approach to throttling ([#214](https://github.com/PostHog/posthog-android/pull/214))
23+
- Added `throttleDelayMs` config and deprecated `debouncerDelayMs` config.
24+
- chore: change screenshot image type from JPEG to WEBP ([#211](https://github.com/PostHog/posthog-android/pull/211))
25+
26+
## 3.9.3 - 2024-11-26
27+
28+
- no user facing changes
29+
30+
## 3.9.2 - 2024-11-12
31+
32+
- fix: allow changing person properties after identify ([#205](https://github.com/PostHog/posthog-android/pull/205))
33+
34+
## 3.9.1 - 2024-11-11
35+
36+
- recording: fix observation on multiple threads in layout/draw is not supported for compose ([#204](https://github.com/PostHog/posthog-android/pull/204))
37+
38+
## 3.9.0 - 2024-10-30
39+
40+
- recording: add replay masking to jetpack compose views ([#198](https://github.com/PostHog/posthog-android/pull/198))
41+
42+
## 3.8.3 - 2024-10-25
43+
44+
- recording: fix crash when calling view.isVisible ([#201](https://github.com/PostHog/posthog-android/pull/201))
45+
- recording: change debouncerDelayMs default from 500ms to 1000ms (1s) ([#201](https://github.com/PostHog/posthog-android/pull/201))
46+
47+
## 3.8.2 - 2024-10-14
48+
49+
- recording: session replay respect feature flag variants ([#197](https://github.com/PostHog/posthog-android/pull/197))
50+
51+
## 3.8.1 - 2024-10-09
52+
53+
- recording: `OnTouchEventListener` try catch guard to swallow unexpected errors take 2 ([#196](https://github.com/PostHog/posthog-android/pull/196))
54+
55+
## 3.8.0 - 2024-10-03
56+
57+
- feat: add referrerURL automatically ([#186](https://github.com/PostHog/posthog-android/pull/186))
58+
59+
## 3.7.5 - 2024-09-26
60+
61+
- fix: isFeatureEnabled wasn't sending the $feature_flag_called event ([#185](https://github.com/PostHog/posthog-android/pull/185))
62+
63+
## 3.7.4 - 2024-09-23
64+
65+
- no user facing changes
66+
67+
## 3.7.3 - 2024-09-17
68+
69+
- no user facing changes
70+
71+
## 3.7.2 - 2024-09-17
72+
73+
- no user facing changes
74+
75+
## 3.7.1 - 2024-09-17
76+
77+
- recording: respect session replay project settings from app start ([#177](https://github.com/PostHog/posthog-android/pull/177))
78+
79+
## 3.7.0 - 2024-09-11
80+
81+
- chore: add personProfiles support ([#171](https://github.com/PostHog/posthog-android/pull/171))
82+
83+
## 3.6.1 - 2024-08-30
84+
85+
- fix: do not clear events when reset is called ([#170](https://github.com/PostHog/posthog-android/pull/170))
86+
- fix: reload feature flags as anon user after reset is called ([#170](https://github.com/PostHog/posthog-android/pull/170))
87+
88+
## 3.6.0 - 2024-08-29
89+
90+
- recording: expose session id ([#166](https://github.com/PostHog/posthog-android/pull/166))
91+
- fix: rotate session id when reset is called ([#168](https://github.com/PostHog/posthog-android/pull/168))
92+
- feat: add `$is_identified` property ([#167](https://github.com/PostHog/posthog-android/pull/167))
93+
- fix: identify should not allow already identified users ([#167](https://github.com/PostHog/posthog-android/pull/167))
94+
95+
## 3.5.1 - 2024-08-26
96+
97+
- recording: capture touch interaction off of main thread to avoid ANRs ([#165](https://github.com/PostHog/posthog-android/pull/165))
98+
- chore: use getNetworkCapabilities instead of getNetworkInfo to avoid ANRs ([#164](https://github.com/PostHog/posthog-android/pull/164))
99+
100+
## 3.5.0 - 2024-08-08
101+
102+
- feat: add emulator detection property to static context ([#154](https://github.com/PostHog/posthog-android/pull/154))
103+
- fix: ensure activity name is used when activity label is not defined ([#153](https://github.com/PostHog/posthog-android/pull/153)) and ([#156](https://github.com/PostHog/posthog-android/pull/156))
104+
- recording: mask views with `contentDescription` setting and mask `WebView` if any masking is enabled ([#149](https://github.com/PostHog/posthog-android/pull/149))
105+
106+
## 3.4.2 - 2024-06-28
107+
108+
- chore: create ctor overloads for better Java DX ([#148](https://github.com/PostHog/posthog-android/pull/148))
109+
110+
## 3.4.1 - 2024-06-27
111+
112+
- recording: `OnTouchEventListener` try catch guard to swallow unexpected errors ([#147](https://github.com/PostHog/posthog-android/pull/147))
113+
114+
## 3.4.0 - 2024-06-20
115+
116+
- chore: screenshot masking ([#145](https://github.com/PostHog/posthog-android/pull/145))
117+
118+
## 3.3.2 - 2024-06-17
119+
120+
- chore: migrate UUID from v4 to v7 ([#142](https://github.com/PostHog/posthog-android/pull/142))
121+
- recording: fix registering the ViewTreeObserver when its not attached yet ([#144](https://github.com/PostHog/posthog-android/pull/144))
122+
123+
## 3.3.1 - 2024-06-11
124+
125+
- chore: change host to new address ([#137](https://github.com/PostHog/posthog-android/pull/137))
126+
- fix: rename groupProperties to groups for capture methods ([#139](https://github.com/PostHog/posthog-android/pull/139))
127+
- fix: PostHogLogger possibly leaks this ctor and crash ([#140](https://github.com/PostHog/posthog-android/pull/140))
128+
129+
## 3.3.0 - 2024-05-24
130+
131+
- feat: allow anonymous uuid generation to be customizable ([#132](https://github.com/PostHog/posthog-android/pull/132))
132+
- recording: fix removing the ViewTreeObserver when its not alive ([#134](https://github.com/PostHog/posthog-android/pull/134))
133+
134+
## 3.2.2 - 2024-05-21
135+
136+
- chore: register to sdk console ([#131](https://github.com/PostHog/posthog-android/pull/131))
137+
138+
## 3.2.1 - 2024-05-08
139+
140+
- fix: reduce batch size if API returns 413 ([#130](https://github.com/PostHog/posthog-android/pull/130))
141+
- `screenshot` image is now a JPEG at 30% quality to reduce size
142+
143+
## 3.2.0 - 2024-04-30
144+
145+
- recording: add `screenshot` option for session replay instead of wireframe ([#127](https://github.com/PostHog/posthog-android/pull/127))
146+
147+
## 3.1.18 - 2024-04-24
148+
149+
- fix: set correct `User-Agent` for Android and returns session recording even if authorized domains is enabled ([#125](https://github.com/PostHog/posthog-android/pull/125))
150+
151+
## 3.1.17 - 2024-04-11
152+
153+
- recording: multiple fixes for better frame rate, padding, drawables ([#118](https://github.com/PostHog/posthog-android/pull/118))
154+
155+
## 3.1.16 - 2024-03-27
156+
157+
- fix: add replay props only if replay is enabled ([#112](https://github.com/PostHog/posthog-android/pull/112))
158+
159+
## 3.1.15 - 2024-03-08
160+
161+
- recording: do not capture password text even if masking is off ([#111](https://github.com/PostHog/posthog-android/pull/111))
162+
163+
## 3.1.14 - 2024-03-05
164+
165+
- recording: fix issue with nullable hint ([#109](https://github.com/PostHog/posthog-android/pull/109))
166+
- recording: adds `drawableConverter` option to convert custom Drawable to Bitmap ([#110](https://github.com/PostHog/posthog-android/pull/110))
167+
168+
## 3.1.13 - 2024-03-01
169+
170+
- fix do not allow nullable `sessionId` ([#107](https://github.com/PostHog/posthog-android/pull/107))
171+
172+
## 3.1.12 - 2024-02-29
173+
174+
- fix merge groups for events ([#105](https://github.com/PostHog/posthog-android/pull/105))
175+
176+
## 3.1.11 - 2024-02-28
177+
178+
- fix back compatibility with Kotlin 1.7 ([#104](https://github.com/PostHog/posthog-android/pull/104))
179+
180+
## 3.1.10 - 2024-02-27
181+
182+
- do not allow empty or blank `distinct_id` or `anon_distinct_id` ([#101](https://github.com/PostHog/posthog-android/pull/101))
183+
184+
## 3.1.9 - 2024-02-22
185+
186+
- roll back compile API to 33 to keep back compatibility ([#98](https://github.com/PostHog/posthog-android/pull/98))
187+
- set `device_type` accordingly to Mobile, TV, or Tablet ([#93](https://github.com/PostHog/posthog-android/pull/93))
188+
189+
## 3.1.8 - 2024-02-19
190+
191+
- fix reset session when reset or close are called ([#97](https://github.com/PostHog/posthog-android/pull/97))
192+
193+
## 3.1.7 - 2024-02-14
194+
195+
- recording: fix missing windowAttachCount method after minification ([#96](https://github.com/PostHog/posthog-android/pull/96))
196+
197+
## 3.1.6 - 2024-02-01
198+
199+
- recording: clone drawable before using ([#91](https://github.com/PostHog/posthog-android/pull/91))
200+
201+
## 3.1.5 - 2024-01-24
202+
203+
- recording: gradient background support ([#88](https://github.com/PostHog/posthog-android/pull/88))
204+
205+
## 3.1.4 - 2024-01-19
206+
207+
- Set `Content-Length` header for gzip bodies because of more strict proxies ([#86](https://github.com/PostHog/posthog-android/pull/86))
208+
209+
## 3.1.3 - 2024-01-17
210+
211+
- Do not capture console logs and network requests if session replay and session are not active ([#83](https://github.com/PostHog/posthog-android/pull/83))
212+
213+
## 3.1.2 - 2024-01-15
214+
215+
- Send wireframe children for updated wireframes - mutation ([#81](https://github.com/PostHog/posthog-android/pull/81))
216+
217+
## 3.1.1 - 2024-01-11
218+
219+
- fix: Events Queue is only paused if there were errors ([#78](https://github.com/PostHog/posthog-android/pull/78))
220+
- fix: Do not report flag events if the flag has been reported with the same value ([#78](https://github.com/PostHog/posthog-android/pull/78))
221+
- fix: Check keyboard status during snapshot instead of using WindowInsets listener ([#77](https://github.com/PostHog/posthog-android/pull/77))
222+
223+
## 3.1.0 - 2024-01-08
224+
225+
- chore: Add mutations support to Session Recording ([#72](https://github.com/PostHog/posthog-android/pull/72))
226+
- chore: Session Recording as Experimental preview
227+
- Check out the [USAGE](https://github.com/PostHog/posthog-android/blob/main/USAGE.md#android-session-recording) guide.
228+
229+
## 3.0.1 - 2024-01-03
230+
231+
- `flush` forcefully sends events regardless the delay ([#73](https://github.com/PostHog/posthog-android/pull/73))
232+
233+
## 3.1.0-alpha.2 - 2024-01-02
234+
235+
- Send custom keyboard event when keyboard is open or close ([#71](https://github.com/PostHog/posthog-android/pull/71))
236+
237+
## 3.1.0-alpha.1 - 2023-12-18
238+
239+
- Android Session Recording - Alpha preview ([#69](https://github.com/PostHog/posthog-android/pull/69))
240+
241+
Check out the [USAGE](https://github.com/PostHog/posthog-android/blob/main/USAGE.md#android-session-recording) guide.
242+
243+
## 3.0.0 - 2023-12-06
244+
245+
Check out the updated [docs](https://posthog.com/docs/libraries/android).
246+
247+
Check out the [USAGE](https://github.com/PostHog/posthog-android/blob/main/USAGE.md) guide.
248+
249+
### Changes
250+
3251
- Bump Kotlin to min. 1.6 compatibility ([#68](https://github.com/PostHog/posthog-android/pull/68))
252+
- `minSdk` set to 21.
253+
- Rewritten in Kotlin.
4254

5255
## 3.0.0-RC.1 - 2023-11-20
6256

@@ -73,19 +323,19 @@
73323

74324
## 2.0.3 - 2023-01-30
75325

76-
- Feature flags will be sent with payloads by default for capture and screen events.
326+
- Feature flags will be sent with payloads by default for capture and screen events.
77327

78328
## 2.0.2 - 2023-02-21
79329

80-
- Revert: Feature flags will be sent with payloads by default. Default Options will be properly applied
330+
- Revert: Feature flags will be sent with payloads by default. Default Options will be properly applied
81331

82332
## 2.0.1 - 2023-01-30
83333

84-
- Feature flags will be sent with payloads by default. Default Options will be properly applied
334+
- Feature flags will be sent with payloads by default. Default Options will be properly applied
85335

86336
## 2.0.0 - 2022-08-29
87337

88-
- Add support for groups, simplefeature flags, and multivariate feature flags
338+
- Add support for groups, simplefeature flags, and multivariate feature flags
89339

90340
## 1.1.2 - 2021-03-11
91341

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: clean compile stop checkFormat format api dryRelease release testReport test testJava
1+
.PHONY: clean compile stop checkFormat format api dryRelease release testReport test testJava generateLintBaseLine
22

33
clean:
44
./gradlew clean
@@ -36,3 +36,7 @@ test:
3636
# compile already runs the tests (tests only java)
3737
testJava:
3838
./gradlew :posthog:test
39+
40+
generateLintBaseLine:
41+
rm -f posthog-android/lint-baseline.xml
42+
./gradlew lintDebug -Dlint.baselines.continue=true

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
Please see the main [PostHog docs](https://posthog.com/docs).
1010

11-
Specifically, the [Android integration](https://posthog.com/docs/integrations/android-integration) details.
11+
Specifically, the [Android docs](https://posthog.com/docs/libraries/android) details.
1212

1313
## Questions?
1414

15-
### [Join our Slack community.](https://join.slack.com/t/posthogusers/shared_invite/enQtOTY0MzU5NjAwMDY3LTc2MWQ0OTZlNjhkODk3ZDI3NDVjMDE1YjgxY2I4ZjI4MzJhZmVmNjJkN2NmMGJmMzc2N2U3Yjc3ZjI5NGFlZDQ)
15+
### [Check out our community page.](https://posthog.com/posts)

0 commit comments

Comments
 (0)