使用Google Cast SDK v3进行自定义通知

TR4*_*oid 9 android google-cast

自从新的Google Cast SDK v3问世以来,我一直在考虑迁移到它,因为它有一些我需要的功能,而且我总是希望尽可能保持最新版本.我以前的设置使用了Google Cast SDK v2 + Cast Companion Library.但是,我一直无法找到在新的Google Cast SDK v3中提供完全自定义通知的方法,这会阻止我使用它.

使用Google Cast SDK v2 + Cast Companion Library,我能够简单地对其进行子类化VideoCastNotificationService并覆盖其build方法以生成自定义通知:

public class MyCastNotificationService extends VideoCastNotificationService {
    @Override
    protected void build(MediaInfo info, Bitmap bitmap, boolean isPlaying) {
        // ... build the custom notification
        mNotification = new NotificationCompat.Builder(this)/*...*/.build();
    }
}
Run Code Online (Sandbox Code Playgroud)

然后我可以注册MyCastNotificationService我的CastConfiguration喜欢这个:

CastConfiguration castConfig = new CastConfiguration.Builder(APPLICATION_ID)
    /*...*/
    .setCustomNotificationService(MyCastNotificationService.class)
    .build();
Run Code Online (Sandbox Code Playgroud)

但是,使用Google Cast SDK v3,我一直无法找到有效的替代品.以下是我在这个主题上所做的一些研究结果:

有没有人能够使用新的Google Cast SDK v3提供自定义通知?据我所知,这似乎没有得到支持,但我希望在这里被证明是错的.提前致谢!