Google is recommending to use GcmListenerService in place of GcmBroadcastReceiver.
Am making a Library project(com.android.library plugin) which is using GCM. It works well when Application project(com.android.application plugin) is NOT using GCM for it's own.
When Application project is using GCM for it's own, Library project receiver is not getting called!
Library module has defined GCM permissions and receiver & service entries in it's manifest. App module has defined it's service entry in it's own manifest.
With GcmBroadcastReceiver this could've been possible, as it is a broadcast. Have seen many questions here for the same. Don't want to use GcmBroadcastReceiver because of deprecation.
Is there any way to make this work?
Edit: Which Service will get invoked is depends on order in which it's defined in merged manifest xml. If I reverse the order, the other Service is getting invoked! Is there any way to call both Services?