Skip to content

Instantly share code, notes, and snippets.

@abbas-oveissi
Last active November 26, 2019 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abbas-oveissi/f26176873955a97bbcd1bfe242cf63b8 to your computer and use it in GitHub Desktop.
Save abbas-oveissi/f26176873955a97bbcd1bfe242cf63b8 to your computer and use it in GitHub Desktop.
private void buyStreaming() {
mHelper.launchPurchaseFlow(this, SKU_STREAMING, 1, new IabHelper.OnIabPurchaseFinishedListener() {
@Override
public void onIabPurchaseFinished(IabResult result, Purchase info) {
if (result.isFailure()) {
Toast.makeText(DetailActivity.this, R.string.purchasing_error, Toast.LENGTH_SHORT).show();
return;
} else if (info.getSku().equals(SKU_STREAMING)) {
openPlayer();
}
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment