audio player didn't always play external files correctly
This commit is contained in:
parent
fc156782f4
commit
ba1c434b1d
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue