-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listen for the X icon action from the cast notification #73
Comments
Yep, I agree that it should also trigger that event with This was not something I tested. The second picture, is that from an Android home screen? Or the locked screen? If it is on the locked screen, it might be a bit difficult to get the event triggered (since the app might not be running). Not sure. |
That wasn't the locks creen, just the notification when I slide down the screen (having the app open behind) The pause icon does trigger its event. |
Ooh okay! Well it should be fairly easy to get that work properly then I think/hope. (I’m guessing the close event is being ignored on the native side for some reason. Or maybe the notification close/stop casting event needs a different listener.) I won’t have time for quite awhile (3 weeks+) to look at this. If you are interested in fixing this, I can point you at code sections that I think would be relevant. |
Oh ok! Yes, I could take a look in the meantime, can provide me some hints? Thanks! |
Yep! I think your best bet is about here: In particular: @Override
public void onApplicationDisconnected(int i) {
clientListener.onSessionEnd(
ChromecastUtilities.createSessionObject(session, "stopped"));
} My guess is that this event isn't being triggered.
|
I am working on some chromecast stuff now, @julianCast if you have had any luck with figuring this out, please let me know! (I will hopefully be able to test and add it) |
I am right now looking into it, but so far is not something obvious, the |
Debuggin here: https://github.com/jellyfin/cordova-plugin-chromecast/blob/master/www/chrome.cast.js#L1439 When I quit the session within the app I get as eventname: When I quit the session using the notification I do get something, but only: |
(I finally got around to try it myself, can confirm that it doesn't work right) Interesting, so it looks like it is half working. :/ If you find anything else please let me know! (I am on a very tight time schedule so I'm not sure if I will be able to get to it on my own) |
…ing button: Add tests for stop casting and pause from push notification
Hi again! I'm almost done!
Here is the thing...I'm able to successfully listen to the event from the STOP CASTING button using:
But I'm not able when I touch the X in the cast notification. As far as I understand that stop the session too.
Thanks !!
The text was updated successfully, but these errors were encountered: