带有智能卡集成的phonegap应用程序

ora*_*int 9 android smartcard phonegap-plugins cordova

我有一个phonegap/cordova应用程序,我想用Precise Biometric的智能卡Tactivo阅读器保护.我是智能卡集成的新手,而精确生物识别技术似乎没有非常丰富的文档.但是我发现我需要为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>
Run Code Online (Sandbox Code Playgroud)

www/*.js文件中没有代码

我只想指出正确的方向.谢谢.

Roo*_*nen 0

不,我无法找到一个插件来为您执行此操作,而且很可能根本不存在这样的插件,因为智能卡 Tactivos不太常见。

也就是说,唯一的选择是创建您自己的插件。首先,您需要从Precise Biometrics获取 Precise Mobile Toolkit 详细信息,如其网站所述:

请联系您当地的 Precise Biometrics 代表或发送电子邮件至:partners@precisebiometrics.com 索取免费工具包。

获得工具包后,您只需将实现包装为 Cordova 插件,如 Cordova 文档中所述:一般关于插件特别是关于 Android 插件开发。另请参阅其他支持 Android 的插件以供参考。值得研究的好例子是最常用的插件,例如设备插件(尤其是Android 实现)和文件插件(及其Android 实现)。从这两个开始,第一个更简单,并且很好地展示了如何实现可调用 Java 函数的基本结构,而后一个则提供了更复杂的结构和更多示例。