• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Builder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.google.android.gms.common.api.GoogleApiClient.Builder的典型用法代码示例。如果您正苦于以下问题:Java Builder类的具体用法?Java Builder怎么用?Java Builder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Builder类属于com.google.android.gms.common.api.GoogleApiClient包,在下文中一共展示了Builder类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createConnectedGoogleApiClient

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
private GoogleApiClient createConnectedGoogleApiClient()
{
  try
  {
    GoogleApiClient localGoogleApiClient = new GoogleApiClient.Builder(this).addApi(ClearcutLogger.API).build();
    ConnectionResult localConnectionResult = localGoogleApiClient.blockingConnect(10000L, TimeUnit.MILLISECONDS);
    if (!localConnectionResult.isSuccess())
    {
      FinskyLog.w("Could not connect to Clearcut: %s", new Object[] { localConnectionResult });
      localGoogleApiClient = null;
    }
    return localGoogleApiClient;
  }
  catch (RuntimeException localRuntimeException)
  {
    FinskyLog.e("Could not connect to Clearcut: %s", new Object[] { localRuntimeException });
  }
  return null;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:20,代码来源:PackageVerificationLoggingService.java


示例2: if

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
public static void logNetworkStats$5480c1b1(Context paramContext, Long paramLong, Bundle paramBundle)
{
  if (!zzbkB) {
    return;
  }
  GoogleApiClient localGoogleApiClient = new GoogleApiClient.Builder(paramContext).addOnConnectionFailedListener(zzbkC).addApi(zzrr.API).build();
  localGoogleApiClient.connect();
  try
  {
    zzrr.zzbby.zza(localGoogleApiClient, null, paramLong, null, null, paramBundle).setResultCallback(new ResultCallback() {});
    return;
  }
  catch (RuntimeException localRuntimeException)
  {
    Log.w("Herrevad", "Exception in logNetworkStats.  This call should always fail silently, so we will swallow this: " + localRuntimeException);
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:18,代码来源:NetworkQualityUploader.java


示例3: getId

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
public static String getId(Context paramContext)
{
  GoogleApiClient localGoogleApiClient = new GoogleApiClient.Builder(paramContext).addApi(SafetyNet.API).build();
  String str;
  if (!localGoogleApiClient.blockingConnect(15000L, TimeUnit.MILLISECONDS).isSuccess()) {
    str = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
  }
  for (;;)
  {
    return str;
    try
    {
      SafetyNetFirstPartyApi.IdResult localIdResult = (SafetyNetFirstPartyApi.IdResult)SafetyNet.SafetyNetFirstPartyApi.getId(localGoogleApiClient).await(15000L, TimeUnit.MILLISECONDS);
      localGoogleApiClient.disconnect();
      str = localIdResult.getId();
      if (str != null) {
        continue;
      }
      return "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa";
    }
    finally
    {
      localGoogleApiClient.disconnect();
    }
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:27,代码来源:SafetyNetFirstPartyClient.java


示例4: onActivityResult

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (requestCode == RC_SAVE) {
        if (resultCode != Activity.RESULT_OK) {
            Log.e(TAG, "SAVE: Canceled by user");
        }
        finish();
    } else if (requestCode == RC_UPDATE_SERVICE) {
        if (resultCode == Activity.RESULT_OK) {
            Credential credential = new Credential.Builder(mEmail).setPassword(mPassword)
                    .build();

            getAuthHelper().getCredentialsApi()
                    .save(mGoogleApiClient, credential)
                    .setResultCallback(this);
        } else {
            Log.e(TAG, "SAVE: Canceled by user");
            finish();
        }
    }
}
 
开发者ID:firebase,项目名称:FirebaseUI-Android,代码行数:24,代码来源:SaveSmartLock.java


示例5: saveCredentialsOrFinish

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
/**
 * If SmartLock is enabled and Google Play Services is available, save the credentials.
 * Otherwise, finish the calling Activity with {@link Activity#RESULT_OK}.
 * <p>
 * Note: saveCredentialsOrFinish cannot be called immediately after getInstance because onCreate
 * has not yet been called.
 *
 * @param firebaseUser Firebase user to save in Credential.
 * @param password     (optional) password for email credential.
 * @param response     (optional) an {@link IdpResponse} representing the result of signing in.
 */
public void saveCredentialsOrFinish(FirebaseUser firebaseUser,
                                    @Nullable String password,
                                    @Nullable IdpResponse response) {
    mResponse = response;

    if (!getFlowParams().enableCredentials) {
        finish();
        return;
    }

    mName = firebaseUser.getDisplayName();
    mEmail = firebaseUser.getEmail();
    mPassword = password;
    mProfilePictureUri = firebaseUser.getPhotoUrl() != null ? firebaseUser.getPhotoUrl()
            .toString() : null;

    mGoogleApiClient = new Builder(mAppContext)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .addApi(Auth.CREDENTIALS_API)
            .enableAutoManage(getActivity(), GoogleApiHelper.getSafeAutoManageId(), this)
            .build();
    mGoogleApiClient.connect();
}
 
开发者ID:firebase,项目名称:FirebaseUI-Android,代码行数:36,代码来源:SaveSmartLock.java


示例6: onCreate

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
public void onCreate(Bundle paramBundle)
{
  super.onCreate(paramBundle);
  setContentView(2130903060);
  ς.ˊ(this);
  if (paramBundle != null)
    this.mShouldConnectPlusClient = paramBundle.getBoolean("plus_client_connection_state");
  this.uiHelper = new UiLifecycleHelper(this, this.callback);
  this.uiHelper.onCreate(paramBundle);
  Plus.PlusOptions localPlusOptions = new Plus.PlusOptions.Builder().addActivityTypes(new String[] { "http://schemas.google.com/AddActivity", "http://schemas.google.com/BuyActivity" }).build();
  this.mGoogleApiClient = new GoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(Plus.API, localPlusOptions).addScope(Plus.SCOPE_PLUS_LOGIN).build();
  this.animationHelper = new LoginActivityAnimationHelper();
  this.animationHelper.onCreate(this, paramBundle);
  if (paramBundle == null)
    hideLoadingLayer();
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:17,代码来源:LoginActivity.java


示例7: if

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
private GoogleApiClient.Builder ˏ()
{
  if (this.ι)
    throw new IllegalStateException("GameHelper: you called GameHelper.createApiClientBuilder() after calling setup. You can only get a client builder BEFORE performing setup.");
  GoogleApiClient.Builder localBuilder = new GoogleApiClient.Builder(this.ˋ, this, this);
  if ((0x1 & this.ˏ) != 0)
  {
    localBuilder.addApi(Games.API, null);
    localBuilder.addScope(Games.SCOPE_GAMES);
  }
  if ((0x2 & this.ˏ) != 0)
  {
    localBuilder.addApi(Plus.API, null);
    localBuilder.addScope(Plus.SCOPE_PLUS_LOGIN);
  }
  if ((0x4 & this.ˏ) != 0)
  {
    localBuilder.addApi(AppStateManager.API, null);
    localBuilder.addScope(AppStateManager.SCOPE_APP_STATE);
  }
  this.ˉ = localBuilder;
  return localBuilder;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:24,代码来源:Ô¨ª.java


示例8: getGoogleApiClient

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
@NonNull
public GoogleApiClient getGoogleApiClient() {

    return new Builder(context)
            .addApi(ActivityRecognition.API)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .build();
}
 
开发者ID:Telecooperation,项目名称:assistance-platform-client-sdk-android,代码行数:10,代码来源:MotionActivitySensor.java


示例9: getGoogleApiClient

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
@NonNull
private GoogleApiClient getGoogleApiClient() {

    if (mGoogleApiClient != null) {
        return mGoogleApiClient;
    }

    return new Builder(context)
            .addApi(LocationServices.API)
            .addConnectionCallbacks(this)
            .addOnConnectionFailedListener(this)
            .build();
}
 
开发者ID:Telecooperation,项目名称:assistance-platform-client-sdk-android,代码行数:14,代码来源:LocationSensor.java


示例10: showErrorDialogForCode

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
private boolean showErrorDialogForCode(String paramString1, String paramString2, int paramInt, String paramString3)
{
  PackageStateRepository.PackageState localPackageState = FinskyApp.get().mPackageStateRepository.get(paramString3);
  switch (paramInt)
  {
  }
  for (;;)
  {
    showErrorDialog(paramString1, paramString2, false);
    return true;
    if (FinskyApp.get().getExperiments().isEnabled(12603367L))
    {
      startActivity(UninstallManagerActivity.createIntent(this.mNavigationManager.getCurrentDocument()));
      return true;
      if ((localPackageState != null) && (localPackageState.isSystemApp)) {}
      for (int i = 1; i == 0; i = 0)
      {
        SimpleAlertDialog.Builder localBuilder = new SimpleAlertDialog.Builder();
        localBuilder.setMessageId(2131362246).setPositiveId(2131362418).setNegativeId(2131362807);
        Bundle localBundle = new Bundle();
        localBundle.putString("error_package_name", paramString3);
        localBuilder.setCallback(null, 32, localBundle);
        localBuilder.build().show(getSupportFragmentManager(), "mismatched_certificates");
        return true;
      }
    }
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:29,代码来源:MainActivity.java


示例11: checkLocationSettings

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
@Override
public Maybe<LocationSettingsResult> checkLocationSettings(int priority) {
    return Maybe.create(emitter -> {
        GoogleApiClient client = mBuilder.build();
        GoogleApiClients.connect(client, hint -> SettingsApi.checkLocationSettings(client,
                new LocationSettingsRequest.Builder()
                        .addLocationRequest(LocationRequest.create().setPriority(priority))
                        .setAlwaysShow(true).build()).setResultCallback(result -> {
            client.disconnect();
            emitter.onSuccess(result);
        }), result -> emitter.onComplete());
    });
}
 
开发者ID:pushbit,项目名称:sprockets-android,代码行数:14,代码来源:GoogleLocationProvider.java


示例12: onConnected

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
@Override
public void onConnected(Bundle bundle) {
    if (TextUtils.isEmpty(mEmail)) {
        Log.e(TAG, "Unable to save null credential!");
        finish();
        return;
    }

    Credential.Builder builder = new Credential.Builder(mEmail);
    builder.setPassword(mPassword);
    if (mPassword == null && mResponse != null) {
        String translatedProvider =
                ProviderUtils.providerIdToAccountType(mResponse.getProviderType());
        if (translatedProvider != null) {
            builder.setAccountType(translatedProvider);
        } else {
            Log.e(TAG, "Unable to save null credential!");
            finish();
            return;
        }
    }

    if (mName != null) {
        builder.setName(mName);
    }

    if (mProfilePictureUri != null) {
        builder.setProfilePictureUri(Uri.parse(mProfilePictureUri));
    }

    getAuthHelper().getCredentialsApi()
            .save(mGoogleApiClient, builder.build())
            .setResultCallback(this);
}
 
开发者ID:firebase,项目名称:FirebaseUI-Android,代码行数:35,代码来源:SaveSmartLock.java


示例13: createMatchDialog

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
private static AlertDialog createMatchDialog(View paramView, Context paramContext)
{
  AlertDialog localAlertDialog = new AlertDialog.Builder(paramContext).create();
  localAlertDialog.setCanceledOnTouchOutside(true);
  localAlertDialog.setView(paramView, 0, 0, 0, 0);
  return localAlertDialog;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:8,代码来源:SettingsFragment.java


示例14: onCreateView

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
{
  View localView = LayoutInflater.from(getActivity()).inflate(2130903121, paramViewGroup, false);
  this.refreshLoader = ((LoaderAnimationWidget)localView.findViewById(2131296657));
  initEmptyView(localView);
  boolean bool;
  if (!TextUtils.isEmpty(QuizApplication.ˊ.ˋ.ʹ))
    bool = true;
  else
    bool = false;
  this.shouldConnectPlusClient = bool;
  Plus.PlusOptions localPlusOptions = new Plus.PlusOptions.Builder().addActivityTypes(new String[] { "http://schemas.google.com/AddActivity", "http://schemas.google.com/BuyActivity" }).build();
  this.mGoogleApiClient = new GoogleApiClient.Builder(getActivity()).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(Plus.API, localPlusOptions).addScope(Plus.SCOPE_PLUS_LOGIN).build();
  return localView;
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:16,代码来源:GooglePlusFriendsFragment.java


示例15: sendRequestDialog

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
protected void sendRequestDialog(ℴ paramℴ)
{
  this.invitedFriend = paramℴ;
  ArrayList localArrayList = new ArrayList();
  localArrayList.add(PlusShare.createPerson(paramℴ.ˊ, paramℴ.ˋ));
  startActivityForResult(new PlusShare.Builder(getActivity()).setType("text/plain").setText(ċ.ˊ(2131165775)).setContentUrl(Uri.parse("https://www.quizup.com/")).setRecipients(Plus.PeopleApi.getCurrentPerson(this.mGoogleApiClient), localArrayList).getIntent(), 9002);
  〵.ˊ("Viral", new HashMap()
  {
  });
}
 
开发者ID:mmmsplay10,项目名称:QuizUpWinner,代码行数:11,代码来源:GooglePlusFriendsFragment.java


示例16: buildGoogleApiClientForCar

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
public static GoogleApiClient buildGoogleApiClientForCar(Context paramContext, GoogleApiClient.ConnectionCallbacks paramConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener paramOnConnectionFailedListener, CarConnectionListener paramCarConnectionListener)
{
  return new GoogleApiClient.Builder(paramContext).addApi(API, new CarOptions(new Car.CarOptions.Builder(paramCarConnectionListener, (byte)0), (byte)0)).addConnectionCallbacks(paramConnectionCallbacks).addOnConnectionFailedListener(paramOnConnectionFailedListener).build();
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:5,代码来源:Car.java


示例17: CarOptions

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
private CarOptions(Builder paramBuilder)
{
  this.zzabE = paramBuilder.zzabF;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:5,代码来源:Car.java


示例18: Builder

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
private Builder(Car.CarConnectionListener paramCarConnectionListener)
{
  this.zzabF = paramCarConnectionListener;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:5,代码来源:Car.java


示例19: GoogleHelpLauncher

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
public GoogleHelpLauncher(Activity paramActivity)
{
  this(paramActivity, new GoogleApiClient.Builder(paramActivity).addApi(zzc.API).build());
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:5,代码来源:GoogleHelpLauncher.java


示例20: zzi

import com.google.android.gms.common.api.GoogleApiClient.Builder; //导入依赖的package包/类
public zzi(Context paramContext)
{
  this.mApiClient = new GoogleApiClient.Builder(paramContext).addApi(zzc.API).build();
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:5,代码来源:zzi.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PacketUserauthRequestPassword类代码示例发布时间:2022-05-22
下一篇:
Java Strings类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap