Class SessionUtil

java.lang.Object
com.example.lottery.util.SessionUtil

public final class SessionUtil extends Object
Utility for resolving the current user ID from Intent extras with a SharedPreferences fallback.
  • Method Details

    • resolveUserId

      @Nullable public static String resolveUserId(@NonNull android.app.Activity activity)
      Resolves the user ID by checking the Intent extra first, then falling back to SharedPreferences.
      Returns:
      the user ID, or null if unavailable from both sources.