【发布时间】:2015-04-14 18:02:26
【问题描述】:
我有一个 phonegap/cordova 应用程序,我想使用 Precise Biometric 的 Smart Card Tactivo 读卡器来保护它。我对智能卡集成非常陌生,Precise Biometrics 似乎没有非常丰富的文档。但是我发现我需要为 phonegap 创建自己的插件才能使用读卡器。
我的问题是:是否已经为此创建了插件,或者有人可以发布我需要的插件代码示例吗?
到目前为止,我的 plugin.xml 文件中有这段代码:
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:rim="http://www.blackberry.com/ns/widgets"
xmlns:android="http://schemas.android.com/apk/res/android"
id="cordova-plugin-device"
version="1.0.0-dev">
<name>smartCard</name>
<description>Cordova smartCard Plugin</description>
<license>Apache 2.0</license>
<keywords>cordova,smartCard</keywords>
<repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git</repo>
<issue>https://issues.apache.org/jira/browse/CB/component/12320648</issue>
<js-module src="www/smartCard.js" name="smartCard">
<clobbers target="smartCard" />
</js-module>
...
<!-- android -->
<platform name="android">
<config-file target="res/xml/config.xml" parent="/*">
<feature name="smartCard" >
<param name="android-package" value="org.apache.cordova.smartCard.SMARDCARD"/>
</feature>
</config-file>
<config-file target="AndroidManifest.xml" parent="/*">
<uses-permission android:name="com.precisebiometrics.android.mtk.manager.permission.BIOMETRIC_DATA" />
</config-file>
<source-file src="src/android/smartCard.java" target-dir="src/org/apache/cordova/smartCard" />
<js-module src="www/smartCardHandle.js" name="smartCardHandle">
<clobbers target="smartCardrHandle" />
</js-module>
</platform>
并且 www/*.js 文件中没有代码
我只想指出正确的方向。谢谢。
【问题讨论】:
-
如果您要投反对票,请保持礼貌并解释原因。如果你不这样做,我怎么会知道“更好”……
-
我认为投反对票可能是由于缺乏自己的努力来解决这个问题,因为指南在那里可供阅读,而您实际上并没有尝试编写插件部分。
标签: android cordova phonegap-plugins smartcard