Java 类com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks 实例源码

项目:QuizUpWinner    文件:PlusClient.java   
public Builder(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
  this.mContext = paramContext;
  this.Dz = paramConnectionCallbacks;
  this.jE = paramOnConnectionFailedListener;
  this.DA = new hv(this.mContext);
}
项目:QuizUpWinner    文件:GamesClient.java   
public Builder(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
  this.mContext = paramContext;
  this.tx = paramContext.getPackageName();
  this.jD = paramConnectionCallbacks;
  this.jE = paramOnConnectionFailedListener;
}
项目:QuizUpWinner    文件:AppStateClient.java   
public Builder(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
  this.mContext = paramContext;
  this.jD = paramConnectionCallbacks;
  this.jE = paramOnConnectionFailedListener;
  this.jF = jC;
  this.jG = "<<default account>>";
}
项目:sharemyposition    文件:ShareByTracking.java   
@Override
public void onReceive(final Context context, final Intent intent)
{
    final NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
    final LocationClient locationClient = new LocationClient(context, connectionCallbacks, onConnectionFailedListener);
    locationClient.registerConnectionCallbacks(new ConnectionCallbacks() {

        @Override
        public void onDisconnected()
        {
            Log.d(LOG, "StopTracking.onDisconnected");
        }

        @Override
        public void onConnected(Bundle arg0)
        {
            final PendingIntent service = PendingIntent.getService(context, 0,
                    new Intent(context, ShareByTracking.class), PendingIntent.FLAG_UPDATE_CURRENT);
            locationClient.removeLocationUpdates(service);
            locationClient.disconnect();
            notificationManager.cancel(R.string.app_name);
            Log.d(LOG, "StopTracking.onConnected");
        }
    });

    locationClient.connect();
}
项目:sharemyposition    文件:ShareByTracking.java   
@Override
public void onReceive(final Context context, final Intent intent)
{
    if (intent.getExtras().containsKey(UUID)) {
        final String uuid = intent.getStringExtra(UUID);
        final LocationClient locationClient = new LocationClient(context, connectionCallbacks, onConnectionFailedListener);
        locationClient.registerConnectionCallbacks(new ConnectionCallbacks() {

            @Override
            public void onDisconnected()
            {
                Log.d(LOG, "StartTracking.onDisconnected");
            }

            @Override
            public void onConnected(Bundle arg0)
            {
                final LocationRequest locationRequest = LocationRequest.create()
                        .setSmallestDisplacement(SMALLEST_DISPLACEMENT)
                        .setInterval(INTERVAL)
                        .setPriority(PRIORITY);
                final PendingIntent service = PendingIntent.getService(context, 0, new Intent(context,
                        ShareByTracking.class).putExtra(UUID, uuid), PendingIntent.FLAG_UPDATE_CURRENT);
                locationClient.requestLocationUpdates(locationRequest, service);
                locationClient.disconnect();
                Log.d(LOG, "StartTracking.onConnected");
            }
        });

        locationClient.connect();
    }
}
项目:chickenalerts    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    locationClient = new LocationClient(this, new ConnectionCallbacks() {
        @Override
        public void onConnected(Bundle connectionHint) {
            if (BuildConfig.DEBUG)
                Log.i(TAG, "Location onConnected");
            MainActivity.this.locationClientConnected = true;
        }

        @Override
        public void onDisconnected() {
            if (BuildConfig.DEBUG)
                Log.i(TAG, "Location onDisconnected");
            MainActivity.this.locationClientConnected = false;
        }
    }, new OnConnectionFailedListener() {
        @Override
        public void onConnectionFailed(ConnectionResult result) {
            if (BuildConfig.DEBUG)
                Log.i(TAG, "Location onConnectionFailed");
            MainActivity.this.locationClientConnected = false;
        }
    });
}
项目:QuizUpWinner    文件:PlusClient.java   
@Deprecated
public boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  return this.Du.isConnectionCallbacksRegistered(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:PlusClient.java   
@Deprecated
public void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.Du.registerConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:PlusClient.java   
@Deprecated
public void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.Du.unregisterConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:GamesClient.java   
private GamesClient(Context paramContext, String paramString1, String paramString2, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener, String[] paramArrayOfString, int paramInt1, View paramView, boolean paramBoolean, int paramInt2)
{
  this.te = new fl(paramContext, paramString1, paramString2, paramConnectionCallbacks, paramOnConnectionFailedListener, paramArrayOfString, paramInt1, paramView, false, paramBoolean, paramInt2);
}
项目:QuizUpWinner    文件:GamesClient.java   
@Deprecated
public final boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  return this.te.isConnectionCallbacksRegistered(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:GamesClient.java   
@Deprecated
public final void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.te.registerConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:GamesClient.java   
@Deprecated
public final void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.te.unregisterConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:gn.java   
public gn(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener, String paramString)
{
  super(paramContext, paramConnectionCallbacks, paramOnConnectionFailedListener, new String[0]);
  this.xX = paramString;
  this.jG = null;
}
项目:QuizUpWinner    文件:by.java   
public by(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener, int paramInt)
{
  super(paramContext, paramConnectionCallbacks, paramOnConnectionFailedListener, new String[0]);
  this.hp = paramInt;
}
项目:QuizUpWinner    文件:ActivityRecognitionClient.java   
public ActivityRecognitionClient(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
  this.xl = new gn(paramContext, paramConnectionCallbacks, paramOnConnectionFailedListener, "activity_recognition");
}
项目:QuizUpWinner    文件:ActivityRecognitionClient.java   
public boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  return this.xl.isConnectionCallbacksRegistered(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:ActivityRecognitionClient.java   
public void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.xl.registerConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:ActivityRecognitionClient.java   
public void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.xl.unregisterConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:LocationClient.java   
public LocationClient(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
  this.xl = new gn(paramContext, paramConnectionCallbacks, paramOnConnectionFailedListener, "location");
}
项目:QuizUpWinner    文件:LocationClient.java   
public boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  return this.xl.isConnectionCallbacksRegistered(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:LocationClient.java   
public void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.xl.registerConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:LocationClient.java   
public void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.xl.unregisterConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:AppStateClient.java   
private AppStateClient(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener, String paramString, String[] paramArrayOfString)
{
  this.jx = new dc(paramContext, paramConnectionCallbacks, paramOnConnectionFailedListener, paramString, paramArrayOfString);
}
项目:QuizUpWinner    文件:AppStateClient.java   
@Deprecated
public final boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  return this.jx.isConnectionCallbacksRegistered(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:AppStateClient.java   
@Deprecated
public final void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.jx.registerConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:AppStateClient.java   
@Deprecated
public final void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.jx.unregisterConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:PanoramaClient.java   
public PanoramaClient(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
  this.Di = new hm(paramContext, paramConnectionCallbacks, paramOnConnectionFailedListener);
}
项目:QuizUpWinner    文件:PanoramaClient.java   
public boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  return this.Di.isConnectionCallbacksRegistered(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:PanoramaClient.java   
public void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.Di.registerConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:PanoramaClient.java   
public void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.Di.unregisterConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:WalletClient.java   
public WalletClient(Activity paramActivity, int paramInt1, String paramString, int paramInt2, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
  this.Hj = new iu(paramActivity, paramConnectionCallbacks, paramOnConnectionFailedListener, paramInt1, paramString, paramInt2);
}
项目:QuizUpWinner    文件:WalletClient.java   
public WalletClient(Activity paramActivity, int paramInt, String paramString, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
  this(paramActivity, paramInt, paramString, 0, paramConnectionCallbacks, paramOnConnectionFailedListener);
}
项目:QuizUpWinner    文件:WalletClient.java   
public boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  return this.Hj.isConnectionCallbacksRegistered(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:WalletClient.java   
public void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.Hj.registerConnectionCallbacks(paramConnectionCallbacks);
}
项目:QuizUpWinner    文件:WalletClient.java   
public void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.Hj.unregisterConnectionCallbacks(paramConnectionCallbacks);
}
项目:sohacks    文件:MainActivity.java   
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    // Activity Recog
    mActivityRecognitionClient = new ActivityRecognitionClient(
            getApplicationContext(),
            (com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks) this,
            this);
    Intent intent = new Intent(getApplicationContext(),
            ActivityRecognitionIntentService.class);
    mActivityRecognitionClient.connect();
    mActivityRecognitionPendingIntent = PendingIntent.getService(
            getApplicationContext(), 0, intent,
            PendingIntent.FLAG_UPDATE_CURRENT);
    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    mDrawerList = (ListView) findViewById(R.id.left_drawer);
    mDrawerList.setAdapter(new ArrayAdapter<String>(this,
            R.layout.drawer_list_item, drawerNames));
    mDrawerList.setOnItemClickListener(new DrawerItemClickListener());
    mDrawerToggle = new ActionBarDrawerToggle(this, /* host Activity */
    mDrawerLayout, /* DrawerLayout object */
    R.drawable.ic_drawer, /* nav drawer icon to replace 'Up' caret */
    R.string.drawer_open, /* "open drawer" description */
    R.string.drawer_close /* "close drawer" description */
    ) {

        /** Called when a drawer has settled in a completely closed state. */
        public void onDrawerClosed(View view) {
            super.onDrawerClosed(view);
        }

        /** Called when a drawer has settled in a completely open state. */
        public void onDrawerOpened(View drawerView) {
            super.onDrawerOpened(drawerView);
        }
    };

    // Set the drawer toggle as the DrawerListener
    mDrawerLayout.setDrawerListener(mDrawerToggle);

    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
    getSupportActionBar().setHomeButtonEnabled(true);
    if (savedInstanceState == null) {
        selectItem(0);
    }
}