Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PackageManager pm = context.getPackageManager();
- boolean isInstalled = isPackageInstalled("de.stefanpledl.localcast", pm);
- if(isInstalled){
- openLocalcastPlayer(...);
- }else{
- try {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=de.stefanpledl.localcast")));
- } catch (android.content.ActivityNotFoundException ignored) {
- startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=de.stefanpledl.localcast")));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement