Guest User

LocalCast

a guest
Mar 17th, 2017
914,360
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×