Package com.example.lottery.util
Class SessionUtil
java.lang.Object
com.example.lottery.util.SessionUtil
Utility for resolving the current user ID from Intent extras
with a SharedPreferences fallback.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringresolveUserId(android.app.Activity activity) Resolves the user ID by checking the Intent extra first, then falling back to SharedPreferences.
-
Method Details
-
resolveUserId
Resolves the user ID by checking the Intent extra first, then falling back to SharedPreferences.- Returns:
- the user ID, or
nullif unavailable from both sources.
-