I am sending Data only messages to my FirebaseMessaging receiver, but It stops receiving messages when the app is killed(swiped from the tray). I've been looking at ways to make it always listen as Whatsapp does. According to this answer, I have to make it start in sticky mode. How I start my service now is by simply adding it to the manifest.
<service
android:name=".MyFirebaseMessagingService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
How can I make this start in Sticky Mode instead?