0

How to open the Android Auto car app from the mobile app?

I want to open the car app in the Desktop Head Unit when a button on the mobile app Activity is clicked.

Tried starting the CarAppService class but the onCreateSession(...) is not getting called.

Deena
  • 41
  • 3

1 Answers1

0

The mobile app has your own main activity as a launch activity, however, Android Auto has not. I suppose that you need to have one module working for mobile and one for Android Auto. Then you run different modules for mobile and Android Auto in your project.

flame3
  • 2,812
  • 1
  • 24
  • 32
  • If possible can you give a code sample on how to start the car app from the mobile app. Car app doesn't have an activities right? The car app UI extends Screen class. – Deena Jul 05 '23 at 06:58