How to pass complex structure between activites without global access

Hi,

On Android, in Kotlin,

The normal way to pass data between activites is with extras. But it seems it works well only with plain data.

If I have a complex structure, like and Auth0 SecureCredentialsManager, how can I share it between activities without using a global variable?

I saw one can inherit Serializable in a wrapper class for the complex structure. But this means the object will be copied, it will not be shared. I want to have only one such object. Otherwise the auth token may be renewed again in each activities instead of being shared.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.