@Override
 public void onStop() {
   super.onStop();
   if (mFetchDataTask != null) {
     mFetchDataTask.cancel(true);
   }
   mGoogleApiClient.disconnect();
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_debug_action_showdrivefiles);
    mLogArea = (TextView) findViewById(R.id.logArea);

    mProgressDialog = new ProgressDialog(this);
    mGoogleApiClient =
        new Builder(this)
            .addApi(Drive.API)
            .addScope(Drive.SCOPE_APPFOLDER)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .setAccountName(AccountUtils.getActiveAccountName(this))
            .build();
  }
Exemple #3
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.debug_act);
   overridePendingTransition(0, 0);
 }
 @Override
 public void onStart() {
   super.onStart();
   mGoogleApiClient.connect();
 }