question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

player.kill() method does not clear notification

See original GitHub issue

When I kill the app it should clear the notification unfortunately does not; the app destroyed but the notification still shown, when I click one of its buttons (previous, pause/play or next) the app raises an NullExceptionError on jcPlayerNotificationReceiver.java here

Info: -I test it on Android 7.0 -App’s configuration still as its in this library (not changed).

Any suggestion that can help fix the issue!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
djsbaacommented, May 19, 2017

You need to find NOTIFICATION_ID in the project and do this protected void onExit() { notificationManager.cancel(NOTIFICATION_ID); }

1reaction
djsbaacommented, May 19, 2017

Check if player not null if its clear notification by your self

Read more comments on GitHub >

github_iconTop Results From Across the Web

In flutter how to clear notification in bar? - Stack Overflow
But you can try this. You can just go to your MainActivity.java in your Android folder, and do something like this. import android.app....
Read more >
Notifications Not Shown - Mobile Push
When an app is in a Force Stopped / Force Killed state most events including FCM messages for push notifications will not be...
Read more >
Resolved - Mobile Notifications - Not working ? - Unity Forum
Hello everybody, "Good news" : the notifications will only work when the project is builded with the status "Development Build". But how to...
Read more >
NotificationListenerService - Android Developers
The service should wait for the onListenerConnected() event before performing any operations. The requestRebind(android.content.ComponentName) method is the ...
Read more >
Hiding foreground services notifications in Android - Spiria
However, creating a foreground process requires the permanent display of a notification. While this is not an issue for music players, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found