I am creating the subscription purchase for an app. And I originally had something like this:
// CREATE THE SUBSCRIBE BUTTON
Button subscribe = (Button)findViewById(R.id.subscribe);
subscribe.setOnClickListener(new Button.OnClickListener()
{
public void onClick(View v)
{
onUpgradeAppButtonClicked ( );
}
});
public void onUpgradeAppButtonClicked( )
{
Log.d(TAG, "Buy button clicked; launching purchase flow for upgrade.");
setWaitScreen(true);
mHelper.launchPurchaseFlow(this, SKU_SUBSCRIPTION, RC_REQUEST, mPurchaseFinishedListener);
}
But then I read that the IABHelper needs to get set asynchronously. And that invoking this method from a button click might not be right.
But how does it possibly get invoked if not from a button click?
Thanks!