Blackberry Webworks中出现错误:在任何扩展程序中都找不到功能

时间:2013-04-12 13:57:34

标签: blackberry blackberry-simulator blackberry-webworks

我尝试运行blackberry Webworks project

时遇到错误
[ERROR] Feature cannot be found in any extension(blackberry.media.microphone)

我做了什么:

我使用了名为login.html

的简单html文件

我的应用中没有使用任何类型的音频文件,我也添加了feature,如下所示:

<feature id="blackberry.system" required="true" version="1.0.0.0" />
  <feature id="org.apache.cordova" required="true" version="1.0.0" />
  <feature id="blackberry.find" required="true" version="1.0.0.0" />
  <feature id="blackberry.identity" required="true" version="1.0.0.0" />
  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0" />
  <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
  <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
  <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
  <feature id="blackberry.utils" required="true" version="1.0.0.0" />
  <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
  <feature id="blackberry.app" required="true" version="1.0.0.0" />
  <feature id="blackberry.app.event" required="true" version="1.0.0.0" />
  <feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
  <feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
  <feature id="blackberry.media.camera" />
  <feature id="blackberry.ui.dialog" />
  <feature id="blackberry.connection" />
  <feature id="blackberry.bbm.platform" />
  <feature id="blackberry.invoke.card" />
  <feature id="blackberry.pim.contacts" />
  <feature id="blackberry.ui.contextmenu" />
  <feature id="blackberry.io.filetransfer" />
  <feature id="blackberry.io" />
  <feature id="blackberry.invoke" />
  <feature id="blackberry.invoked" />
  <feature id="blackberry.push" />
  <feature id="blackberry.media.microphone"/>

  <!-- Cordova API -->
  <access subdomains="true" uri="file:///store/home/user/voicenotes/" />
  <access subdomains="true" uri="file:///SDCard" />

  <!-- Expose access to all URIs, including the file and http protocols -->
  <access subdomains="true" uri="*" />

  <icon rim:hover="false" src="res/icon/blackberry/icon-80.png" />
  <icon rim:hover="true" src="res/icon/blackberry/icon-80.png" />

  <rim:loadingScreen backgroundColor="#CFCFCF"
                     foregroundImage="res/screen/blackberry/screen-225.png"
             onFirstLaunch="true">
    <rim:transitionEffect type="fadeOut" />
  </rim:loadingScreen>

  <content src ="login.html" />

  <rim:permissions>
    <rim:permit>use_camera</rim:permit>
    <rim:permit>read_device_identifying_information</rim:permit>
    <rim:permit>access_shared</rim:permit>
    <rim:permit>read_geolocation</rim:permit>
    <rim:permit>record_audio</rim:permit> 
    <rim:permit>access_pimdomain_contacts</rim:permit> 
  </rim:permissions>

我没弄清楚错误发生的原因!!任何人都可以帮助我@Thanks

1 个答案:

答案 0 :(得分:1)

这意味着您正在尝试使用不兼容的API(麦克风)。 BlackBerry OS 5.0+和PlayBook支持microphone API,但BlackBerry 10不支持。{/ p>

<feature id="blackberry.media.microphone"/>

BlackBerry 10 Webworks SDK将正确报告它无法识别此功能,因为麦克风现在是HTML5标准。

对于BlackBerry 10,您应使用HTML5 standard getUserMedia()使用麦克风录制。