Conversation
| import android.app.Application; | ||
| import android.os.Bundle; | ||
| import android.view.Window; | ||
| import androidx.lifecycle.Lifecycle; |
There was a problem hiding this comment.
Actual access to these optional deps is guarded by an if-check, I guess that should be good enough. Will do a manual test as well, just to be sure.
There was a problem hiding this comment.
Just did a test, works as expected 🚀
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6d25951 | 476.36 ms | 536.73 ms | 60.37 ms |
| c9e36ee | 471.17 ms | 523.91 ms | 52.74 ms |
| cefe7fd | 445.92 ms | 520.37 ms | 74.45 ms |
| 7d05d6e | 409.78 ms | 472.38 ms | 62.59 ms |
| 7c4015f | 402.46 ms | 454.08 ms | 51.62 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 6d25951 | 1.58 MiB | 2.08 MiB | 505.87 KiB |
| c9e36ee | 1.58 MiB | 2.08 MiB | 507.58 KiB |
| cefe7fd | 1.58 MiB | 2.08 MiB | 505.82 KiB |
| 7d05d6e | 1.58 MiB | 2.08 MiB | 507.83 KiB |
| 7c4015f | 1.58 MiB | 2.08 MiB | 507.85 KiB |
|
looks good, but now we always set the first Activity via
|
|
|
||
| // the first activity determines the app start type | ||
| if (activeActivitiesCounter.incrementAndGet() == 1 && !firstDrawDone.get()) { | ||
|
|
There was a problem hiding this comment.
oh, I just realized - we only set the currentActivity for the first activity here right? So it won't be the "last known activity" but rather the first one, which is incorrect, right? E.g. if you launched 3 activities, and then initialized the SDK it would use the wrong one to hook user interactions. Unless I got the above if-check wrong 😅
There was a problem hiding this comment.
yes, that's correct, it's a better rephrase of my comment 😅
|
@markushi Is it feasible to port to sentry-java@v7, this would help React Native with missing activity issue. (Sadly RN is still on v7.) |
That's a good point, the This RN PR fixes the |
|
@krystofwoldrich yes, we can backport it to v7! |
romtsn
left a comment
There was a problem hiding this comment.
Made another pass - LGTM, great stuff!
📜 Description
Fixes #3746
Fixes #4356
💡 Motivation and Context
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps