@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); supportRequestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY); ActionBar actionBar = getSupportActionBar(); if (actionBar != null) { actionBar.setDisplayShowTitleEnabled(false); actionBar.setHomeButtonEnabled(false); actionBar.setDisplayHomeAsUpEnabled(true); actionBar.setBackgroundDrawable( new ColorDrawable(ContextCompat.getColor(this, android.R.color.transparent))); } mGamesFragment = PlayGamesFragment.getInstance(this, this); mApiClient = new GoogleApiClient.Builder(this).addApi(AppIndex.APP_INDEX_API).build(); // add App Indexing API BASE_APP_URI = Uri.parse( "android-app://" + getApplicationContext().getPackageName() + "/" + getResources() .getString(R.string.santa_tracker_deep_link_prefix)); ImmersiveModeHelper.setImmersiveSticky(getWindow()); ImmersiveModeHelper.installSystemUiVisibilityChangeListener(getWindow()); }
client = new GoogleApiClient.Builder(MainActivity.this).addApi(AppIndex.API).build();
@Override public Completable loginWithGoogle(final Activity activity) { return Single.create((SingleOnSubscribe<AuthCredential>) e -> { googleClient = new GoogleApiClient.Builder(activity) .addApi(Auth.GOOGLE_SIGN_IN_API, gso) .build(); Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(googleClient); activity.startActivityForResult(signInIntent, RC_GOOGLE_SIGN_IN); googleSignInCompleteListener = result -> { if(result.isSuccess()) { AuthCredential credential = GoogleAuthProvider.getCredential(result.getSignInAccount().getIdToken(), null); e.onSuccess(credential); } else { e.onError(new Exception(result.getStatus().toString())); } }; }).flatMapCompletable(authCredential -> signInWithCredential(activity, authCredential)); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); this.mountInterface(); inExecution = false; client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build(); }
public void track(){ mGoogleApiClient = new GoogleApiClient.Builder(ctx) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API) .build(); mGoogleApiClient.connect(); mLocationRequest = LocationRequest.create() .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) .setInterval(10 * 1000) // 10 seconds, in milliseconds .setFastestInterval(1 * 1000); // 1 second, in milliseconds }
public WearUtil(Context context) { mGoogleApiClient = new GoogleApiClient.Builder(context) .addApi(Wearable.API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); } public void conectar() {
@Override public void onCreate() { super.onCreate(); mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Wearable.API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); }
@Override public void onCreate() { super.onCreate(); mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Wearable.API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); }
@Override protected void onCreate(Bundle savedInstanceState) { setTransitionAnim(); super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); init(); // ATTENTION: This was auto-generated to implement the App Indexing API. // See https://g.co/AppIndexing/AndroidStudio for more information. client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build(); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mGoogleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(Wearable.API) .build(); }
WearDispatcher(Context context) { googleApiClient = new GoogleApiClient.Builder(context).addApi(Wearable.API).build(); cartographer = Cartographer.INSTANCE; dispatcherThread = new HandlerThread(DISPATCHER_THREAD_NAME, THREAD_PRIORITY_BACKGROUND); dispatcherThread.start(); handler = new DispatcherHandler(dispatcherThread.getLooper(), this); }
public void logOutGoogleAuth() { GoogleSignInOptions googleSignInOptions = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestEmail() .requestIdToken(BuildConfig.GOOGLE_CLIENT_ID) .build(); mGoogleApiClient = new GoogleApiClient.Builder(ZulipApp.get()) .addApi(Auth.GOOGLE_SIGN_IN_API, googleSignInOptions) .addConnectionCallbacks(this) .build(); mGoogleApiClient.connect(); }
private void setupGoogleClient() { googleApiClient = new GoogleApiClient.Builder(this) .addApi(AppInvite.API) .enableAutoManage(this, this) .build(); }
GooglePlayServicesLocationSource(Context context, LocationRequest locationRequest, SourceListener sourceListener) { this.sourceListener = sourceListener; this.locationRequest = locationRequest; this.googleApiClient = new Builder(context) .addApi(LocationServices.API) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build(); }
private void setupGoogleClient() { googleApiClient = new GoogleApiClient.Builder(this) .addApi(AppInvite.API) .enableAutoManage(this, this) .build(); }
private synchronized void buildGoogleApiClient(Context context) { googleApiClient = new GoogleApiClient.Builder(context) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API) .build(); }
@Override protected GoogleApiClient.Builder configureApiClientBuilder( GoogleApiClient.Builder b) { return(b.addApi(LocationServices.API)); }
@Override protected GoogleApiClient.Builder configureApiClientBuilder( GoogleApiClient.Builder b) { return(b.addApi(LocationServices.API)); }