Context in ViewPager

I store information if user is logged in SharedPreferences. In my ViewPager adapter I want to check if userIsLoggedIn. Depending on that I will display different fragments. My question is: in order to …