Play Video From Google Driver + Android Code

I have problems opening videos with links from google drive ""

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 = ""; 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




public class MainActivity extends AppCompatActivity {
Overrideprotected void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); String uri = ""; 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;