android Read text file from url and use as string

I am seriously baffled. i am new to android development i am currently trying to use Android Studio and the scenario is this, i have a text file which contains an mp4 link that i want to play when a button is pressed in my MainActivity.

The problem is i need to read the text (the text is a single line) from url as a string and place the string in lines 21 and 29 of the picture i have added.

if i need to use a new thread then how would i do that aswell as call it from the MainActivity.

Here Is The Image of My code Inside MainActivity

Thank You

Leave a Reply

avatar
  Subscribe  
Notify of