plugin.xml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?xml version='1.0' encoding='utf-8'?>
  2. <plugin id="cordova-plugin-qrcode-scanner" version="1.0.0"
  3. xmlns="http://apache.org/cordova/ns/plugins/1.0"
  4. xmlns:android="http://schemas.android.com/apk/res/android">
  5. <name>qrCodeScanner</name>
  6. <js-module name="qrCodeScanner" src="www/qrCodeScanner.js">
  7. <clobbers target="qrCodeScanner" />
  8. </js-module>
  9. <platform name="android">
  10. <config-file parent="/*" target="res/xml/config.xml">
  11. <feature name="qrCodeScanner">
  12. <param name="android-package" value="cn.x1ongzhu.qrCodeScanner.qrCodeScanner" />
  13. </feature>
  14. </config-file>
  15. <config-file parent="/*" target="AndroidManifest.xml">
  16. <uses-permission android:name="android.permission.CAMERA" />
  17. <uses-permission android:name="android.permission.FLASHLIGHT" />
  18. </config-file>
  19. <config-file parent="/manifest/application" target="AndroidManifest.xml">
  20. <activity android:name="cn.x1ongzhu.qrCodeScanner.ScanActivity" />
  21. </config-file>
  22. <source-file src="src/android/qrCodeScanner.java" target-dir="src/cn/x1ongzhu/qrCodeScanner" />
  23. <source-file src="src/android/ScanActivity.java" target-dir="src/cn/x1ongzhu/qrCodeScanner" />
  24. <source-file src="src/android/res/layout/activity_scan.xml" target-dir="res/layout" />
  25. <source-file src="src/android/res/drawable/ic_flash.xml" target-dir="res/drawable" />
  26. <source-file src="src/android/res/drawable-xhdpi/ic_shortcut_flash_off.png" target-dir="res/drawable-xhdpi" />
  27. <source-file src="src/android/res/drawable-xhdpi/ic_shortcut_flash_on.png" target-dir="res/drawable-xhdpi" />
  28. <source-file src="src/android/res/drawable-xhdpi/prev.png" target-dir="res/drawable-xhdpi" />
  29. <source-file src="src/android/res/drawable-xxhdpi/ic_shortcut_flash_off.png" target-dir="res/drawable-xxhdpi" />
  30. <source-file src="src/android/res/drawable-xxhdpi/ic_shortcut_flash_on.png" target-dir="res/drawable-xxhdpi" />
  31. <source-file src="src/android/res/drawable-xxhdpi/prev.png" target-dir="res/drawable-xxhdpi" />
  32. <source-file src="src/android/res/drawable-xxxhdpi/ic_shortcut_flash_off.png" target-dir="res/drawable-xxxhdpi" />
  33. <source-file src="src/android/res/drawable-xxxhdpi/ic_shortcut_flash_on.png" target-dir="res/drawable-xxxhdpi" />
  34. <framework src="com.google.zxing:core:3.3.0" />
  35. <framework src="cn.bingoogolapple:bga-qrcodecore:1.1.9@aar" />
  36. <framework src="cn.bingoogolapple:bga-zxing:1.1.9@aar" />
  37. </platform>
  38. <platform name="ios">
  39. <config-file parent="/*" target="config.xml">
  40. <feature name="qrCodeScanner">
  41. <param name="ios-package" value="qrCodeScanner" />
  42. </feature>
  43. </config-file>
  44. <config-file target="*-Info.plist" parent="NSCameraUsageDescription">
  45. <string>需要相机权限</string>
  46. </config-file>
  47. <source-file src="src/ios/qrCodeScanner.m" />
  48. <source-file src="src/ios/ScanViewController.h" />
  49. <source-file src="src/ios/ScanViewController.m" />
  50. <resource-file src="src/ios/qrCodeScanner.bundle"/>
  51. </platform>
  52. </plugin>