I'm creating an app using the new Android build system, and using a LocalBroadcastManager
to fire notifications from an IntentService
back to an Activity
.
I've defined the following product flavours as part of the build for 3 separate apps;
productFlavours {
london {
packageName 'com.example.lo'
}
dubai {
packageName 'com.example.du'
}
}
When I build the app using either of these product flavours I am not getting any broadcasts through the manager. I've confirmed that both the service and the activity are running in the same process.
A broadcast receiver is bound as required in the Activity#onCreate
method of my activity but does not receive any events. I have also confirmed by printing out the process ID of both the activity and service and both are reporting that this is the same process, so this can't be an issue.
As a test I removed the product flavours and built the app with just the single packagename as defined in the app manifest file and now the broadcast manager seems to function as expected. On the intents that I'm sending I am only setting the action.
Do I need to set anything else?