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

LocalCast

a guest Mar 17th, 2017 520,279 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. PackageManager pm = context.getPackageManager();
  2. boolean isInstalled = isPackageInstalled("de.stefanpledl.localcast", pm);
  3.  
  4. if(isInstalled){
  5.     openLocalcastPlayer(...);
  6. }else{
  7.     try {
  8.         startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=de.stefanpledl.localcast")));
  9.     } catch (android.content.ActivityNotFoundException ignored) {
  10.         startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=de.stefanpledl.localcast")));
  11.     }
  12. }
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