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)
|
if (AppConfig.DEBUG)
|
||||||
Log.d(TAG, "Received VIEW intent: "
|
Log.d(TAG, "Received VIEW intent: "
|
||||||
+ intent.getData().getPath());
|
+ 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);
|
Intent launchIntent = new Intent(this, PlaybackService.class);
|
||||||
launchIntent.putExtra(PlaybackService.EXTRA_PLAYABLE, media);
|
launchIntent.putExtra(PlaybackService.EXTRA_PLAYABLE, media);
|
||||||
launchIntent.putExtra(PlaybackService.EXTRA_START_WHEN_PREPARED,
|
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
|
@Override
|
||||||
protected void onAwaitingVideoSurface() {
|
protected void onAwaitingVideoSurface() {
|
||||||
startActivity(new Intent(this, VideoplayerActivity.class));
|
startActivity(new Intent(this, VideoplayerActivity.class));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user