当前位置: 首页>>代码示例>>Java>>正文


Java GooglePlayServicesClient.ConnectionCallbacks方法代码示例

本文整理汇总了Java中com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks方法的典型用法代码示例。如果您正苦于以下问题:Java GooglePlayServicesClient.ConnectionCallbacks方法的具体用法?Java GooglePlayServicesClient.ConnectionCallbacks怎么用?Java GooglePlayServicesClient.ConnectionCallbacks使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.gms.common.GooglePlayServicesClient的用法示例。


在下文中一共展示了GooglePlayServicesClient.ConnectionCallbacks方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: Builder

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
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>>";
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:9,代码来源:AppStateClient.java

示例2: Builder

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
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);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:8,代码来源:PlusClient.java

示例3: FusedPositionManager

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
public FusedPositionManager(Context context, final GPSCConnectionHandler gPSCConnectionHandler) {

        intentService = new Intent(context, FusedLocationService.class);
        pendingIntent = PendingIntent.getService(context, 1, intentService, 0);

        int resp = GooglePlayServicesUtil.isGooglePlayServicesAvailable(context);
        if (resp == ConnectionResult.SUCCESS) {
            locationclient = new LocationClient(context, new GooglePlayServicesClient.ConnectionCallbacks() {
                @Override
                public void onConnected(Bundle bundle) {
                    gPSCConnectionHandler.onConnected(bundle);
                }

                @Override
                public void onDisconnected() {
                    gPSCConnectionHandler.onDisconnected();
                }
            }, new GooglePlayServicesClient.OnConnectionFailedListener() {
                @Override
                public void onConnectionFailed(ConnectionResult connectionResult) {
                    gPSCConnectionHandler.onConnectionFailed(connectionResult);
                }
            }
            );
            locationclient.connect();
        } else {
            Log.e("error","googleplayservices is not available");
        }
    }
 
开发者ID:GitHK,项目名称:gpsc-location,代码行数:30,代码来源:FusedPositionManager.java

示例4: getWeatherFromPlayServices

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
/**
 * Called when the user has their location set to automatic.
 * This will connect to google play services to get the last location
 * from their device.
 */
private void getWeatherFromPlayServices() {
    mPlayServicesLocationClient = new LocationClient(getContext(), new GooglePlayServicesClient.ConnectionCallbacks() {
        @Override
        public void onConnected(Bundle bundle) {
            // client has connected, so lets get the location
            final Location lastLocation = mPlayServicesLocationClient.getLastLocation();

            // disconnect the client to end networking
            mPlayServicesLocationClient.disconnect();
            mPlayServicesLocationClient = null;

            // set the weather data from that location
            new Thread(new Runnable() {
                @Override
                public void run() {
                    setWeaterDataFromGeo(lastLocation);
                }
            }).start();
        }

        @Override
        public void onDisconnected() {
            // client has disconnected
            mPlayServicesLocationClient = null;
        }

    }, new GoogleApiClient.OnConnectionFailedListener() {
        @Override
        public void onConnectionFailed(ConnectionResult connectionResult) {
            // something went wrong, may expand here later
            mPlayServicesLocationClient = null;
        }
    });

    // get the connection
    mPlayServicesLocationClient.connect();
}
 
开发者ID:klinker24,项目名称:Blur-Extension-Examples,代码行数:43,代码来源:WeatherCard.java

示例5: ForwardConnectionCallbacks

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
public ForwardConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks callbacks) {
    this.callbacks = callbacks;
}
 
开发者ID:microg,项目名称:android_external_GmsLib,代码行数:4,代码来源:ForwardConnectionCallbacks.java

示例6: registerConnectionCallbacks

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
@Deprecated
public void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.Du.registerConnectionCallbacks(paramConnectionCallbacks);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:6,代码来源:PlusClient.java

示例7: PanoramaClient

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
public PanoramaClient(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
  this.Di = new hm(paramContext, paramConnectionCallbacks, paramOnConnectionFailedListener);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:PanoramaClient.java

示例8: registerConnectionCallbacks

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
public void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.Di.registerConnectionCallbacks(paramConnectionCallbacks);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:PanoramaClient.java

示例9: isConnectionCallbacksRegistered

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
@Deprecated
public final boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  return this.te.isConnectionCallbacksRegistered(paramConnectionCallbacks);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:6,代码来源:GamesClient.java

示例10: registerConnectionCallbacks

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
@Deprecated
public final void registerConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.te.registerConnectionCallbacks(paramConnectionCallbacks);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:6,代码来源:GamesClient.java

示例11: unregisterConnectionCallbacks

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
@Deprecated
public final void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.te.unregisterConnectionCallbacks(paramConnectionCallbacks);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:6,代码来源:GamesClient.java

示例12: AppStateClient

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
private AppStateClient(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener, String paramString, String[] paramArrayOfString)
{
  this.jx = new dc(paramContext, paramConnectionCallbacks, paramOnConnectionFailedListener, paramString, paramArrayOfString);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:AppStateClient.java

示例13: dw

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
protected dw(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener, String[] paramArrayOfString)
{
  this(paramContext, new c(paramConnectionCallbacks), new g(paramOnConnectionFailedListener), paramArrayOfString);
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:dw.java

示例14: isConnectionCallbacksRegistered

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
public boolean isConnectionCallbacksRegistered(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  return this.ne.isConnectionCallbacksRegistered(new c(paramConnectionCallbacks));
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:dw.java

示例15: unregisterConnectionCallbacks

import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
public void unregisterConnectionCallbacks(GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks)
{
  this.ne.unregisterConnectionCallbacks(new c(paramConnectionCallbacks));
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:5,代码来源:dw.java


注:本文中的com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。