Skip to content

Commit 5aca1ed

Browse files
committed
[android] Fixed the app not receiving intent url events
1 parent 322dfd7 commit 5aca1ed

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

android/src/main/java/com/guichaguri/trackplayer/service/MusicManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public MetadataManager getMetadata() {
9292

9393
public void switchPlayback(ExoPlayback playback) {
9494
if(this.playback != null) {
95+
this.playback.stop();
9596
this.playback.destroy();
9697
}
9798

android/src/main/java/com/guichaguri/trackplayer/service/metadata/MetadataManager.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public MetadataManager(MusicService service, MusicManager manager) {
7777
openApp.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);
7878

7979
// Add the Uri data so apps can identify that it was a notification click
80+
openApp.setAction(Intent.ACTION_VIEW);
8081
openApp.setData(Uri.parse("trackplayer://notification.click"));
8182

8283
builder.setContentIntent(PendingIntent.getActivity(context, 0, openApp, PendingIntent.FLAG_CANCEL_CURRENT));

0 commit comments

Comments
 (0)