From e9b46792c11c343363df5c2b7ef27b3d2002ace7 Mon Sep 17 00:00:00 2001 From: Jarred Witt Date: Mon, 26 Aug 2019 10:37:43 -0700 Subject: [PATCH] fix(java): Move stopForegroundService() to onStop event (#294) --- .../java/com/tanguyantoine/react/MusicControlEventEmitter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/tanguyantoine/react/MusicControlEventEmitter.java b/android/src/main/java/com/tanguyantoine/react/MusicControlEventEmitter.java index 2b26e6e0..e4ecbeea 100644 --- a/android/src/main/java/com/tanguyantoine/react/MusicControlEventEmitter.java +++ b/android/src/main/java/com/tanguyantoine/react/MusicControlEventEmitter.java @@ -38,11 +38,11 @@ public void onPlay() { } public void onPause() { - stopForegroundService(); sendEvent(context, "pause", null); } public void onStop() { + stopForegroundService(); sendEvent(context, "stop", null); }