I've built an app that calls the Google Assistant on a button push from Arduino. It's working fine on Android 8, you push the button on the Arduino and the Google Assistant toast springs up in the foreground, not matter which app is currently in the foreground. IE the MIT App Inventor app (My App) doesn't need to be in the foreground.
But on Android 12 you push the button and the Google Assistant toast only springs up when My App is in the foreground, the Arduino button push works if My App is in the background and when My App is brought to the foreground the Google Assistant toast then springs up waiting for the voice commands.
Below are the blocks I'm using any ideas would be most appreciated, I think it might be something to do with the manifest and declaring the apps I'm going to use with the intents, but I'm not sure? I have tried some edits to the manifest without success.