// Called when the Activity starts, or when the App is coming to the foreground. Check to see
  // the state of the LayerClient, and if everything is set up, display all the Conversations
  public void onResume() {

    Log.d("Activity", "Conversation Activity onResume");

    super.onResume();

    // If the user is not authenticated, make sure they are logged in, and if they are,
    // re-authenticate
    if (!LayerImpl.isAuthenticated()) {

      if (ParseUser.getCurrentUser() == null) {

        Log.d("Activity", "User is not authenticated or logged in - returning to login screen");
        Utils.gotoLoginActivity(this);

      } else {

        Log.d("Activity", "User is not authenticated, but is logged in - re-authenticating user");
        LayerImpl.authenticateUser();
      }

      // Everything is set up, so start populating the Conversation list
    } else {

      Log.d("Activity", "Starting conversation view");
      setupConversationView();
    }

    ParseInstallation installation = ParseInstallation.getCurrentInstallation();
    installation.put("inMessageActivity", false);
    installation.put("user", ParseUser.getCurrentUser());
    installation.saveInBackground();
  }