mirror of
https://gitee.com/shuto/customCamera.git
synced 2026-04-14 00:00:03 +08:00
On tente de tout mettre sous forme de librairie et de les exploiter dans notre classe par la suite.
This commit is contained in:
16
plugin.xml
16
plugin.xml
@@ -22,22 +22,10 @@
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
</config-file>
|
||||
|
||||
<source-file src="src/android/CustomCamera.jar" target-dir="libs" framework="true" />
|
||||
<source-file
|
||||
src="src/android/src/org/geneanet/customcamera/CameraLauncher.java"
|
||||
src="src/android/CameraLauncher.java"
|
||||
target-dir="src/org/geneanet/customcamera"
|
||||
/>
|
||||
<source-file
|
||||
src="src/android/src/org/geneanet/customcamera/CameraView.java"
|
||||
target-dir="src/org/geneanet/customcamera"
|
||||
/>
|
||||
|
||||
<source-file
|
||||
src="src/android/src/org/geneanet/customcamera/utils/CameraPreview.java"
|
||||
target-dir="src/org/geneanet/customcamera/utils"
|
||||
/>
|
||||
<source-file
|
||||
src="src/android/src/org/geneanet/customcamera/utils/CustomCamera.java"
|
||||
target-dir="src/org/geneanet/customcamera/utils"
|
||||
/>
|
||||
</platform>
|
||||
</plugin>
|
||||
22
src/android/CameraLauncher.java
Normal file
22
src/android/CameraLauncher.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package org.geneanet.customcamera;
|
||||
|
||||
import org.apache.cordova.CordovaPlugin;
|
||||
import org.apache.cordova.CallbackContext;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
public class CameraLauncher extends CordovaPlugin {
|
||||
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
||||
Intent intent = new Intent("org.geneanet.customcamera.CameraView");
|
||||
cordova.startActivityForResult((CordovaPlugin) this, intent, 1111111);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void testAction()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
BIN
src/android/CustomCamera.jar
Normal file
BIN
src/android/CustomCamera.jar
Normal file
Binary file not shown.
@@ -1,22 +0,0 @@
|
||||
package org.geneanet.customcamera;
|
||||
|
||||
import org.apache.cordova.CordovaPlugin;
|
||||
import org.apache.cordova.CallbackContext;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
public class CameraLauncher extends CordovaPlugin {
|
||||
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
||||
Intent intent = new Intent("org.geneanet.customcamera.CameraView");
|
||||
cordova.startActivityForResult((CordovaPlugin) this, intent, 1111111);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void testAction()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user