Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

LocalCast

a guest Mar 17th, 2017 519,736 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. public void openLocalcastPlayer(String url, String title){
  2.        
  3.         Intent intent = new Intent(Intent.ACTION_VIEW);
  4.         Uri videoUri = Uri.parse(url);
  5.         intent.setDataAndType(videoUri, "video/mp4");
  6.         intent.setPackage("de.stefanpledl.localcast");
  7.         intent.putExtra("title", title);
  8.  
  9.         /*
  10.         //Want to add subtitles?
  11.         //remove comment and
  12.         //change method signature to:
  13.         //public void openLocalcastPlayer(String url, String title, String sub)
  14.        
  15.         Parcelable[] parcels = {Uri.parse(sub)};
  16.         Parcelable[] parcelsSub = {Uri.parse(sub)};
  17.         String[] names = {"Portugu√™s"};
  18.  
  19.         intent.putExtra("subs", parcels);
  20.         intent.putExtra("subs.enable", parcelsSub);
  21.         intent.putExtra("subs.name", names);
  22.         */
  23.  
  24.         startActivity(intent);
  25.         this.finish();
  26.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top