-
Notifications
You must be signed in to change notification settings - Fork 90
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
How do we get access to sessionId? #352
Comments
Hi @swlabrtyr, thanks for reporting this! Sorry for this issue, I believe this is due to our earlier fix around sessions. We would dive in more and take care of this. The EventOptions object is actually part of the event and you can use this to set other params easily. The event object would include the current sessionId can be retrieved via a custom plugin. This could be a temporary workaround. |
Hi @qingzhuozhen thanks for your reply! How would I use this custom plugin? When accessing EventOptios directly all items are null. I assume I need to pass this object to Amplitude or some other class, please advise 🙏🏻 |
Hi @swlabrtyr The custom plugin way is not super ideal and we just release a fix to enable the way described in the dev doc. Feel free to upgrade and let us know if that's still an issue for you. |
Hi @qingzhuozhen thank you, 1.6.2 gives me access. I appreciate your assistance 🙏🏻 . I have one question, in the previous sdk there was a method setOffline that when set to true would not send events to Amplitude's servers. I no longer see a similar method in the documentation for the Kotlin SDK. Is there a flag/method we can call to disable sending of events to Amplitude? We use this for testing purposes. Thank you again! |
Hi @swlabrtyr, thanks for the update! Yeah, unfortunately, the offline option is not covered yet, I will discuss with the team about the support for it. For testing purposes, would |
In the new Amplitude SDK doc, it says sessionId is a property of the Amplitude() object, and can be accessed accordingly -> amplitude.sessionId https://www.docs.developers.amplitude.com/data/sdks/android-kotlin/#user-sessions
However, I have found that this is not true. sessionId appears to live inside the EventOptions() object. How can developers access sessionId (and other user params ie device, location etc.) from the EventOptions? Or is it possible to access sessionId some other way?
I am using SDK version analytics-android:1.6.0
The text was updated successfully, but these errors were encountered: