Подтвердить что ты не робот

Отклонение Google Android от Google

Google продолжает отклонять мое приложение по следующей причине: "Во время обзора мы обнаружили, что если звук воспроизводится на устройстве при подключении к Android Auto, музыка продолжает воспроизводиться через автомобильные динамики без намерения пользователя. Мы рассматриваем это как отвлечение драйверов и не подходит для Android Автоматические приложения."

Я подумал, что предпринял соответствующие шаги для решения этой проблемы, следуя документации отсюда: https://developer.android.com/training/auto/audio/index.html#isconnected

Тем не менее, они снова отклонили меня по той же причине.

В моем классе MediaBrowserServiceCompat StreamService я добавил следующий код:

private IntentFilter androidAutoConnectionIntentFilter = new IntentFilter("com.google.android.gms.car.media.STATUS");
private AndroidAutoConnectionStatusReceiver androidAutoConnectionStatusReceiver = new AndroidAutoConnectionStatusReceiver();

В onCreate() я добавил:

registerReceiver(androidAutoConnectionStatusReceiver, androidAutoConnectionIntentFilter);

и добавил этот класс к сервису:

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);
            }
        }
    }

Любая идея, как я могу обновить свое приложение, чтобы разрешить это отклонение?

4b9b3361