9
0
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:
Christophe BOUCAUT
2014-11-18 17:03:11 +01:00
parent 4752cbb808
commit e1c095f394
2 changed files with 8 additions and 1 deletions
+6
View File
@@ -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");