Я уверен, что это так, но у меня проблемы с деталями.
Вот существующий код:
Mainfest for the main Application:
<application android:icon="@drawable/biosound_icon" android:label="@string/app_name" android:debuggable="true">
<service
android:name="com.t2.biofeedback.BioFeedbackService">
<intent-filter>
<action android:name="com.t2.biofeedback.IBioFeedbackService"/>
</intent-filter>
</service>
</application>
Звонок для привязки сервиса был в библиотеке AndroidSpineServerLib
Intent intent2 = new Intent("com.t2.biofeedback.IBioFeedbackService");
bindService(intent2, mConnection, Context.BIND_AUTO_CREATE);
Итак, я могу видеть, как служба была связана с конкретным приложением
Чтобы исправить это, я попытался:
Intent intent2 = new Intent(this, BioFeedbackService.class);
bindService(intent2, mConnection, Context.BIND_AUTO_CREATE);
Проблема в том, что служба не была создана.
Я также попробовал следующее
In the manifest of the service:
<service
android:class=".service.BioFeedbackService">
<intent-filter>
<action android:name="com.t2.biofeedback.IBioFeedbackService"/>
</intent-filter>
</service>
And in the library where I bind the service:
Intent intent2 = new Intent();
intent2.setAction("com.t2.biofeedback.IBioFeedbackService");
bindService(intent2, mConnection, Context.BIND_AUTO_CREATE);
Все еще не повезло.
Возможно, я помещаю определение сервиса в неправильный манифест.
Помните, у меня есть следующая иерархия
Main Application references:
AndroidBTService (Library), which references
AndroidSpineServerLib (Library)
So I have 3 manifests and not sure which to update.