audio player didn't always play external files correctly

This commit is contained in:
daniel oeh 2013-03-10 19:47:10 +01:00
parent fc156782f4
commit ba1c434b1d
1 changed files with 8 additions and 1 deletions

View File

@ -88,7 +88,8 @@ public class AudioplayerActivity extends MediaplayerActivity {
if (AppConfig.DEBUG)
Log.d(TAG, "Received VIEW intent: "
+ intent.getData().getPath());
ExternalMedia media = new ExternalMedia(intent.getData().getPath(), MediaType.AUDIO);
ExternalMedia media = new ExternalMedia(intent.getData().getPath(),
MediaType.AUDIO);
Intent launchIntent = new Intent(this, PlaybackService.class);
launchIntent.putExtra(PlaybackService.EXTRA_PLAYABLE, media);
launchIntent.putExtra(PlaybackService.EXTRA_START_WHEN_PREPARED,
@ -100,6 +101,12 @@ public class AudioplayerActivity extends MediaplayerActivity {
}
}
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
}
@Override
protected void onAwaitingVideoSurface() {
startActivity(new Intent(this, VideoplayerActivity.class));