Android in app billing - where to place the bind code
<p>I am going through this tutorial they have: developer.android.com/guide/market/billing/billing_integrate.html</p>

<p>and I am in this section "Binding to the MarketBillingService"</p>

<p>They give those code snippets there:</p>

<pre><code>try {
  boolean bindResult = mContext.bindService(
    new Intent("com.android.vending.billing.MarketBillingService.BIND"), this,
    Context.BIND_AUTO_CREATE);
  if (bindResult) {
    Log.i(TAG, "Service bind successful.");
  } else {
    Log.e(TAG, "Could not bind to the MarketBillingService.");
  }
} catch (SecurityException e) {
  Log.e(TAG, "Security exception: " + e);
}
</code></pre>

<p>but I have no idea where to put them. Does it go in the Activity screen where the user presses the "buy" button? If so, what is the mContext object that they use? How do I unstantiate that? Is that like a button listener? Is this code meant to be in a button listener?</p>

<p>Thanks!</p>
