草庐IT

SimpleExoPlayer

全部标签

android - 从服务中将 PlayerView 与 SimpleExoPlayer 绑定(bind)

我已经实现了一个服务来在后台运行完美运行的音频,但是我无法从服务中获取SimpleExoPlayer的实例来更新UI,而且如果我退出,音频也会在后台播放两次并重新打开Activity。音频播放服务publicclassAudioPlayerServiceextendsService{privatefinalIBindermBinder=newLocalBinder();privateSimpleExoPlayerplayer;privateItemitem;privatePlayerNotificationManagerplayerNotificationManager;@Overri