I found two methods of implementation and they don't seem to be compatible with each other:
https://developer.android.com/google/play/billing/billing_integrate.html
https://developer.android.com/training/in-app-billing/preparing-iab-app.html
For example, the first one tells you to unbind the billing service as follows:
@Override
public void onDestroy() {
super.onDestroy();
if (mService != null) {
unbindService(mServiceConn);
}
}
The training guide tells you to do this:
@Override
public void onDestroy() {
super.onDestroy();
if (mHelper != null) mHelper.dispose();
mHelper = null;
}
Which one is correct and should be followed?
I would suggest following http://developer.android.com/training/in-app-billing/preparing-iab-app.html and start by including the example project (TrivialDrive) as they suggest in the aforementioned guide