From 45edaca05fef424e2d049ee32d7f1c536df2c866 Mon Sep 17 00:00:00 2001 From: owner Date: Mon, 31 Dec 2012 19:39:20 -0800 Subject: Fixes crash when no external video player is installed --- .../github/daneren2005/dsub/activity/SelectAlbumActivity.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'subsonic-android/src/github/daneren2005') diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java index de92d244..78db07f5 100644 --- a/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java +++ b/subsonic-android/src/github/daneren2005/dsub/activity/SelectAlbumActivity.java @@ -556,7 +556,14 @@ public class SelectAlbumActivity extends SubsonicTabActivity { } else { Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.parse(entry.getPath()), "video/*"); - startActivity(intent); + + List intents = getPackageManager() + .queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY); + if(intents != null && intents.size() > 0) { + startActivity(intent); + }else { + Util.toast(this, R.string.download_no_streaming_player); + } } } private void streamExternalPlayer(MusicDirectory.Entry entry) { -- cgit v1.2.3