Using firebase "remote config" for change URL of VideoView

Using firebase "remote config" for change URL of VideoView
0.0 0

#1

I am doing a TV channel app where I use the videoview to show the channels… and I use the video view with URL and the stream format that is used is, (. M3U8) However this link always changes daily, and it is impossible for me to keep updating every time this link changes!

What do I need?

I need to use the remote config from Google firebase to change the URL of the videoview whenever I need it! Using this:
https://i.imgur.com/uwv6YN7.png

My Activity:

package tk.protvapp.protv;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.MediaController;
import android.widget.VideoView;

public class FoxActivity extends Activity {
    VideoView myVideoView;
    View v;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.activity_fox);

        myVideoView = (VideoView)this.findViewById(R.id.videofox1); MediaController mc = new MediaController(this); myVideoView.setMediaController(mc);
        final String urlStream = "//Search the link in remote config for paste here";
        myVideoView.start();
        myVideoView.findFocus();
        runOnUiThread(new Runnable() { @Override public void run() { myVideoView.setVideoURI(Uri.parse(urlStream)); } });
    }
    public void voltarhomefox(View v){
        Intent intent = new Intent(FoxActivity.this, HomeActivity.class);
        startActivity(intent);
    }
}

My layout:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:ads="http://schemas.android.com/apk/res-auto"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000"
    tools:context="tk.protvapp.protv.FoxActivity">


    <Button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_centerHorizontal="true"
        android:onClick="voltarhomefox"
        android:text="VOLTAR" />

    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_above="@+id/button2"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:id="@+id/frameLayout">

        <VideoView
            android:id="@+id/videofox1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />
    </FrameLayout>

</RelativeLayout>