Session variables equivalent for Mobile Apps

By Francisco Pires on 18 Nov 2016

We need some kind of Global Variable for Mobile apps to store Session Data that can be shared across multiple screens. I tried using a Local entity but it appears you can use Local Aggregates in Client Functions.

Vasco Pessanha25 Nov 2016

Hi Francisco,

Thanks for the feedback!

Just to complement, can you add some examples where this feature would be useful?


Vasco Pessanha

I have an example/use case:

When user login, user is presented with a list of event (event name, venue, date, etc) to choose.

Then after that, all corresponding screens will only show for that chosen event only.

I tried to use Local Storage to save chosen event, then OnInitialize retrieve it and save it to variable varEventId.

But somehow, OnInitialize and Aggregate (with filter using variable varEventId) run in paralel/asynchronously.

Because my aggregate was using empty varEventId to query.

Then I tried Keystore Plugin, somehow using keystore plugin, variable varEventId successfully populated before running Aggregate, because my aggregate return correct rows.

But we have problem with Keystore plugin (some security requirement, like Android need secured lock screen) that sacrifice user experience.

When user find this "fault", user tends to uninstall it. (public, self registration).

So, in the end, we need a session variable in mobile apps, to replace keystore plugin.