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

  • Replies:1
  • OpenNot stickiedAnswered
  • Forum posts: 2

Jun 3, 2011 1:58:27 PM via Website


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.
  • Forum posts: 2

Jun 4, 2011 7:14:51 AM via Website

The solution in my case was to start a server part on my phone (AppCenter from AndroidPit.com in this case). No entries in AndroidManifest are necessary for the client application.

— modified on Sep 21, 2011 2:42:05 PM by moderator