title: Sharing preferences across classes in android
body: <p>Hi
  I am developing an android app in which
  if user opens the application for first time(just installed) he gets the terms and conditions
  if he accepts that he gets the registration screen
  if he registers he get the login screen</p>
  
  <p>however if the user exits after terms screen,again if the app is started he should get only the registration screen but not terms screen</p>
  
  <p>I need two global boolean variables which can be accessed by all classes in the app
  I tried sharedpreferences but I am not able to share them across classes
  Anybody please throw some light.</p>
  
  <p>Thanks.</p>