Tuesday 1 January 2019

How to set values globally in android

How to set values globally so that i can access from any activity or fragment.



For eg : activity_login.java > user_id need to store globally so every time any section which depends on user_id, checking and pulling data from backend will be easy instead of passing through activity (intent)



Edit :
i do need setter and getter from fragment or activtiy.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...