This IS NOT A DUPLICATE of this question.
I either do not clearly understand how serivces work, or it's indeed not what I need. I want the service to process events, must it still be started? If so, why is it implicitly started when activity is defined? I don't want long running operation, I want event handling. As far as I understand, intent-filter
notifies Android that service should be called, if condition is met, i.e. push message is received. This question somewhat confirms the assumption.
When I have an activity in my app service gets fired whenever message arrives:
<service android:name=".FbMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
But as soon as I comment out the activty in manifest, neither breakpoint is hit nor logcat show any messages. So I assume service is kind of not registerd... Is activity a MUST?