ConnectFree.java :  » UnTagged » myfreeboxmobile » org » madprod » freeboxmobile » Android Open Source

Android Open Source » UnTagged » myfreeboxmobile 
myfreeboxmobile » org » madprod » freeboxmobile » ConnectFree.java
package org.madprod.freeboxmobile;

import android.app.Activity;
import android.os.AsyncTask;

/**
*
* @author Olivier Rosello
* $Id: ConnectFree.java 156 2010-01-18 16:40:20Z olivier.rosello34 $
* 
*/

public class ConnectFree extends AsyncTask<Void, Void, Integer> implements Constants
{
  private static Activity curActivity;

  @Override
  protected Integer doInBackground(Void... params)
  {
    return FBMHttpConnection.connectFree();
  }

  @Override
  protected void onPreExecute()
  {
    FBMHttpConnection.showProgressDialog(curActivity);
  }

  @Override
  protected void onPostExecute(Integer result)
  {
    FBMHttpConnection.dismissPd();
    if (result == CONNECT_LOGIN_FAILED)
    {
      FBMHttpConnection.showError(curActivity);
    }
  }
  
  public static void setActivity(Activity a)
  {
    curActivity = a;
  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.