Question: I've set up 2 projects in FCM - MyAppCommsLive and MyAppCommsTest.

In each of the projects I have added my app com.mycompany.myapp as an Android app.

In my ionic 3 app, I compile 2 versions that point 2 different instances of my REST api. I keep the app id the same but all that changes is the URL to the API. So, the app id is com.mycompany.myapp. 

When I compile the test version I include a specific google-services.json file that has the keys for the MyAppCommsTest FCM project. Likewise, when I compile the live version I use its respective google-services.json file.

However, if I send a push notification using the MyAppCommsTest API key, both the test and live devices receive the notification.

Right now the notifications I'm sending are sent top "/topics/all" as they are global notifications. What I am trying to avoid is sending messages to live devices inadvertently. 

Am I missing something here, should this be happening?

Answer: 
First, I suggest that you change the one app package name to append `.debug` to it. You will need to reconfigure it on Firebase and download the json file again if you do this.

Secondly, you might find that your json files contain properties for both apps, depending on how you declared them in Firebase. Make sure each app's json only contains properties for that app by editing the files manually.
Following on from what @Richard-Le-Mesurier suggested I double checked all settings but I kept having the issue. The problem was that even though I was recompiling the app and deploying it to the device using adb, I was not uninstalling the previous version. 

After uninstalling between deployments I no longer get the "crossed-wires" I was experiencing.