當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。