Open michaelkimball opened 8 months ago
Hi @michaelkimball
Sadly not yet since https://github.com/PostHog/posthog-android/tree/main/posthog uses local storage caching which isn't available on non-Android devices.
The most important part missing is implementing in-memory caching, so events are cached in memory and sent in batches, probably a few other small changes but not much more.
The other thing is context isolation, since PostHog is a static class, it works for a single-user context but not for backend apps in which each request coming in is a different user, eg calling identify
on thread A cannot leak to thread B, etc (Thread-local storage or allow one single instance per thread).
Those are the 2 major things that should change.
I cannot promise but I'll bring it into our Q2-24 plan, we are focused on making PostHog more mobile-friendly in Q1, stay tuned.
I'd be very happy to guide you in case you are willing to contribute and submit a PR though.
I see that the V3 of the Android SDK was released back in December. How is the update of this SDK going? Are we able to use this https://github.com/PostHog/posthog-android/tree/main/posthog library without Android? (https://mvnrepository.com/artifact/com.posthog/posthog I believe). If so, can the docs https://posthog.com/docs/libraries/java be updated to reflect the new usage?