0

I am making a media app for Android Head Unit that should check the connection if the car is connected to an Android Auto. Is there a way for my app to detect if it is is connected to Android Auto?

Is it possible for Auto media apps to detec Android Auto connection status via a BroadcastReceiver registered. I already tried to create a BroadCastReceiver with androidx.car.app.connection.action.CAR_CONNECTION_UPDATED just like this text but it didnt work.

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jul 21 '23 at 17:44

1 Answers1

0

You can use the CarConnection API from the androidx.car.app:app module, which handles registering the broadcast receiver for you [source code].

Ben Sagmoe
  • 440
  • 2
  • 9