Play Video From Google Driver + Android Code

I have problems opening videos with links from google drive "https://drive.google.com/file/d/1uJRlap2SrJg3quKz03qMiwk1V2NqdeRz/preview"

I tried lớn follow the instructions of Soeurng Sar but could not run Link

enter image mô tả tìm kiếm here

I vày not know calling in MainActivity

String uri = "https://drive.google.com/file/d/1uJRlap2SrJg3quKz03qMiwk1V2NqdeRz/preview"; try String URL = downloadUrl (uri); // Toast.makeText (this, URL, Toast.LENGTH_SHORT) .show (); catch (IOException e) e.printStackTrace ();

was it right?

I look forward lớn the help

Logcat:

AndroidManifest.xml

MainActivity

public class MainActivity extends AppCompatActivity {
Overrideprotected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String uri = "https://drive.google.com/file/d/1uJRlap2SrJg3quKz03qMiwk1V2NqdeRz/preview"; try String URL = downloadUrl(uri); Toast.makeText(this, URL, Toast.LENGTH_SHORT).show(); catch (IOException e) e.printStackTrace(); public String downloadUrl(String myurl) throws IOException InputStream is = null; try URL url = new URL(myurl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setReadTimeout(10000); conn.setConnectTimeout(15000); conn.setRequestMethod("GET"); conn.setDoInput(true); conn.connect(); is = conn.getInputStream(); String contentAsString = readIt(is); return contentAsString; finally if (is != null) is.close(); public String readIt(InputStream stream) throws IOException "); return url<1>;public String decode(String in) String working = in; int index; index = working.indexOf("\u"); while (index > -1) int length = working.length(); if (index > (length - 6)) break; int numStart = index + 2; int numFinish = numStart + 4; String substring = working.substring(numStart, numFinish); int number = Integer.parseInt(substring, 16); String stringStart = working.substring(0, index); String stringEnd = working.substring(numFinish); working = stringStart + ((char) number) + stringEnd; index = working.indexOf("\u"); return working;