Ani Pandu Ani Pandu - 1 year ago 151
Android Question

Access user information across activities Firebase Android

In one activity, I am signing in the user, and it moves on to another activity where the user is greeted. I am using the built-in Firebase methods for signing in a user using email/password. I have the UID in Firebase Database and this is linked with a name. I am just manually inputting users in Firebase and will implement a sign up activity later. How do I access the UID of the user in the second activity?

Answer Source

You should either save it in SharedPreferences and retrieve it in the second activity or pass it into the second Activity via the Intent object.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download