mirror of
https://gitee.com/shuto/customCamera.git
synced 2026-04-14 00:00:03 +08:00
Passage d'un paramètre fixe à l'activité.
This commit is contained in:
@@ -7,10 +7,16 @@ import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class CameraLauncher extends CordovaPlugin {
|
||||
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
|
||||
Intent intent = new Intent(this.cordova.getActivity(), CameraView.class);
|
||||
|
||||
Bundle imgBase64 = new Bundle();
|
||||
imgBase64.putString("imgBase64", "mon base 64");
|
||||
intent.putExtras(imgBase64);
|
||||
|
||||
cordova.getActivity().startActivity(intent);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -32,7 +32,8 @@ public class CameraView extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
|
||||
Bundle currentBundle = this.getIntent().getExtras();
|
||||
String imgBase64 = currentBundle.getString("imgBase64");
|
||||
|
||||
System.out.println("ON RENTRE DANS L'APPLICATION");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user