Java Question [solved] Is it possible to get Values from the Manifest in a Library?

DonManfred

Expert
Licensed User
Longtime User

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;
    }
}
In this case the CastOptionsProvider is getting the app_id from a Value in R file.

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 ;-)
 

DonManfred

Expert
Licensed User
Longtime User
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Need to learn how to add a video to stream now
B4X:
Sub Casty_onConnected()
    Log($"Casty_onConnected()"$)
    Dim mb As MediaDataBuilder
    mb.Initialize("","http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4").setAutoPlay(True).setContentType("videos(mp4").setMediaType(1).setStreamType(1).setTitle("DonManfred presents").setSubtitle("B4A Casting Video").addPhotoUrl("https://peach.blender.org/wp-content/uploads/bbb-splash.png?x11217")

    cast.loadMediaAndPlayInBackground(mb.build)
End Sub





 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…