I suppose what was meant is, that it will take some time, so you should run it asynchronously, so it does not freeze your UI. So, sure you'll invoke it from a button click, but not directly. Instead, in your onUpgradeAppButtonClicked()
method, do something to run the mHelper.launchPurchaseFlow()...
asynchronously, like using an AsyncTask
or a separate Thread
or the like.
The famous Painless Threading Article comes, as always, very handy for this.