title: How to check for valid dropbox user session?
body: <p>I am working with the Android Dropbox API. In the main activity of my app, I am doing the auth calls to the dropbox api. The problem is, every time my app launches, the user has to hit "allow" to grant permission for the app to access their dropbox. My code is below:</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
  
      getWindow().requestFeature(Window.FEATURE_NO_TITLE);
      setContentView(R.layout.main);
  
  
  
      //clearKeys();
      //Log.e(TAG, "keys cleared");
  
      AppKeyPair appKeys = new AppKeyPair(APP_KEY, APP_SECRET);
      AndroidAuthSession session = new AndroidAuthSession(appKeys, ACCESS_TYPE);
  
  
  
  
      mDBApi = new DropboxAPI&lt;AndroidAuthSession&gt;(session);
  
      mDBApi.getSession().startAuthentication(Main.this);
      Log.e(TAG, "started authentication");
  
  
  
  
  
  protected void onResume() {
      super.onResume();
  
  
  
      if (mDBApi.getSession().authenticationSuccessful()) {
          try {
              // MANDATORY call to complete auth.
              // Sets the access token on the session
              mDBApi.getSession().finishAuthentication();
  
              if(mDBApi.getSession().authenticationSuccessful()){
              Log.e(TAG, "Authentication finished");
              }
              AccessTokenPair tokens = mDBApi.getSession().getAccessTokenPair();
  
              // Provide your own storeKeys to persist the access token pair
              // A typical way to store tokens is using SharedPreferences
              storeKeys(tokens.key, tokens.secret);
          } catch (IllegalStateException e) {
              Log.i("DbAuthLog", "Error authenticating", e);
          }
      }
  
  
  }//end of onResume()
  </code></pre>
  
  <p>I need to find a way to know that the app is auth'd so I can bypass auth if that is the case. I am not sure how to go about that at this point. Can anyone assist?</p>