mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-01-18 19:22:51 +08:00
updated plugin.xml, native src files
This commit is contained in:
parent
c6174ce211
commit
0b6342e56c
33
plugin.xml
33
plugin.xml
@ -6,25 +6,31 @@ id="org.apache.cordova.core.CameraLauncher"
|
||||
version="0.1.0">
|
||||
<name>Camera</name>
|
||||
|
||||
<js-module src="www/CameraConstants.js" name="camera">
|
||||
<clobbers target="window.camera" />
|
||||
</js-module>
|
||||
|
||||
<js-module src="www/CameraPopoverOptions.js" name="camera">
|
||||
<clobbers target="window.camera" />
|
||||
</js-module>
|
||||
|
||||
<js-module src="www/Camera.js" name="camera">
|
||||
<clobbers target="navigator.camera" />
|
||||
</js-module>
|
||||
|
||||
<js-module src="www/CameraConstants.js" name="Camera">
|
||||
<clobbers target="Camera" />
|
||||
</js-module>
|
||||
|
||||
<js-module src="www/CameraPopoverOptions.js" name="CameraPopoverOptions">
|
||||
<clobbers target="CameraPopoverOptions" />
|
||||
</js-module>
|
||||
|
||||
<js-module src="www/CameraPopoverHandle.js" name="CameraPopoverHandle">
|
||||
<merges target="CameraPopoverHandle" />
|
||||
</js-module>
|
||||
|
||||
<!-- android -->
|
||||
<platform name="android">
|
||||
<config-file target="res/xml/config.xml" parent="/cordova/plugins">
|
||||
<plugin name="Camera" value="org.apache.cordova.core"/>
|
||||
<config-file target="res/xml/config.xml" parent="/*">
|
||||
<feature name="Camera"
|
||||
<param name="android-package" value="org.apache.cordova.core"/>
|
||||
</feature>
|
||||
</config-file>
|
||||
|
||||
<source-file src="CameraLauncher.java" target-dir="org/apache/cordova/core" />
|
||||
<source-file src="src/android/CameraLauncher.java" target-dir="src/org/apache/cordova/core" />
|
||||
</platform>
|
||||
|
||||
<!-- ios -->
|
||||
@ -34,6 +40,11 @@ id="org.apache.cordova.core.CameraLauncher"
|
||||
<param name="ios-package" value="CDVCamera" />
|
||||
</feature>
|
||||
</config-file>
|
||||
|
||||
<js-module src="www/ios/CameraPopoverHandle.js" name="CameraPopoverHandle">
|
||||
<merges target="CameraPopoverHandle" />
|
||||
</js-module>
|
||||
|
||||
<header-file src="src/ios/CDVCamera.h" />
|
||||
<source-file src="src/ios/CDVCamera.m" />
|
||||
<header-file src="src/ios/CDVJpegHeaderWriter.h" />
|
||||
|
@ -20,7 +20,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreLocation/CoreLocation.h>
|
||||
#import <CoreLocation/CLLocationManager.h>
|
||||
#import "CDVPlugin.h"
|
||||
#import <Cordova/CDVPlugin.h>
|
||||
|
||||
enum CDVDestinationType {
|
||||
DestinationTypeDataUrl = 0,
|
||||
|
@ -19,9 +19,9 @@
|
||||
|
||||
#import "CDVCamera.h"
|
||||
#import "CDVJpegHeaderWriter.h"
|
||||
#import "NSArray+Comparisons.h"
|
||||
#import "NSData+Base64.h"
|
||||
#import "NSDictionary+Extensions.h"
|
||||
#import <Cordova/NSArray+Comparisons.h>
|
||||
#import <CordovaNSData+Base64.h>
|
||||
#import <Cordova/NSDictionary+Extensions.h>
|
||||
#import <ImageIO/CGImageProperties.h>
|
||||
#import <AssetsLibrary/ALAssetRepresentation.h>
|
||||
#import <ImageIO/CGImageSource.h>
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
var argscheck = require('cordova/argscheck'),
|
||||
exec = require('cordova/exec'),
|
||||
Camera = require('org.apache.cordova.core.CameraConstants'),
|
||||
CameraPopoverHandle = require('org.apache.cordova.core.CameraPopoverHandle');
|
||||
Camera = require('org.apache.cordova.core.CameraLauncher.CameraConstants'),
|
||||
CameraPopoverHandle = require('org.apache.cordova.core.CameraLauncher.CameraPopoverHandle');
|
||||
|
||||
var cameraExport = {};
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
var Camera = require('org.apache.cordova.core.CameraConstants');
|
||||
var Camera = require('org.apache.cordova.core.CameraLauncher.Camera');
|
||||
|
||||
/**
|
||||
* Encapsulates options for iOS Popover image picker
|
||||
|
34
www/ios/CameraPopoverHandle.js
Normal file
34
www/ios/CameraPopoverHandle.js
Normal file
@ -0,0 +1,34 @@
|
||||
/*
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
var exec = require('cordova/exec');
|
||||
|
||||
/**
|
||||
* A handle to an image picker popover.
|
||||
*/
|
||||
var CameraPopoverHandle = function() {
|
||||
this.setPosition = function(popoverOptions) {
|
||||
var args = [ popoverOptions ];
|
||||
exec(null, null, "Camera", "repositionPopover", args);
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = CameraPopoverHandle;
|
Loading…
Reference in New Issue
Block a user