Last active
January 6, 2017 05:14
-
-
Save tcw165/2d8fef63c547957fe742f53b11f67507 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Example 1, from an android.app.Activity: | |
// Use the startActivityForResult(Intent, int) and subscribe | |
// the result in onActivityResult(int, int, Intent). | |
startActivityForResult( | |
new Intent(this, IapDelegateActivity.class) | |
.putExtra(IapDelegateActivity.PARAMS_SKU, "sku") | |
.putExtra(IapDelegateActivity.PARAMS_SKU_PRICE, 1.99f)); | |
// Example 2, from a android.app.Service: | |
// Use the startActivity(Intent) and subscribe the result in | |
// android.content.BroadcastReceiver.onReceive(Context, Intent). | |
startActivity( | |
new Intent(this, IapDelegateActivity.class) | |
.putExtra(IapDelegateActivity.PARAMS_SKU, "sku") | |
.putExtra(IapDelegateActivity.PARAMS_SKU_PRICE, 1.99f)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment