Navigation

    Monaca & Onsen UI
    • Register
    • Login
    • Search
    • Tags
    • Users
    • Blog
    • Playground
    1. Home
    2. Pythabulas
    P
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups
    Save
    Saving

    Pythabulas

    @Pythabulas

    0
    Reputation
    1
    Posts
    421
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Pythabulas Follow

    Posts made by Pythabulas

    • Crosswalk WebView does not raise visibilitychange events on Android when exiting / returning to app

      I am using the Crosswalk WebView Engine plugin, configured as the latest Crosswalk version (23.53.589.4) and Plugin Version 2.1.0 (I’m not using the latest version of 2.3.0 because of a build error, for which I’ve also logged a ticket).

      I am trying to use the webkitvisibilitychange event as described here, to control my app state when exiting / returning to my app via the Android Home / Recent Apps buttons:

      https://github.com/crosswalk-project/crosswalk-website/wiki/How-to-pause-play-audio-when-application-is-switched-to-background

      I have added event listeners (using document.addEventListener) for both visibilitychange and webkitvisibilitychange. Without the CrossWalk plugin enabled (using the standard Android WebView), the visibilitychange event is raised as expected when I exit my app using the Home or Recent Apps buttons, and when I return to my app. I use this in conjunction with document.visibilityState to suspend my app (a game) properly. With CrossWalk enabled (which I need, for the performance) the game keeps running, including the sound.

      Is this a bug?

      posted in Developer Corner
      P
      Pythabulas