If an app has an exported service in the android manifest that means I can run that service from within another app right? For example the service looks like this in the manifest file.
<service
android:name=".account.contactsync.ContactsSyncAdapterService"
android:exported="true"
android:process=":contacts" >
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="@xml/sync_contacts" />
<meta-data
android:name="android.provider.CONTACTS_STRUCTURE"
android:resource="@xml/contacts" />
</service>
As you can see the service is set to android:exported="true" which means I should be able to run it from outside of the app right? How do I do that
I tried this and it didn't work
final Intent intent = new Intent();
ComponentName cName = new ComponentName
("com.myapp","com.myapp.ContactsSyncAdapterService");
intent.setComponent(cName);
startActivity(intent);