You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

285 lines
11 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one
  4. or more contributor license agreements. See the NOTICE file
  5. distributed with this work for additional information
  6. regarding copyright ownership. The ASF licenses this file
  7. to you under the Apache License, Version 2.0 (the
  8. "License"); you may not use this file except in compliance
  9. with the License. You may obtain a copy of the License at
  10. http://www.apache.org/licenses/LICENSE-2.0
  11. Unless required by applicable law or agreed to in writing,
  12. software distributed under the License is distributed on an
  13. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. KIND, either express or implied. See the License for the
  15. specific language governing permissions and limitations
  16. under the License.
  17. -->
  18. <plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
  19. xmlns:android="http://schemas.android.com/apk/res/android"
  20. xmlns:rim="http://www.blackberry.com/ns/widgets"
  21. id="cordova-plugin-camera"
  22. version="2.4.1">
  23. <name>Camera</name>
  24. <description>Cordova Camera Plugin</description>
  25. <license>Apache 2.0</license>
  26. <keywords>cordova,camera</keywords>
  27. <repo>https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git</repo>
  28. <issue>https://issues.apache.org/jira/browse/CB/component/12320645</issue>
  29. <dependency id="cordova-plugin-compat" version="^1.1.0" />
  30. <js-module src="www/CameraConstants.js" name="Camera">
  31. <clobbers target="Camera" />
  32. </js-module>
  33. <js-module src="www/CameraPopoverOptions.js" name="CameraPopoverOptions">
  34. <clobbers target="CameraPopoverOptions" />
  35. </js-module>
  36. <js-module src="www/Camera.js" name="camera">
  37. <clobbers target="navigator.camera" />
  38. </js-module>
  39. <!-- firefoxos -->
  40. <platform name="firefoxos">
  41. <config-file target="config.xml" parent="/*">
  42. <feature name="Camera">
  43. <param name="firefoxos-package" value="Camera" />
  44. </feature>
  45. </config-file>
  46. <js-module src="src/firefoxos/CameraProxy.js" name="CameraProxy">
  47. <runs />
  48. </js-module>
  49. </platform>
  50. <!-- android -->
  51. <platform name="android">
  52. <config-file target="res/xml/config.xml" parent="/*">
  53. <feature name="Camera">
  54. <param name="android-package" value="org.apache.cordova.camera.CameraLauncher"/>
  55. </feature>
  56. </config-file>
  57. <config-file target="AndroidManifest.xml" parent="/*">
  58. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  59. </config-file>
  60. <config-file target="AndroidManifest.xml" parent="application">
  61. <provider
  62. android:name="android.support.v4.content.FileProvider"
  63. android:authorities="${applicationId}.provider"
  64. android:exported="false"
  65. android:grantUriPermissions="true" >
  66. <meta-data
  67. android:name="android.support.FILE_PROVIDER_PATHS"
  68. android:resource="@xml/provider_paths"/>
  69. </provider>
  70. </config-file>
  71. <source-file src="src/android/CameraLauncher.java" target-dir="src/org/apache/cordova/camera" />
  72. <source-file src="src/android/CordovaUri.java" target-dir="src/org/apache/cordova/camera" />
  73. <source-file src="src/android/FileHelper.java" target-dir="src/org/apache/cordova/camera" />
  74. <source-file src="src/android/ExifHelper.java" target-dir="src/org/apache/cordova/camera" />
  75. <source-file src="src/android/xml/provider_paths.xml" target-dir="res/xml" />
  76. <js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
  77. <clobbers target="CameraPopoverHandle" />
  78. </js-module>
  79. <framework src="com.android.support:support-v4:24.1.1+" />
  80. </platform>
  81. <!-- amazon-fireos -->
  82. <platform name="amazon-fireos">
  83. <config-file target="res/xml/config.xml" parent="/*">
  84. <feature name="Camera">
  85. <param name="android-package" value="org.apache.cordova.camera.CameraLauncher"/>
  86. </feature>
  87. </config-file>
  88. <config-file target="AndroidManifest.xml" parent="/*">
  89. <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  90. </config-file>
  91. <source-file src="src/android/CameraLauncher.java" target-dir="src/org/apache/cordova/camera" />
  92. <source-file src="src/android/FileHelper.java" target-dir="src/org/apache/cordova/camera" />
  93. <source-file src="src/android/ExifHelper.java" target-dir="src/org/apache/cordova/camera" />
  94. <js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
  95. <clobbers target="CameraPopoverHandle" />
  96. </js-module>
  97. </platform>
  98. <!-- ubuntu -->
  99. <platform name="ubuntu">
  100. <config-file target="config.xml" parent="/*">
  101. <feature name="Camera">
  102. <param policy_group="camera" policy_version="1" />
  103. </feature>
  104. </config-file>
  105. <js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
  106. <clobbers target="CameraPopoverHandle" />
  107. </js-module>
  108. <header-file src="src/ubuntu/camera.h" />
  109. <source-file src="src/ubuntu/camera.cpp" />
  110. <resource-file src="src/ubuntu/back.png" />
  111. <resource-file src="src/ubuntu/CaptureWidget.qml" />
  112. <resource-file src="src/ubuntu/shoot.png" />
  113. <resource-file src="src/ubuntu/toolbar-left.png" />
  114. <resource-file src="src/ubuntu/toolbar-middle.png" />
  115. <resource-file src="src/ubuntu/toolbar-right.png" />
  116. </platform>
  117. <!-- ios -->
  118. <platform name="ios">
  119. <config-file target="config.xml" parent="/*">
  120. <feature name="Camera">
  121. <param name="ios-package" value="CDVCamera" />
  122. </feature>
  123. <preference name="CameraUsesGeolocation" value="false" />
  124. </config-file>
  125. <js-module src="www/ios/CameraPopoverHandle.js" name="CameraPopoverHandle">
  126. <clobbers target="CameraPopoverHandle" />
  127. </js-module>
  128. <header-file src="src/ios/UIImage+CropScaleOrientation.h" />
  129. <source-file src="src/ios/UIImage+CropScaleOrientation.m" />
  130. <header-file src="src/ios/CDVCamera.h" />
  131. <source-file src="src/ios/CDVCamera.m" />
  132. <header-file src="src/ios/CDVJpegHeaderWriter.h" />
  133. <source-file src="src/ios/CDVJpegHeaderWriter.m" />
  134. <header-file src="src/ios/CDVExif.h" />
  135. <framework src="ImageIO.framework" weak="true" />
  136. <framework src="CoreLocation.framework" />
  137. <framework src="CoreGraphics.framework" />
  138. <framework src="AssetsLibrary.framework" />
  139. <framework src="MobileCoreServices.framework" />
  140. <framework src="CoreGraphics.framework" />
  141. <framework src="AVFoundation.framework" />
  142. <preference name="CAMERA_USAGE_DESCRIPTION" default=" " />
  143. <config-file target="*-Info.plist" parent="NSCameraUsageDescription">
  144. <string>$CAMERA_USAGE_DESCRIPTION</string>
  145. </config-file>
  146. <preference name="PHOTOLIBRARY_USAGE_DESCRIPTION" default=" " />
  147. <config-file target="*-Info.plist" parent="NSPhotoLibraryUsageDescription">
  148. <string>$PHOTOLIBRARY_USAGE_DESCRIPTION</string>
  149. </config-file>
  150. <config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription">
  151. <string></string>
  152. </config-file>
  153. </platform>
  154. <!-- blackberry10 -->
  155. <platform name="blackberry10">
  156. <source-file src="src/blackberry10/index.js" target-dir="Camera" />
  157. <config-file target="www/config.xml" parent="/widget">
  158. <feature name="Camera" value="Camera"/>
  159. </config-file>
  160. <config-file target="www/config.xml" parent="/widget/rim:permissions">
  161. <rim:permit>access_shared</rim:permit>
  162. <rim:permit>use_camera</rim:permit>
  163. </config-file>
  164. <js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
  165. <clobbers target="CameraPopoverHandle" />
  166. </js-module>
  167. <asset src="www/blackberry10/assets" target="chrome" />
  168. </platform>
  169. <!-- wp7 -->
  170. <platform name="wp7">
  171. <config-file target="config.xml" parent="/*">
  172. <feature name="Camera">
  173. <param name="wp-package" value="Camera"/>
  174. </feature>
  175. </config-file>
  176. <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
  177. <Capability Name="ID_CAP_ISV_CAMERA" />
  178. <Capability Name="ID_CAP_MEDIALIB" />
  179. </config-file>
  180. <source-file src="src/wp/Camera.cs" />
  181. <js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
  182. <clobbers target="CameraPopoverHandle" />
  183. </js-module>
  184. </platform>
  185. <!-- wp8 -->
  186. <platform name="wp8">
  187. <config-file target="config.xml" parent="/*">
  188. <feature name="Camera">
  189. <param name="wp-package" value="Camera"/>
  190. </feature>
  191. </config-file>
  192. <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities">
  193. <Capability Name="ID_CAP_ISV_CAMERA" />
  194. <Capability Name="ID_CAP_MEDIALIB_PHOTO"/>
  195. </config-file>
  196. <source-file src="src/wp/Camera.cs" />
  197. <js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
  198. <clobbers target="CameraPopoverHandle" />
  199. </js-module>
  200. </platform>
  201. <!-- windows8 -->
  202. <platform name="windows8">
  203. <config-file target="package.appxmanifest" parent="/Package/Capabilities">
  204. <Capability Name="picturesLibrary" />
  205. <DeviceCapability Name="webcam" />
  206. </config-file>
  207. <js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
  208. <clobbers target="CameraPopoverHandle" />
  209. </js-module>
  210. <js-module src="src/windows/CameraProxy.js" name="CameraProxy">
  211. <runs />
  212. </js-module>
  213. </platform>
  214. <!-- browser -->
  215. <platform name="browser">
  216. <config-file target="config.xml" parent="/*">
  217. <feature name="Camera">
  218. <param name="browser-package" value="Camera" />
  219. </feature>
  220. </config-file>
  221. <js-module src="src/browser/CameraProxy.js" name="CameraProxy">
  222. <runs />
  223. </js-module>
  224. </platform>
  225. <!-- windows -->
  226. <platform name="windows">
  227. <config-file target="package.appxmanifest" parent="/Package/Capabilities">
  228. <DeviceCapability Name="webcam" />
  229. </config-file>
  230. <js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
  231. <clobbers target="CameraPopoverHandle" />
  232. </js-module>
  233. <js-module src="src/windows/CameraProxy.js" name="CameraProxy">
  234. <runs />
  235. </js-module>
  236. </platform>
  237. </plugin>