-
-
Save hitherejoe/b0c26ac06a0189fe178840a6b1c3687b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
googleApiClient = createGoogleApiClient(); | |
} | |
private GoogleApiClient createGoogleApiClient() { | |
return new GoogleApiClient.Builder(this).addConnectionCallbacks(this) | |
.addOnConnectionFailedListener(this) | |
.addApi(Wallet.API, new Wallet.WalletOptions.Builder() | |
.setEnvironment(WalletConstants.ENVIRONMENT_PRODUCTION) | |
.setTheme(WalletConstants.THEME_HOLO_DARK).build()).build(); | |
} | |
protected void onStart(){ | |
super.onStart(); | |
googleApiClient.connect(); | |
} | |
protected void onStop() { | |
googleApiClient.disconnect(); | |
super.onStop(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment