You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/01/10 23:39:37 UTC

[GitHub] drewrygh opened a new issue #212: mediaStatus and mediaError callbacks not always firing when Android activity is killed

drewrygh opened a new issue #212: mediaStatus and mediaError callbacks not always firing when Android activity is killed
URL: https://github.com/apache/cordova-plugin-media/issues/212
 
 
   When killing an app on Android (by swiping the activity to dismiss it), the plugin seems to behave inconsistently. I've noticed one of two things happens:
   
   A: The expected scenario: both the mediaStatus and mediaError get called. This is ideal, since the media status is likely to go from playing (2) or paused (3), to stopped (4) — and being able to execute code based on these events is useful. I agree with @wspresto though on #194 that it would be nice to distinguish between "normal" stop events, and stop events triggered by the operating system killing the activity.
   
   
   B: The actual scenario: neither the registered mediaStatus nor mediaError callbacks get called.
   
   This is happening fairly inconsistently. It seems to work as expected if you start playing something, pause it, and immediately kill the activity. However, it tends to break if you pause the media, then open a bunch of other apps, lock/unlock the screens a few time, and then kill the activity. Even then, it's only breaking around 25% of the time for me.
   
   I've tested this on an both Android 7.2 and Android 8.1 devices, but I'd expect it's happening elsewhere as well. I'm wondering if the plugin is even getting notified that the activity was destroyed in the onActivityDestroyed handler in the broken scenario.
   
   Happy to provide additional information as needed.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org