Android Auto Google Play Rejection : <p>Google keeps rejecting my app for the following reason:
"During review, we found that if audio is playing on the device while plugging into the Android Auto experience, the music continues to play through the car speakers without user intent. We see this as a driver distraction, and isn't appropriate for Android Auto apps."</p>

<p>I thought I had taken the appropriate steps to resolve this by following the documentation from here: <a href="https://developer.android.com/training/auto/audio/index.html#isconnected">https://developer.android.com/training/auto/audio/index.html#isconnected</a></p>

<p>However, they rejected me again for the same reason.</p>

<p>In my MediaBrowserServiceCompat StreamService class, I've added the following code:</p>

<pre><code>private IntentFilter androidAutoConnectionIntentFilter = new IntentFilter("com.google.android.gms.car.media.STATUS");
private AndroidAutoConnectionStatusReceiver androidAutoConnectionStatusReceiver = new AndroidAutoConnectionStatusReceiver();
</code></pre>

<p>In the onCreate(), I've added:</p>

<pre><code>registerReceiver(androidAutoConnectionStatusReceiver, androidAutoConnectionIntentFilter);
</code></pre>

<p>and added this class to the service as well:</p>

<pre><code>private class AndroidAutoConnectionStatusReceiver extends BroadcastReceiver {
        @Override
        public void onReceive(Context context, Intent intent) {
            System.out.println("*** ANDROID AUTO CONNECTED: " + intent);
            String status = intent.getStringExtra("media_connection_status");
            boolean isConnectedToCar = "media_connected".equals(status);
            if (isConnectedToCar) {
                // android auto connected so stop playback
                Intent stopIntent = new Intent(context, StreamService.class);
                stopIntent.setAction(StreamService.ACTION_PLAYER_STOP);
                context.startService(stopIntent);
            }
        }
    }
</code></pre>

<p>Any idea how I can update my app to resolve this rejection?</p>
