Conversation
| @@ -1,5 +1,9 @@ | |||
| ## Next | |||
|
|
|||
| - feat: add manual session recording control APIs ([#256](https://github.com/PostHog/posthog-flutter/pull/256)) | |||
There was a problem hiding this comment.
do those API work even if config.sessionReplay is disabled or both ways?
There was a problem hiding this comment.
That's what we did for the other sdks I believe. So if local config is false, people can start a recording later on manually.
If remote config/flags is false, then no-op
Trying to validate these with some local testing
|
|
||
| @override | ||
| Future<void> startSessionRecording({bool resumeCurrent = true}) async { | ||
| if (!isSupportedPlatform()) { |
There was a problem hiding this comment.
| if (!isSupportedPlatform()) { | |
| if (!isSupportedPlatform() || macOS) { |
all those methods should bail if its a macOS app since replay isnt supported, theres no need to call method channels if we know its not gonna work
the code above is just pseudocode
marandaneto
left a comment
There was a problem hiding this comment.
left 2 comments otherwise LGTM
|
Hi PostHog team, Thanks for adding this feature for Flutter. I've tried out this feature branch on an app and followed the instructions here. I have the This is my config: final posthogConfig = PostHogConfig(_config.posthogApiKey);
posthogConfig.host = _config.posthogHost;
posthogConfig.debug = kDebugMode;
posthogConfig.captureApplicationLifecycleEvents = true;
posthogConfig.sessionReplay = false;
posthogConfig.sessionReplayConfig.maskAllTexts = false;
posthogConfig.sessionReplayConfig.maskAllImages = false;
// Some time later...
Posthog().startSessionRecording(resumeCurrent: false)
// Also tried it with
Posthog().startSessionRecording(resumeCurrent: true)
Both The recording work normally when I set I also tried to manually remove the // posthog_widget.dart - PostHogWidgetState, L34
if (config == null || !config.sessionReplay) {
return;
}iOS 26.0 Simulator & a real Device, Flutter 3.35.7 |
|
Hey @ForTheYin thanx for testing this out! 🙏 I also noticed the same thing happen to me yesterday during a final test before releasing and held off the merge. This used to work fine before so it must be either some late changes made here or in the ingestion side of things. I'll try to sort this asap |
|
Actually let me correct myself, this used to work with the config enabled, so the happy path you describe here. I bumped into the same issue when config was disabled |
💡 Motivation and Context
Closes #124
Docs PR: PostHog/posthog.com#14487
💚 How did you test it?
Manual testing:
📝 Checklist