Why do I get "Unable to start service Intent"?

  • Replies:1
  • OpenNot stickiedAnswered

Jun 3, 2011 1:58:27 PM


I'm trying get some licensing code from AndroidPit working, but I get "Unable to start service Intent". Basically code looks like this:

1Intent licenseIntent = new Intent("de.androidpit.app.services.ILicenseService");
2 if (mContext.bindService(licenseIntent, this, Context.BIND_AUTO_CREATE))
3 {
4 // success
5 }
6 else
7 {
8 // failure (I get this all the time)
9 }

I tried passing ILicenseService class explicitly:

1Intent licenseIntent = new Intent(mContext, de.androidpit.app.services.ILicenseService.class);

but I still get the same problem.

I managed to get Android Market LVL library working which uses identical code, so I don't really understand why it fails to find "de.androidpit.app.services.ILicenseService", but manages to find "com.android.vending.licensing.ILicensingService".

Most of the answers I found here say that you need to append stuff to your AndroidManifest.xml, but you don't anything for "com.android.vending.licensing.ILicensingService" to work, so I guess I shouldn't need anything "de.androidpit.app.services.ILicenseService" (they both derive from android.os.IInterface).

Note: I'm trying to integrate this licensing code into Unity, which is probably making it more complicated. Maybe someone has working integration already?

Thanks in advance.