玩瞳文档中心


集成指南

<p>该文档是对sdk的集成准备工作及一些事项进行说明,一个完整的demo项目请参考开发包中的示例程序PictureBook-demo。</p> <h3>1. 准备工作</h3> <p>在使用sdk之前,请联系玩瞳科技索取授权码Key。在使用过程中需联系玩瞳客服人员确认机型是否配置,对机型进行适配才能达到最优识别效果。</p> <h3>2. 添加SDK到工程</h3> <p>fingersdk以AndroidStudio开发方式提供,以下介绍在android studio开发工具导入绘本sdk,<strong>fdslite文件需向玩瞳客服提供app的包名及SHA1后打包</strong>。</p> <ol> <li> <p>拷贝 .aar 文件到项目下的 lib 文件夹;</p> </li> <li> <p>修改 build.gradle 文件,引入aar 文件;</p> <pre><code class="language-gradle">// 添加依赖:引入第三库文件 allprojects { repositories { flatDir { dirs 'libs' } google() } } dependencies { ... // visiontalk // 新增--start implementation 'com.google.android.exoplayer:exoplayer-core:2.18.7' // 新增--end implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation 'com.squareup.retrofit2:adapter-rxjava2:2.7.2' implementation 'io.reactivex.rxjava2:rxjava:2.2.18' implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' implementation (name: 'basesdk', ext: 'aar') implementation (name: 'vtbrsdk', ext: 'aar') implementation (name: 'offlinefinger', ext: 'aar') implementation (name: 'vtloginsdk', ext: 'aar') implementation (name: 'fdslite', ext: 'aar') configurations.all { exclude group: 'com.android.support', module: 'support-v13' } ... }</code></pre> </li> <li>make project;</li> </ol> <h3>3. 权限声明</h3> <table> <thead> <tr> <th>权限名称</th> <th>用途</th> </tr> </thead> <tbody> <tr> <td>android.permission.CAMERA</td> <td>允许调用相机进行预览和拍照</td> </tr> <tr> <td>android.permission.READ_EXTERNAL_STORAGE</td> <td>读取sdk所需的文件(数据模型等)</td> </tr> <tr> <td>android.permission.WRITE_EXTERNAL_STORAGE</td> <td>写入sdk所需的文件(数据模型等)</td> </tr> <tr> <td>android.permission.INTERNET</td> <td>网络访问,用于license校验、资源包更新下载等操作</td> </tr> </tbody> </table> <h3>4. 运行Demo示例</h3> <p>使用 AndroidStudio 打开 demo 项目工程,将玩瞳授予的license.lcs文件中的内容拷贝,赋值BRBaseActivity中的LICENSE变量,Build project 后 run 即可。</p> <pre><code class="language-java">public class BRBaseActivity { private static final String LICENSE = &amp;quot;license&amp;quot;; }</code></pre> <h2></h2>

页面列表

ITEM_HTML