How to get the currently logged-in username and password in ODK Collect using Java?

I'm trying to figure out how ODK Collect works by scanning through the source code. I'm just new to Android Development and I couldn't wrap around how Preferences work.

Anybody here knows how to get the currently logged-in username and password in ODK Collect using Java?