Initialize the Cast Context
The framework has a global singleton object, the CastContext, which coordinates all the framework's interactions.
Your app must implement the OptionsProvider interface to supply options needed to initialize the CastContext singleton. OptionsProvider provides an instance of CastOptions which contains options that affect the behavior of the framework. The most important of these is the receiver application ID, which is used to filter discovery results and to launch the receiver app when a cast session is started.
B4X:
public class CastOptionsProvider implements OptionsProvider {
@Override
public CastOptions getCastOptions(Context context) {
CastOptions castOptions = new CastOptions.Builder()
.setReceiverApplicationId(context.getString(R.string.app_id))
.build();
return castOptions;
}
@Override
public List<SessionProvider> getAdditionalSessionProviders(Context context) {
return null;
}
}
I don´t want to use Extra Resources and i am trying to get the Value which is added to the Manifest with CreateResource.
How would i reference(get) such a Value from the Manifest to use it inside the CastOptionsProvider? Means what is the code needed?
Any help/tips appreciated ;-)