本文整理汇总了Java中com.google.android.gms.common.GooglePlayServicesClient.OnConnectionFailedListener方法的典型用法代码示例。如果您正苦于以下问题:Java GooglePlayServicesClient.OnConnectionFailedListener方法的具体用法?Java GooglePlayServicesClient.OnConnectionFailedListener怎么用?Java GooglePlayServicesClient.OnConnectionFailedListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.gms.common.GooglePlayServicesClient
的用法示例。
在下文中一共展示了GooglePlayServicesClient.OnConnectionFailedListener方法的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.Dz = paramConnectionCallbacks;
this.jE = paramOnConnectionFailedListener;
this.DA = new hv(this.mContext);
}
示例2: Builder
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
public Builder(Context paramContext, GooglePlayServicesClient.ConnectionCallbacks paramConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
this.mContext = paramContext;
this.tx = paramContext.getPackageName();
this.jD = paramConnectionCallbacks;
this.jE = paramOnConnectionFailedListener;
}
示例3: 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>>";
}
示例4: 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");
}
}
示例5: LocationTracking
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
/**
* Subscribes for location updates
*
* The updates will be received with the interval INTERVAL_UPDATE (ms)
* @param context current context
* @param locationListener Callback
*/
public LocationTracking(final Context context, final LocationListener locationListener) {
locationclient = new LocationClient(context, new GooglePlayServicesClient.ConnectionCallbacks() {
@Override
public void onConnected(Bundle bundle) {
Toast.makeText(context, "Connected to GPS!!", Toast.LENGTH_LONG)
.show();
locationclient.requestLocationUpdates(
LocationRequest.create().setInterval(INTERVAL_UPDATE)
.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY),
locationListener);
}
@Override
public void onDisconnected() {
Toast.makeText(context, "Disconnected from GPS!!", Toast.LENGTH_LONG)
.show();
}
}, new GooglePlayServicesClient.OnConnectionFailedListener() {
@Override
public void onConnectionFailed(ConnectionResult connectionResult) {
Toast.makeText(context, "Failed to connect to GPS!!", Toast.LENGTH_LONG)
.show();
}
}
);
locationclient.connect();
LocationManager locationManager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
if (!locationManager.isProviderEnabled(android.location.LocationManager.GPS_PROVIDER)) {
Toast.makeText(context,
"Please enable gps to get a more accurate location tracking", Toast.LENGTH_LONG)
.show();
Intent myIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(myIntent);
}
}
示例6: ForwardConnectionFailedListener
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
public ForwardConnectionFailedListener(
GooglePlayServicesClient.OnConnectionFailedListener listener) {
this.listener = listener;
}
示例7: isConnectionFailedListenerRegistered
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
@Deprecated
public boolean isConnectionFailedListenerRegistered(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
return this.Du.isConnectionFailedListenerRegistered(paramOnConnectionFailedListener);
}
示例8: registerConnectionFailedListener
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
@Deprecated
public void registerConnectionFailedListener(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
this.Du.registerConnectionFailedListener(paramOnConnectionFailedListener);
}
示例9: unregisterConnectionFailedListener
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
@Deprecated
public void unregisterConnectionFailedListener(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
this.Du.unregisterConnectionFailedListener(paramOnConnectionFailedListener);
}
示例10: isConnectionFailedListenerRegistered
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
public boolean isConnectionFailedListenerRegistered(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
return this.Di.isConnectionFailedListenerRegistered(paramOnConnectionFailedListener);
}
示例11: isConnectionFailedListenerRegistered
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
@Deprecated
public final boolean isConnectionFailedListenerRegistered(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
return this.te.isConnectionFailedListenerRegistered(paramOnConnectionFailedListener);
}
示例12: registerConnectionFailedListener
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
@Deprecated
public final void registerConnectionFailedListener(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
this.te.registerConnectionFailedListener(paramOnConnectionFailedListener);
}
示例13: unregisterConnectionFailedListener
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
@Deprecated
public final void unregisterConnectionFailedListener(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
this.te.unregisterConnectionFailedListener(paramOnConnectionFailedListener);
}
示例14: 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);
}
示例15: isConnectionFailedListenerRegistered
import com.google.android.gms.common.GooglePlayServicesClient; //导入方法依赖的package包/类
public boolean isConnectionFailedListenerRegistered(GooglePlayServicesClient.OnConnectionFailedListener paramOnConnectionFailedListener)
{
return this.ne.isConnectionFailedListenerRegistered(paramOnConnectionFailedListener);
}