I'm developing casting functionality in our app and as a part of the CastOptionsProvider
class, I need to supply a ReceiverApplicationId
as such:
class CastOptionsProvider : OptionsProvider {
companion object {
const val CUSTOM_NAMESPACE = "urn:x-cast:custom_namespace"
const val RECEIVER_APPLICATION_ID = "XXXXXXXX" // https://cast.google.com/publish/#/overview
}
override fun getCastOptions(context: Context): CastOptions? {
val supportedNamespaces = listOf(CUSTOM_NAMESPACE)
return CastOptions.Builder()
.setReceiverApplicationId(RECEIVER_APPLICATION_ID)
.setSupportedNamespaces(supportedNamespaces)
.build()
}
override fun getAdditionalSessionProviders(appContext: Context?): List<SessionProvider?>? {
return null
}
}
The above generated id (masked by me as XXXXXXXX) is of my own ChromeCast device at home (as I've been working from home for months now). What happens when this functionality goes out public? Which CC device's ReceiverApplicationId
should I provide then?
I just can't understand the idea of having to provide a ReceiverApplicationId of a specific device for me to be able to even develop the functionality...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…