I'm having problems to handle in-app billing inventory on devices with multiple accounts.
DEVICE 1:
DEVICE 2:
The code to handle the query inventory response is this:
@Override
public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
if (result.isFailure()) {
Log.d("billing", "inventory: failed (" + result.mMessage + ")");
return;
}
Log.d("billing", "inventory: remove_ads purchased=" + inventory.hasPurchase("remove_ads");
}
The logcat output on DEVICE 1 is:
inventory: remove_ads purchased=true
And the logcat output on DEVICE 2 is:
inventory: remove_ads purchased=false
What am I missing? Thanks!
It was my mistake, this is what happened:
It all started working when I signed the APK with the release signature and tested it on DEVICE 2.
Conclusion: pay more attention with the signature and beware of cached responses