【问题标题】:Build Mobile App (Cordova) using Polymer component with camera functionality使用具有相机功能的 Polymer 组件构建移动应用程序 (Cordova)
【发布时间】:2017-12-13 06:52:46
【问题描述】:

我正在使用 Cordova 制作移动应用程序。它使用聚合物 2.0 组件在数据库中创建主/子记录。

I have to add the file upload and camera feature to the same mobile application. 

in index.html I am using polymer component like this :
        <div style="border: 2px solid green;">
            <crud-expense-mobile employee-id='1234'></crud-expense-mobile>
        </div>
    enter code here

This is my first mobile project. Need guidance from experts 

【问题讨论】:

    标签: javascript android html cordova


    【解决方案1】:

    首先,您可以查看 Apache Cordova 的架构。 >>Apache Cordova Architecture

    您应该添加要使用的平台。 >>Add platform

    您可以查看如何添加插件。 >>Add plugins

    拍了照片怎么处理? >> Take a pictureTake a picture example

    :)

    【讨论】:

    • 我必须从聚合物组件中调用相机功能
    【解决方案2】:
    I am trying to use polymer component : refer 
    https://www.webcomponents.org/element/PolymerElements/app-media/elements/app-media-image-capture
    
    Getting error 
    vulcanized-needed-components.html:32222 Uncaught (in promise) Error: ImageCapture instance not ready.
        at HTMLElement.takePhoto (vulcanized-needed-components.html:32222)
        at HTMLElement._addExpenses (crud-expense-mobile.html:232)
        at HTMLElement.handler (vulcanized-needed-components.html:2096)
    

    【讨论】:

      猜你喜欢
      • 2022-11-24
      • 1970-01-01
      • 1970-01-01
      • 2013-08-08
      • 2022-01-08
      • 1970-01-01
      • 1970-01-01
      • 2013-11-20
      • 1970-01-01
      相关资源
      最近更新 更多