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


Java Api类代码示例

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


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

示例1: zznf

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public zznf(Context paramContext, zznd paramzznd, Lock paramLock, Looper paramLooper, GoogleApiAvailability paramGoogleApiAvailability, Map<Api.zzc<?>, Api.zzb> paramMap, zzf paramzzf, Map<Api<?>, Integer> paramMap1, Api.zza<? extends zzwz, zzxa> paramzza, ArrayList<zzmw> paramArrayList, zznj.zza paramzza1)
{
  this.mContext = paramContext;
  this.zzXP = paramLock;
  this.zzaon = paramGoogleApiAvailability;
  this.zzapQ = paramMap;
  this.zzapu = paramzzf;
  this.zzapv = paramMap1;
  this.zzaoo = paramzza;
  this.zzaoR = paramzznd;
  this.zzaqn = paramzza1;
  Iterator localIterator = paramArrayList.iterator();
  while (localIterator.hasNext()) {
    ((zzmw)localIterator.next()).zzaoQ = this;
  }
  this.zzaqi = new zzb(paramLooper);
  this.zzaqh = paramLock.newCondition();
  this.zzaqk = new zznc(this);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:20,代码来源:zznf.java

示例2: zzoX

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
final void zzoX()
{
  ArrayList localArrayList = new ArrayList();
  this.zzapi = 3;
  this.zzapk = this.zzape.zzapQ.size();
  Iterator localIterator = this.zzape.zzapQ.keySet().iterator();
  while (localIterator.hasNext())
  {
    Api.zzc localzzc = (Api.zzc)localIterator.next();
    if (this.zzape.zzaqj.containsKey(localzzc))
    {
      if (zzoT()) {
        zzoY();
      }
    }
    else {
      localArrayList.add(this.zzape.zzapQ.get(localzzc));
    }
  }
  if (!localArrayList.isEmpty()) {
    this.zzapw.add(zzng.zzpp().submit(new zzf(localArrayList)));
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:24,代码来源:zznb.java

示例3: zzpb

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
final Set<Scope> zzpb()
{
  if (this.zzapu == null) {
    return Collections.emptySet();
  }
  HashSet localHashSet = new HashSet(this.zzapu.zzaod);
  Map localMap = this.zzapu.zzatx;
  Iterator localIterator = localMap.keySet().iterator();
  while (localIterator.hasNext())
  {
    Api localApi = (Api)localIterator.next();
    if (!this.zzape.zzaqj.containsKey(localApi.zzor())) {
      localHashSet.addAll(((zzf.zza)localMap.get(localApi)).zzXp);
    }
  }
  return localHashSet;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:18,代码来源:zznb.java

示例4: onConnectionFailed

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public final void onConnectionFailed(ConnectionResult paramConnectionResult)
{
  zzoJ();
  zznf localzznf = this.zzaoQ;
  Api localApi = this.zzaoO;
  int i = this.zzaoP;
  localzznf.zzXP.lock();
  try
  {
    localzznf.zzaqk.zza(paramConnectionResult, localApi, i);
    return;
  }
  finally
  {
    localzznf.zzXP.unlock();
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:18,代码来源:zzmw.java

示例5: zzb

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public final <A extends Api.zzb, T extends zzmu.zza<? extends Result, A>> T zzb(T paramT)
{
  try
  {
    this.zzape.zzaoR.zzb(paramT);
    Api.zzb localzzb = this.zzape.zzaoR.zza(paramT.zzor());
    if ((!localzzb.isConnected()) && (this.zzape.zzaqj.containsKey(paramT.zzor())))
    {
      paramT.zzE(new Status(17));
      return paramT;
    }
    paramT.zzb(localzzb);
    return paramT;
  }
  catch (DeadObjectException localDeadObjectException)
  {
    this.zzape.zza(new zznf.zza(this)
    {
      public final void zzoS()
      {
        zzna.this.onConnectionSuspended(1);
      }
    });
  }
  return paramT;
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:27,代码来源:zzna.java

示例6: if

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public static int zza$251b1977(Iterable<Api.zzb> paramIterable)
{
  Iterator localIterator = paramIterable.iterator();
  int i = 0;
  if (localIterator.hasNext()) {
    if (!((Api.zzb)localIterator.next()).zzkc()) {
      break label50;
    }
  }
  label50:
  for (int j = 1;; j = i)
  {
    i = j;
    break;
    if (i != 0) {
      return 1;
    }
    return 3;
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:21,代码来源:zznd.java

示例7: zzf

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public zzf(Account paramAccount, Set<Scope> paramSet, Map<Api<?>, zza> paramMap, int paramInt, View paramView, String paramString1, String paramString2, zzxa paramzzxa)
{
  this.zzRE = paramAccount;
  if (paramSet == null) {}
  HashSet localHashSet;
  for (Set localSet = Collections.EMPTY_SET;; localSet = Collections.unmodifiableSet(paramSet))
  {
    this.zzaod = localSet;
    if (paramMap == null) {
      paramMap = Collections.EMPTY_MAP;
    }
    this.zzatx = paramMap;
    this.zzaog = paramView;
    this.zzaof = paramInt;
    this.zzUb = paramString1;
    this.zzaoh = paramString2;
    this.zzaor = paramzzxa;
    localHashSet = new HashSet(this.zzaod);
    Iterator localIterator = this.zzatx.values().iterator();
    while (localIterator.hasNext()) {
      localHashSet.addAll(((zza)localIterator.next()).zzXp);
    }
  }
  this.zzatw = Collections.unmodifiableSet(localHashSet);
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:26,代码来源:zzf.java

示例8: getPlayServices

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
@SafeVarargs
public static Observable<GoogleApiClient> getPlayServices(final Activity activity, final RxState state, final String[] permissions, final RxPermissionRationale rationale, final Scope[] scopes, final Api<? extends Api.ApiOptions.NotRequiredOptions>... services) {
    return Observable.create(new GetPermissionStatusObservable(activity, permissions))
            .flatMap(new Function<PermissionResult, Observable<Boolean>>() {
                @Override
                public Observable<Boolean> apply(PermissionResult permissionResult) {
                    return Observable.create(new GetPermissionObservable(activity, state, rationale, permissionResult));
                }
            })
            .flatMap(new Function<Boolean, Observable<GoogleApiClient>>() {
                @Override
                public Observable<GoogleApiClient> apply(Boolean granted) {
                    if (granted) {
                        return Observable.create(new PlayServicesObservable(activity, state, scopes, services));
                    }
                    return Observable.error(new UserAbortedException());
                }
            }).compose(new BaseStateObservable.EndStateTransformer<GoogleApiClient>(state));
}
 
开发者ID:finn-no,项目名称:rxactivityresponse,代码行数:20,代码来源:RxPlayServices.java

示例9: getOptionsFor

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
@Override
public Api.ApiOptions.HasOptions getOptionsFor(Api<? extends Api.ApiOptions> api) {
    if (Auth.GOOGLE_SIGN_IN_API.equals(api)) {
        GoogleSignInOptions.Builder googleSignInOptions =  new GoogleSignInOptions.Builder(
                GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestEmail();

        // Check server client id for OAuth, so GoogleSignInAccount.getIdToken(); is non-null
        String serverClientId = getFragment().getServerClientId();
        if(serverClientId != null){
            googleSignInOptions.requestIdToken(serverClientId);
        }
        return googleSignInOptions.build();
    } else {
        return super.getOptionsFor(api);
    }
}
 
开发者ID:googlearchive,项目名称:easygoogle,代码行数:18,代码来源:SignIn.java

示例10: GoogleApiClientImpl

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public GoogleApiClientImpl(Context context, Looper looper, AccountInfo accountInfo,
                           Map<Api, Api.ApiOptions> apis,
                           Set<ConnectionCallbacks> connectionCallbacks,
                           Set<OnConnectionFailedListener> connectionFailedListeners, int clientId) {
    this.context = context;
    this.looper = looper;
    this.handler = new Handler(looper);
    this.accountInfo = accountInfo;
    this.apis.putAll(apis);
    this.connectionCallbacks.addAll(connectionCallbacks);
    this.connectionFailedListeners.addAll(connectionFailedListeners);
    this.clientId = clientId;

    for (Api api : apis.keySet()) {
        apiConnections.put(api, api.getBuilder().build(context, looper,
                apis.get(api), accountInfo, baseConnectionCallbacks,
                baseConnectionFailedListener));
    }
}
 
开发者ID:microg,项目名称:android_external_GmsLib,代码行数:20,代码来源:GoogleApiClientImpl.java

示例11: RxLocationBaseOnSubscribe

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
protected RxLocationBaseOnSubscribe(@NonNull RxLocation rxLocation, Long timeout, TimeUnit timeUnit) {
    this.ctx = rxLocation.ctx;
    this.services = new Api[]{LocationServices.API};
    this.scopes = null;

    if (timeout != null && timeUnit != null) {
        this.timeoutTime = timeout;
        this.timeoutUnit = timeUnit;
    } else {
        this.timeoutTime = rxLocation.timeoutTime;
        this.timeoutUnit = rxLocation.timeoutUnit;
    }
}
 
开发者ID:TechIsFun,项目名称:RxJava2-weather-example,代码行数:14,代码来源:RxLocationBaseOnSubscribe.java

示例12: RxLocationBaseOnSubscribe

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
protected RxLocationBaseOnSubscribe(@NonNull RxLocation rxLocation, Long timeout, TimeUnit timeUnit) {
    this.ctx = rxLocation.ctx;
    this.services = new Api[]{ LocationServices.API, ActivityRecognition.API };
    this.scopes = null;

    if (timeout != null && timeUnit != null) {
        this.timeoutTime = timeout;
        this.timeoutUnit = timeUnit;
    } else {
        this.timeoutTime = rxLocation.timeoutTime;
        this.timeoutUnit = rxLocation.timeoutUnit;
    }
}
 
开发者ID:florent37,项目名称:RxGps,代码行数:14,代码来源:RxLocationBaseOnSubscribe.java

示例13: GoogleApiClientManager

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public GoogleApiClientManager(Context context, Handler handler, Api<? extends Api.ApiOptions
        .NotRequiredOptions>... apis){
    mContext = context;
    mMainHandler = handler;

    final GoogleApiClient.Builder apiBuilder = new GoogleApiClient.Builder(context);
    for(Api api: apis){
        apiBuilder.addApi(api);
    }

    mGoogleApiClient = apiBuilder.build();
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:13,代码来源:GoogleApiClientManager.java

示例14: GoogleApiClientManager

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public GoogleApiClientManager(Context context, Api<? extends Api.ApiOptions.NotRequiredOptions>
        ... apis){
    mContext = context;
    mMainHandler = new Handler();

    final GoogleApiClient.Builder apiBuilder = new GoogleApiClient.Builder(context);
    for(Api api: apis){
        apiBuilder.addApi(api);
    }

    mGoogleApiClient = apiBuilder.build();
}
 
开发者ID:jiaminghan,项目名称:droidplanner-master,代码行数:13,代码来源:GoogleApiClientManager.java

示例15: dump

import com.google.android.gms.common.api.Api; //导入依赖的package包/类
public final void dump(String paramString, FileDescriptor paramFileDescriptor, PrintWriter paramPrintWriter, String[] paramArrayOfString)
{
  String str = paramString + "  ";
  Iterator localIterator = this.zzapv.keySet().iterator();
  while (localIterator.hasNext())
  {
    Api localApi = (Api)localIterator.next();
    paramPrintWriter.append(paramString).append(localApi.mName).println(":");
    ((Api.zzb)this.zzapQ.get(localApi.zzor())).dump$ec96877(str, paramPrintWriter);
  }
}
 
开发者ID:ChiangC,项目名称:FMTech,代码行数:12,代码来源:zznf.java


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