I am making a Chrome extension that receives Google Chrome cloud messages. I want to detect when a computer wakes up from sleep / connects to the Internet, so that my application can start receiving messages again. In my specific case, I don't want GCM to throttle the click, so I set ttl to 0, which is being delivered now or never. (The user device will never receive a message while idle.)
In javascript, how to detect when the Chrome browser is recovering from the idle state?
More specifically, how could I do this in a Chrome extension using chrome. api calls?
source
share