0

当我尝试运行时出现错误blackberry Webworks project

[ERROR] Feature cannot be found in any extension(blackberry.media.microphone)

我做了什么:

我使用了简单的 html 文件,名为login.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>

我没有弄清楚为什么会发生错误!有人可以帮我吗@谢谢

4

1 回答 1

1

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

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

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

对于 BlackBerry 10,您应该使用HTML5 标准 getUserMedia()来使用麦克风进行录制。

于 2013-04-16T13:40:26.940 回答