Modify the VIDEO_CODE of the Youtube API without creating a new version of apk

Asked

Viewed 13 times

0

I need to change this String VIDEO_CODE every day, because inside the app is a boot that leads to a live broadcast, I would have to do this without having to generate a new apk every day and generate a new version on the console.

private final String API_KEY = "AIzaSyArMe4mfDJZYiA2xumhJp0TwHMaetcOE_g";
private final String VIDEO_CODE = "blzjpuWai_8";

player = (YouTubePlayerView) findViewById(R.id.player);
    player.initialize(API_KEY, new YouTubePlayer.OnInitializedListener() {
        @Override
        public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) {
            if (!b){
                youTubePlayer.loadVideo(VIDEO_CODE);
                youTubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.DEFAULT);
            }
        }

        @Override
        public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {
            Toast.makeText(aovivo.this, youTubeInitializationResult.toString(), Toast.LENGTH_LONG).show();
        }
    });
  • Would have as edit the question and put the code you have already made?

  • I’ve already made the change

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.