API 23 (Android 6.0.1) InApp Billing: Service Intent must be explicit: Intent

Viewed 2069

I have been looking around and this seems to be a Android L related bug that was apparently solved solved using the code I already have.

When I try to call bindService I get:

Fatal Exception: java.lang.RuntimeException: Unable to resume activity {MyActivity}: java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.android.vending.billing.InAppBillingService.BINL }

This is the piece of code that causes the crash:

    final Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
    serviceIntent.setPackage("com.android.vending");
    activity.bindService(serviceIntent, this, Context.BIND_AUTO_CREATE);

It only happens on Android 6.0.1 and my target in gradle in 23 and I can't seem to understand what's wrong with that on API 23...

1 Answers
Related