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: Migrating from IntentService to WorkManager #133

Merged
merged 17 commits into from
Jan 16, 2025
Merged

Conversation

TheRealAgentK
Copy link
Contributor

feat: Migrating from IntentService to WorkManager

Description 📝

This change stems from #82 and serves two purposes:

  1. Migrate away from IntentService to WorkManager due to deprecation and better performance/functionality in WM
  2. Improve the Crash Reporting behaviour when the virtual machine of the app crashes due to low-level errors such as a StackOverflowError.

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Updates

👉 Migrated Crash Reporting and RUM JobIntentServices and the surrounding classes to WorkManager API
👉 Rewired flows from CrashReporting and RUM classes accordingly

Test plan 🧪

  • General functionality works
  • Build works
  • CR and RUM posts go through to back end as pre-change
  • StackOverflowError and VM crash gets logged to RG (tested and ✔️ )

Author to check 👓

  • Project and all contained modules build
  • Tested on appropriate devices/emulators and SDK versions
  • Reviewed by another developer
  • Appropriate documentation written (code comments, internal docs)

Reviewer to check ✔️

  • Change has been tested on a device/emulator
  • Code is written to standards
  • Appropriate tests have been written (code comments, internal docs)

# Conflicts:
#	provider/src/main/java/com/raygun/raygun4android/CrashReporting.java
#	provider/src/main/java/com/raygun/raygun4android/RUM.java
#	provider/src/main/java/com/raygun/raygun4android/services/CrashReportingPostService.java
#	provider/src/main/java/com/raygun/raygun4android/services/RaygunPostService.java
#	provider/src/main/java/com/raygun/raygun4android/workers/RUMWorker.java
@TheRealAgentK
Copy link
Contributor Author

Had to merge develop in to resolve conflicts.

@miquelbeltran
Copy link
Contributor

zsh didn't like having a branch with # as the first char 😂

➜  raygun4android git:(develop) git checkout #82-SOE
Your branch is up to date with 'origin/develop'.
➜  raygun4android git:(develop) git checkout \#82-SOE
branch '#82-SOE' set up to track 'origin/#82-SOE'.
Switched to a new branch '#82-SOE'

Copy link
Contributor

@miquelbeltran miquelbeltran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested a bit on an emulator and seems fine.

Given the changes in the Manifest, we should mark this change as breaking and next release should be a major version bump.

I left some comments, but nothing is a blocker.

@TheRealAgentK
Copy link
Contributor Author

zsh didn't like having a branch with # as the first char 😂

➜  raygun4android git:(develop) git checkout #82-SOE
Your branch is up to date with 'origin/develop'.
➜  raygun4android git:(develop) git checkout \#82-SOE
branch '#82-SOE' set up to track 'origin/#82-SOE'.
Switched to a new branch '#82-SOE'

Oh, interesting. I usually name them feature/#<id>-something - missed that in this one for some reason.

@TheRealAgentK TheRealAgentK merged commit 29cd814 into develop Jan 16, 2025
7 checks passed
@TheRealAgentK TheRealAgentK deleted the #82-SOE branch January 16, 2025 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants