2014-11-10 12:21:03 +01:00
|
|
|
package org.geneanet.customcamera;
|
|
|
|
|
|
2014-11-14 16:05:50 +01:00
|
|
|
import XXX_NAME_CURRENT_PACKAGE_XXX.CameraView;
|
2014-11-10 12:21:03 +01:00
|
|
|
import org.apache.cordova.CordovaPlugin;
|
|
|
|
|
import org.apache.cordova.CallbackContext;
|
|
|
|
|
import org.json.JSONArray;
|
|
|
|
|
import org.json.JSONException;
|
|
|
|
|
|
|
|
|
|
import android.content.Intent;
|
2014-11-18 17:03:11 +01:00
|
|
|
import android.os.Bundle;
|
2014-11-10 12:21:03 +01:00
|
|
|
|
|
|
|
|
public class CameraLauncher extends CordovaPlugin {
|
|
|
|
|
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
2014-11-14 16:05:50 +01:00
|
|
|
Intent intent = new Intent(this.cordova.getActivity(), CameraView.class);
|
2014-11-18 17:03:11 +01:00
|
|
|
|
|
|
|
|
Bundle imgBase64 = new Bundle();
|
|
|
|
|
imgBase64.putString("imgBase64", "mon base 64");
|
|
|
|
|
intent.putExtras(imgBase64);
|
|
|
|
|
|
2014-11-14 16:05:50 +01:00
|
|
|
cordova.getActivity().startActivity(intent);
|
|
|
|
|
|
2014-11-10 12:21:03 +01:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|