我发现了两种实现方法,它们似乎并不相互兼容:
https://developer.android.com/google/play/billing/billing_integrate.html
https://developer.android.com/training/in-app-billing/preparing-iab-app.html
例如,第一个告诉您取消绑定结算服务,如下所示:
@Override
public void onDestroy() {
super.onDestroy();
if (mService != null) {
unbindService(mServiceConn);
}
}
培训指南告诉您这样做:
@Override
public void onDestroy() {
super.onDestroy();
if (mHelper != null) mHelper.dispose();
mHelper = null;
}
哪一个是正确的,应该遵循?
答案 0 :(得分:0)
我建议关注http://developer.android.com/training/in-app-billing/preparing-iab-app.html,然后按照他们在上述指南中提出的示例项目(TrivialDrive)开始