1

I want to launch a Service from an another application.

Logcat error is:

Unable to start service Intent { cmp=com.oic.launchertest.service/.DataSyncService } U=0: not found

Manifest from the App with the Service

<service
    android:name="com.oic.launchertest.service.DataSyncService"
    android:enabled="true"
    android:exported="true">
</service>

In the other App I want to launch the service with the following code

Intent intent=new Intent();
intent.setComponent( new ComponentName("com.oic.launchertest.service", "com.oic.launchertest.service.DataSyncService"));
startService(intent);

I could need some advice, what could cause this problem.

Thanks in advance.

Dennis Kriechel
  • 3,719
  • 14
  • 40
  • 62
broesel001
  • 117
  • 1
  • 2
  • 9

1 Answers1

0

I did solve the Problem with the following solution. I read this in a comment but can't find the thread anymore...

Changing the location of the service did help.

I changed it from

com.oic.launchertest.service.DataSyncService

to

com.oic.launchertest.launcher.DataSyncService

and the Service was found now. Maybe this was some android naming complication, because I had service in the package name? I have no clue.

broesel001
  • 117
  • 1
  • 2
  • 9