GooglePlayServices.java 文件源码

java
阅读 35 收藏 0 点赞 0 评论 0

项目:googleplayservices 作者:
public void tryConnect (CallbackContext callbackContext) {
 boolean isGpsAvailable = (GooglePlayServicesUtil.isGooglePlayServicesAvailable(cordova.getActivity()) == ConnectionResult.SUCCESS);
 if (!isGpsAvailable) {
  callbackContext.sendPluginResult (new PluginResult (PluginResult.Status.OK, false));
  return;
 }
 tryConnectCallback = callbackContext;
 mGoogleApiClient = new GoogleApiClient.Builder (cordova.getActivity().getApplicationContext())
  .addConnectionCallbacks (this)
  .addOnConnectionFailedListener (this)
  .addApi (Games.API)
  .addScope (Games.SCOPE_GAMES)
  .addApi(Plus.API)
  .addScope(Plus.SCOPE_PLUS_PROFILE)
  .addScope(Plus.SCOPE_PLUS_LOGIN)
  .build ();
 mGoogleApiClient.connect ();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号