Note that there are some explanatory texts on larger screens.

plurals
  1. POProblems Recording with blackBerry.meda.microphone in BlackBerry WebWorks Application
    primarykey
    data
    text
    <p>I am developing a BB WebWorks application (targeting BlackBerry OS 6.0+) and I need to record audio using the device microphone. I've thoroughly read the <a href="http://www.blackberry.com/developers/docs/webworks/api/blackberry.media.microphone.html" rel="nofollow">blackberry.media.microphone</a> documentation but its not clear WHERE I should be recording TO or where the application is ALLOWED to record to? </p> <p>When I do try and record something to either </p> <pre><code>file://SDCard/ </code></pre> <p>or </p> <pre><code>file://store/home/user/voicenotes/ </code></pre> <p>for example the onError callback function is executed and I get the following...</p> <p>ErroCode: "-1"</p> <p>ErrorMessage: "<strong>This application is not allowed to access controlled network resources</strong>".</p> <p>Here's my page...</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;script type="text/javascript"&gt; function record() { try { blackberry.media.microphone.record("file://SDCard/audiofile.amr", recordSuccess, recordError); } catch (e) { alert('Record, e:' + e.message); } } function recordSuccess(filePath) { alert("Recorded successfully! File: " + filePath); } function recordError(errorCode, errorMessage) { alert('error code:' + errorCode + ' error message:' + errorMessage); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;button id="record" onclick="record();"&gt;Record&lt;/button&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>and my config.xml...</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;widget xmlns="http://www.w3.org/ns/widgets" xmlns:rim="http://www.blackberry.com/ns/widgets" version="1.0.0" rim:header="RIM-Widget:rim/widget"&gt; &lt;name&gt;Test Microphone app&lt;/name&gt; &lt;content src="index.htm" /&gt; &lt;action&gt;access_shared&lt;/action&gt; &lt;permission&gt;access_shared&lt;/permission&gt; &lt;feature id="blackberry.app" /&gt; &lt;feature id="blackberry.identity" /&gt; &lt;feature id="blackberry.identity.phone" /&gt; &lt;feature id="blackberry.io.dir" /&gt; &lt;feature id="blackberry.io.file" /&gt; &lt;feature id="blackberry.media.microphone" /&gt; &lt;feature id="blackberry.system" /&gt; &lt;feature id="blackberry.ui.dialog" /&gt; &lt;feature id="blackberry.ui.menu" /&gt; &lt;feature id="blackberry.utils" /&gt; &lt;/widget&gt; </code></pre> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload