InAppBillingPlugin: Android: Object reference not set to an instance of an object.

I haven’t been able to test Android with a real phone until recently and it is failing to make the call to Google Play Store for In-App purchase. I get the following as a catch error with any call: Object reference not set to an instance of an object.

Example of calls are GetPurchase and GetProducts. I have the below code in my MainActivity.cs inside the MainActivity class. Is there a permission that needs to be enable for android. I have access network state, access wifi state, and internet permissions enabled.

protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
	base.OnActivityResult(requestCode, resultCode, data);
	InAppBillingImplementation.HandleActivityResult(requestCode, resultCode, data);
}

It feels as though this is a simple item that is missing.

Thanks!

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 36 (13 by maintainers)

Most upvoted comments

Agreed, I’ll do that. Worked best when debugging iOS. Just need to get my hands on an android phone. Thanks! I’ll keep you posted if anything funny shows up.