Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: user session implementation #136

Merged
merged 19 commits into from
Dec 7, 2023

Conversation

desusai7
Copy link
Contributor

@desusai7 desusai7 commented Nov 22, 2023

User session implementation

  • Added support for the user session feature (Automatic and manual sessions) on Android, iOS, and Web Platforms.
  • Added the ability to configure the automatic session differently for both Mobile and Web Platforms.

Android only Changes:

  • Implemented the logic for auto session tracking in the Flutter SDK - Android SDK Bridge layer because of the issues with the life cycle events on the Android platform.
  • Performed the below two changes to update the last event timestamp as part of the automatic session tracking implemented in the bridge layer: (If those events are triggered from the native SDK, we will not be able to update the last event timestamp on the bridge layer)
    • Moved the logic for tracking Application Installed & Application Updated events to the Flutter SDK - Android SDK Bridge layer and migrated the preferences helpful for tracking the install/update status to the Bridge preferences file from the Android SDK preferences file.
    • Moved the automatic recording of screen views from the Android SDK to the bridge layer and started using Runnables to capture the screen views and life cycle events occurring before the initialization of the Android SDK in the bridge layer. We will execute those runnables once the Android SDK is initialized.
  • Moved the logic for parsing RudderConfig, RudderOptions, and RudderTraits objects from a Map to their own parser classes.
  • Refactored RudderSdkFlutterPlugin.m to reduce the cognitive complexity, converted the huge if, else block to switch case.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

Code review

  • This pull request has a descriptive title and information useful to a reviewer. There may be a screenshot or screencast attached
  • "Ready for review" label attached to the PR and reviewers mentioned in a comment
  • Changes have been reviewed by at least one other engineer
  • Issue from task tracker has a link to this pull request

@desusai7 desusai7 self-assigned this Nov 22, 2023
@desusai7 desusai7 marked this pull request as ready for review November 22, 2023 18:45
Copy link

sonarqubecloud bot commented Dec 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@desusai7 desusai7 merged commit 3f9222a into develop Dec 7, 2023
7 checks passed
@github-actions github-actions bot deleted the feature/sdk-194-user-session-implementation branch February 2, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants