Android Auto Google Play拒绝

谷歌不断拒绝我的应用程序,原因如下:“在审查过程中,我们发现如果在插入Android Auto体验的同时在设备上播放audio,则音乐将继续在没有用户意图的情况下通过汽车扬声器播放,我们将其视为驱动程序分心,并不适用于Android Auto应用程序。“

我想我已经采取了适当的步骤来解决这个问题,从这里的文档: 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); } } } 

任何想法如何我可以更新我的应用程序来解决这种拒绝?

Solutions Collecting From Web of "Android Auto Google Play拒绝"