PhoneGap: BarcodeScanner Sharing Plugin

左心房为你撑大大i 提交于 2020-01-15 02:45:08

问题


Note:

  1. I wanted to develop IOS and Android application with QR code scanning feature.

  2. I do not own Mac machine, I'm using Netbean/Eclipse in WIndows OS.


Question:

  1. Is it possible to have single codebase written with Eclipse Windows OS + android BarcodeScanner Plugin, and get built into IOS application via Adobe Cloud Build service

Deeply appreciated if someone could give me an advice.


回答1:


If you're using the online compiler of phonegap (Phonegap Build) then it's possible to use a plugin for all supported devices.

Plugins : https://build.phonegap.com/docs/config-xml

In the Config.xml

< gap:plugin >: specifies a PhoneGap plugin for PhoneGap Build to include in your generated apps. At present, to include a plugin, you will to ensure:

the plugin is supported by PhoneGap Build; and any JavaScript script tags are present in your index.html file. More details, including a list of available plugins, are in our plugins documentation.

Goto https://build.phonegap.com/docs/plugins and scroll down to the BarcodeScanner plugin.




回答2:


You can use Barcode scanner plugin. You can reuse the hybrid part on ios. But some basic settings need to be done on ios as well. Try Phonegap build if you want to build for multiple platforms easily.




回答3:


In case this helps anyone: https://github.com/zeroasterisk/PhoneGap-BarcodeScanner-Example-iOS

And specific to your question.

  • All devices can share the same www (html/js/css) directory & sub-dirs
  • All devices need their own unique PhoneGap application and codebase for device code

PhoneGap does the work of bridging the two, the shared WWW codebase, and the device-specific native code.



来源:https://stackoverflow.com/questions/15384252/phonegap-barcodescanner-sharing-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!