Switching between 2 active activities(projection and phone) in a runtime (Android Auto)

Hi, everyone.
I have an application under the test which has android auto projection functionality. In order to start the projection I am running DHU emulator from google (https://developer.android.com/training/cars/testing).
The projection is inside the web view and I am able to switch to its context and interact with it. But the projection has a native wrapper which is unreachable for me inside the native context of the app. As far as I understand the projection is running in the separate activity (GeminiCarActivity) in the same time with the MainActivity of the app on the phone and both of them in the same native context. Is there a way to switch between 2 active activities. Driver.startactivity(packageName, activityName) is not an option, because the activity is launched from the moment the device is connected to the emulator. May be someone know a work around how to switch a focus from one activity to another in a runtime.
Thank you in advance.

You can check for the abd command and see if you can start activity at a point

public void your_functionName(){
ProcessBuilder pb = new ProcessBuilder(“adb”, “shell”, “am”,“start”,"-d",“YOUR_ACTIVITY_NAME”);
try {
Process pc = pb.start();
}catch (IOException |InterruptedException e){
System.out.println(“Exception occured . Failed to open activity”);

Thanks for the quick reply.
But what the difference between your solution and driver.start() activity?
I tried your solution, but adb couldn’t find a proper intent.
But I don’t need to start anything, I need to change the focus of android driver somehow, because I am only able to interact with native part of the phone, but not the DHU emulator.

Hi Pomidorum,

Wondering if you ever figured out how to connect appium to the dhu? I was only able to connect to the android auto app on my phone.