Skip to content

Commit 458644c

Browse files
authored
Merge pull request #106 from Parsely/4.0-migration-guide
4.x migration guide
2 parents ca04c4f + 46d44e2 commit 458644c

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

MIGRATION.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Parse.ly Android SDK Migration Guide
2+
3+
This document acts as a guide for migration, detailing every breaking change that occurs between major versions of the Parse.ly Android SDK.
4+
5+
## Upgrading to version 4.x
6+
7+
When migrating to version 4.x of the Parse.ly Android SDK, you will encounter several changes that may require updates to your codebase. The following list details these breaking changes and recommended actions:
8+
9+
### Removed initialization `ParselyTracker#sharedInstance` methods
10+
11+
Previously, the SDK was initialized `ParselyTracker#sharedInstance` method, which should be replaced with `ParselyTracker#init` method:
12+
13+
```kotlin
14+
ParselyTracker.sharedInstance("example.com", 30, this, true) // before
15+
16+
ParselyTracker.init("example.com", 30, this, true) // now
17+
```
18+
19+
Without prior initialization, the SDK will now throw `ParselyNotInitializedException` when accessing `ParselyTracker#sharedInstance`.
20+
21+
*Action required*: Update how the Parsely SDK is initialized and accessed as presented above.
22+
23+
### Removed methods or access restriction
24+
The following methods are no longer accessible from the `ParselyTracker` class:
25+
26+
- `engagementIsActive`
27+
- `flushEventQueue`
28+
- `flushTimerIsActive`
29+
- `getDebug`
30+
- `getEngagementInterval`
31+
- `getFlushInterval`
32+
- `getVideoEngagementInterval`
33+
- `queueSize`
34+
- `stopFlushTimer`
35+
- `storedEventsCount`
36+
- `videoIsActive`
37+
38+
Also, `toMap` methods are no longer available for API consumers:
39+
40+
- `ParselyMetadata#toMap`
41+
- `ParselyVideoMetadata#toMap`
42+
43+
*Action required*: Those methods aren't needed to use the SDK. Remove any code segments that interact with them.
44+
45+
### Restricted access to internal API connection
46+
`ParselyAPIConnection`, which might have been previously used for direct API interactions, is no longer accessible to the API consumer.
47+
48+
*Action required*: Remove any code segments that interact with `ParselyAPIConnection` as this class is now an implementation detail of the SDK.
49+
50+
### Non-nullable `urlRef` parameters
51+
Parameters that were previously nullable when calling various tracking methods are now non-nullable.
52+
53+
- In the `ParselyTracker` class, the `urlRef` parameter in the following methods requires a string value:
54+
- `trackPageview`
55+
- `startEngagement`
56+
- `trackPlay`
57+
58+
*Action required*: When calling these methods, ensure you provide a valid string. If there is no value available, pass an empty string `""` instead of `null`.
59+
60+
### Debug configuration change
61+
Configuring the debug mode during the SDK initialization has been simplified to a "dry run" mode flag.
62+
63+
- The method `ParselyTracker#setDebug` is no longer available.
64+
65+
*Action required*: To enable `debug` mode, when initializing the `ParselyTracker`, set the `dryRun` property to `true`.
66+
67+
---
68+
69+
For clarification on any of these changes or assistance with migrating your code to the latest version of the Parse.ly Android SDK, please contact our support team at `[email protected]` or open a GitHub issue.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,8 @@ implementation("com.parsely:parsely:<release_version>")
1818

1919
Full instructions and documentation can be found on
2020
the [Parse.ly help page](https://docs.parse.ly/android-sdk/).
21+
22+
## Migration to 4.0.0
23+
24+
Version 4.0.0 of the SDK introduces significant updates and breaking changes that enhance performance and add new features.
25+
These changes may require modifications to your existing code. For detailed instructions on how to adapt your code to these changes, please refer to our [Migration Guide](MIGRATION.md).

0 commit comments

Comments
 (0)