0
 Followers
2
 Likes

Create the Global variable concept in Mobile Application

Backend
New

Since there is no session variables in mobile application, it is very hard to share the values across the screen become to tough and as a replacement we may use the Local Entity and variables in some places but it may arise some performance issues.

So as a better replacement i think that we may need some global variables like "Session Variables"

Thanks

Vignesh Balasubramanian

Created on 16 May
Comments (4)

Hello Vignesh,

I don't think you have big performance issues as long as you don't store huge amount of data as in a local entity. We do it like this and it works just fine. We don't experience performance issues. Nice benefit of local entity is the data is available in offline situations also.

Regards,

Daniel

Changed the category to Backend


Hi Daniel,

how to use local entity so it can reflected to screen in reactive way? If its value got change, the value displayed in screen updated immediately. Say for example like counter indicator.


Regards,

Lambok

Hi Lambok,

The original idea was on how to pass data from one screen to another.

My answer was that on exit one screen you update the local storage entity and on entering the next screen you fetch the data from local storage.

Your question is different, so if I a am on a screen, who is then changing the local entity data, that you want to reflect? there is only one screen active at a time. 

Maybe I do not fully understand the problem you describe.

Regards,

Daniel

views
278
Followers
0