Issue
I have an app, it uses Rxjava and Retrofit to retrieve data from backend.
after login, I will get a JSON file which includes User information (name, email, id, stripeId....). I will need to use User information when retrieving data from backend in other activities. Since there are many times I need to use the User information, saving it in Database or SharePreference may spend a lot of time.
Is there any way that I can save the data in the memory when the App is alive (not killed in the background)? Thanks first.
Solution
You can extend Application Class which is initiated on application startup. Check it here:
Extending Application to share variables globally
Answered By - Maksym V. Answer Checked By - Mildred Charles (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.