I'm building an android app, the followed pages of a current user are clickable, I save the clicked page id and pass it to open the corresponding page,
once opened, the user can check the followers list, the posts inside the page..etc.

Here's the root node that contains all the page childs (database Firebase structure):

pageData

```
      id1
         +page_id
         +page_name
         +page_posts
            -001
               -post_id
               -contents
               ....

userData
      -001
         -user_id
         -user_name
         ....

followData
      -001 
        -page_id
        -follow_id
        -user_id

```

What is the best way to pass the page id between (followersListActivity, PostsActivity, AboutPageActivity)?

I read this <https://github.com/flutter/flutter/issues/15307> , it's saying not to use shared preferences, I already used intents to pass the value, and retrieve it inside the `onCreate()`, but when the activity state changes (onStart() the page\_id is null), I'm using for navigation a bottom nav menu.

---

**Edit** solution found : Jeff Gilfelt Thank you
[Android global variable](https://stackoverflow.com/questions/1944656/android-global-variable)