-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore: android plugin #1
Conversation
PosthogReactNativeSessionReplay_targetSdkVersion=34 | ||
PosthogReactNativeSessionReplay_compileSdkVersion=34 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember messing with sdk versions was always messy given how fragmented Android was as an ecosystem. I assume the target / compile versions are less important than changing something like the minSdkVersion
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are equally important, if you dont compile and target the newest versions, your app can't even ben released in the stores.
this is just a fallback though, in case its not provided by the "final app"
// OptionalReactNativeSessionReplay.isEnabled().then((isEnabled) => { | ||
// console.warn('PostHog Debug', `isEnabled: ${isEnabled}`); | ||
// setResult(isEnabled.valueOf().toString()); | ||
// }); | ||
// OptionalReactNativeSessionReplay.startSession( | ||
// 'e58ed763-928c-4155-bee9-fdbaaadc15f3' | ||
// ) | ||
// .then(() => { | ||
// setResult('ok'); | ||
// }) | ||
// .catch(() => { | ||
// setResult('failed'); | ||
// }); | ||
// OptionalReactNativeSessionReplay.start( | ||
// 'e58ed763-928c-4155-bee9-fdbaaadc15f3', | ||
// { | ||
// apiKey: 'phc_QFbR1y41s5sxnNTZoyKG2NJo2RlsCIWkUfdpawgb40D', | ||
// host: 'https://us.i.posthog.com', | ||
// }, | ||
// {}, | ||
// {} | ||
// ) | ||
// .then(() => { | ||
// OptionalReactNativeSessionReplay?.isEnabled().then((isEnabled) => { | ||
// console.warn('PostHog Debug', `isEnabled: ${isEnabled}`); | ||
// setResult(`isEnabled: ${isEnabled}`); | ||
// }); | ||
// }) | ||
// .then(() => { | ||
// setResult('ok'); | ||
// }) | ||
// .catch(() => { | ||
// setResult('failed'); | ||
// }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// OptionalReactNativeSessionReplay.isEnabled().then((isEnabled) => { | |
// console.warn('PostHog Debug', `isEnabled: ${isEnabled}`); | |
// setResult(isEnabled.valueOf().toString()); | |
// }); | |
// OptionalReactNativeSessionReplay.startSession( | |
// 'e58ed763-928c-4155-bee9-fdbaaadc15f3' | |
// ) | |
// .then(() => { | |
// setResult('ok'); | |
// }) | |
// .catch(() => { | |
// setResult('failed'); | |
// }); | |
// OptionalReactNativeSessionReplay.start( | |
// 'e58ed763-928c-4155-bee9-fdbaaadc15f3', | |
// { | |
// apiKey: 'phc_QFbR1y41s5sxnNTZoyKG2NJo2RlsCIWkUfdpawgb40D', | |
// host: 'https://us.i.posthog.com', | |
// }, | |
// {}, | |
// {} | |
// ) | |
// .then(() => { | |
// OptionalReactNativeSessionReplay?.isEnabled().then((isEnabled) => { | |
// console.warn('PostHog Debug', `isEnabled: ${isEnabled}`); | |
// setResult(`isEnabled: ${isEnabled}`); | |
// }); | |
// }) | |
// .then(() => { | |
// setResult('ok'); | |
// }) | |
// .catch(() => { | |
// setResult('failed'); | |
// }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather keep it since it's for testing the native calls (during development - its just a sample), ideally I'd have a button for each of them, will do it in the next PR with iOS if that's ok
pinned all the versions that make it work with the other plugins https://github.com/PostHog/posthog-js-lite/tree/main/posthog-react-native
ios is next but should be more straight forward