Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
Posts: 15
Registered: ‎02-25-2013
My Device: bbz10
My Carrier: Swisscom

WebView postMessage does not work when screen is off

Hello,

I code an application Audio Player which use the WebView to embed an existing html5 app. The Html5 app contains some javascript function to get Song Url to play

I use the method postMessage From c++ to WebView and back from WebView to c++.to call the html5 app functions like getNextSoundUrl, getPrevSongUrl, etc...

I use a NowPlaying control to enable next and prev song with the volume button. Every things worked well until Software Release 10.1.0.4181 and OS Version 10.1.04633

Now when the device screen goes off, messages sent via postmessage are not received until the screen goes on again.

So when a song reach the end, my code send a message to the webview to get the next song url to play, but if the screen is off for more than 10 seconds, i have to swipe the screen to turn it on, and then all waiting messages are processed.

I hope you will understand my problem and have any suggestion ?

Contributor
Posts: 15
Registered: ‎02-25-2013
My Device: bbz10
My Carrier: Swisscom

Re: WebView postMessage does not work when screen is off

I have try to use evaluateJavascript, but the script to evaluate does nothing when screen is off. I have to turn the screen on to execute the script ?! 

 

I can find anything about that in the documentation ?