通过引用https://codelabs.developers.google.com/codelabs/cast-videos-android/#6,我已经在我的 android 应用程序中实现了 chrome cast。我能够成功投射视频。实验设置未更改(仅接收器应用程序 ID 设置为 DEFAULT_MEDIA_RECEIVER_APPLICATION_ID),但现在在 SessionManagerListener 回调中我收到错误 15。任何线索都会有所帮助。回调流程如下所示。
@Override
public void onSessionStarting(CastSession session) {
//able to get here
}
@Override
public void onSessionStartFailed(CastSession session, int error) {
//error =15
}
日志猫
05-18 19:13:53.757 16733-16733/? E/SdkNetworkParameterUtils: getNetworkOperatorForSubscription [int]
05-18 19:14:04.022 16733-16733/? E/SdkNetworkParameterUtils: getNetworkOperatorForSubscription [int]
05-18 19:14:13.726 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:13.726 859-1019/? E/QC-time-services: Receive Passed == base = 12, unit = 1, operation = 0, result = 0
05-18 19:14:13.734 859-1019/? E/QC-time-services: Receive Passed == base = 13, unit = 1, operation = 0, result = 0
05-18 19:14:13.737 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:13.306 685-1529/? E/QC-time-services: Daemon:Update to modem bit set
05-18 19:14:13.307 31403-31403/? E/QC-time-services: Receive Passed == base = 2, unit = 1, operation = 0, result = 0
05-18 19:14:13.307 685-751/? E/QC-time-services: Daemon:tod_update_ind_cb: Got Update from modem msg_id 40
05-18 19:14:13.307 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:17.437 16733-16733/? E/SdkNetworkParameterUtils: getNetworkOperatorForSubscription [int]
05-18 19:14:21.084 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:21.084 859-1019/? E/QC-time-services: Receive Passed == base = 12, unit = 1, operation = 0, result = 0
05-18 19:14:21.095 859-1019/? E/QC-time-services: Receive Passed == base = 13, unit = 1, operation = 0, result = 0
05-18 19:14:21.095 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:22.343 685-1707/? E/QC-time-services: Daemon:Update to modem bit set
05-18 19:14:22.343 31403-31403/? E/QC-time-services: Receive Passed == base = 2, unit = 1, operation = 0, result = 0
05-18 19:14:22.344 685-751/? E/QC-time-services: Daemon:tod_update_ind_cb: Got Update from modem msg_id 40
05-18 19:14:22.344 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:27.721 16733-16733/? E/SdkNetworkParameterUtils: getNetworkOperatorForSubscription [int]
05-18 19:14:43.076 16733-16733/? E/SdkNetworkParameterUtils: getNetworkOperatorForSubscription [int]
05-18 19:14:50.931 712-712/? E/cnss-daemon: Stale or unreachable neighbors, ndm state: 16
05-18 19:14:52.242 1521-1995/? E/IzatSvc_Wiper: W/Num of elements returned by LOWI 5
05-18 19:14:53.095 700-24959/? E/AudioFlinger: open /proc/28333/cmdline error
05-18 19:14:54.964 710-928/? E/QC-time-services: Receive Passed == base = 12, unit = 1, operation = 0, result = 0
05-18 19:14:54.965 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:54.973 710-928/? E/QC-time-services: Receive Passed == base = 13, unit = 1, operation = 0, result = 0
05-18 19:14:54.973 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:56.324 685-1795/? E/QC-time-services: Daemon:Update to modem bit set
05-18 19:14:56.325 31403-31403/? E/QC-time-services: Receive Passed == base = 2, unit = 1, operation = 0, result = 0
05-18 19:14:56.327 685-751/? E/QC-time-services: Daemon:tod_update_ind_cb: Got Update from modem msg_id 40
05-18 19:14:56.327 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:58.048 710-928/? E/QC-time-services: Receive Passed == base = 12, unit = 1, operation = 0, result = 0
05-18 19:14:58.049 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:58.055 710-928/? E/QC-time-services: Receive Passed == base = 13, unit = 1, operation = 0, result = 0
05-18 19:14:58.056 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:58.269 685-1822/? E/QC-time-services: Daemon:Update to modem bit set
05-18 19:14:58.271 685-751/? E/QC-time-services: Daemon:tod_update_ind_cb: Got Update from modem msg_id 40
05-18 19:14:58.271 685-739/? E/QC-time-services: Daemon: Time-services: Waiting to acceptconnection
05-18 19:14:58.272 31403-31403/? E/QC-time-services: Receive Passed == base = 2, unit = 1, operation = 0, result = 0
05-18 19:15:08.403 16733-16733/? E/SdkNetworkParameterUtils: getNetworkOperatorForSubscription [int]
05-18 19:15:13.624 712-712/? E/cnss-daemon: Stale or unreachable neighbors, ndm state: 4