Skip to content

Commit

Permalink
make service not sticky, this will make the notification clear on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
jgitlin-nypr committed Sep 30, 2024
1 parent 6803e30 commit 099a76b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
import android.content.pm.ServiceInfo;
import android.graphics.Bitmap;
import android.os.Build;
import android.os.Handler;
import android.os.IBinder;
import android.os.Binder;
import android.os.Looper;
import android.support.v4.media.MediaMetadataCompat;
import android.support.v4.media.session.MediaSessionCompat;
import android.support.v4.media.session.PlaybackStateCompat;
import android.util.Log;

import androidx.core.app.NotificationCompat;
import androidx.core.content.ContextCompat;
Expand Down Expand Up @@ -155,7 +158,8 @@ public void destroy() {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
MediaButtonReceiver.handleIntent(mediaSession, intent);
return super.onStartCommand(intent, flags, startId);
super.onStartCommand(intent, flags, startId);
return Service.START_NOT_STICKY;
}

public void setPlaybackState(int playbackState) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@nypublicradio/capacitor-remote-streamer",
"repository": "git://github.com/nypublicradio/capacitor-remote-streamer.git",
"version": "0.3.5",
"version": "0.3.6",
"description": "Stream remote HLS and MP3 streams on iOS and Android. Capacitor 6.",
"main": "dist/plugin.cjs.js",
"repository": {
Expand Down

0 comments on commit 099a76b

Please sign in to comment.