开发者

beep sound for webview

开发者 https://www.devze.com 2023-03-23 12:59 出处:网络
I am working on the webview . I am fetching some graph values from the database and on the basis of these values there is a beep in webpage. In the exploreits works fine for me but when i am calling t

I am working on the webview . I am fetching some graph values from the database and on the basis of these values there is a beep in webpage. In the explore its works fine for me but when i am calling this page in webview the other things are fine but there is no beep sound . Please guide . I am calling sound in the following way

    if($i开发者_JS百科nfo['sensor_a']<=10)
    {echo"" ;
$file='beep.wav';
echo "<embed src =\"$file\" hidden=\"true\" autostart=\"true\"></embed>";
    }
    ?></span></td>


In order to do this, there are several steps:

If beep.wav is stored locally, you must use a ContentProvider in order to fetch the file.

You then have to embed a javascript hook for a callback to the Android system.

I hope this helps, please check out the documentation for specific examples of these two functions.

0

精彩评论

暂无评论...
验证码 换一张
取 消