package reparto_mazapa.keymon.lat;

import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;

public class foto_subs_0 {


public static RemoteObject  _activity_create(RemoteObject _firsttime) throws Exception{
try {
		Debug.PushSubsStack("Activity_Create (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,27);
if (RapidSub.canDelegate("activity_create")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","activity_create", _firsttime);}
Debug.locals.put("FirstTime", _firsttime);
 BA.debugLineNum = 27;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
Debug.ShouldStop(67108864);
 BA.debugLineNum = 28;BA.debugLine="If(FirstTime) Then";
Debug.ShouldStop(134217728);
if ((_firsttime).<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 29;BA.debugLine="g.Initialize(\"GPS\")";
Debug.ShouldStop(268435456);
foto._g.runVoidMethod ("Initialize",(Object)(RemoteObject.createImmutable("GPS")));
 };
 BA.debugLineNum = 31;BA.debugLine="Activity.LoadLayout(\"foto\")";
Debug.ShouldStop(1073741824);
foto.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("foto")),foto.mostCurrent.activityBA);
 BA.debugLineNum = 32;BA.debugLine="c=Starter.skmt.ExecQuery(\"select cuenta from cuen";
Debug.ShouldStop(-2147483648);
foto.mostCurrent._c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), foto.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select cuenta from cuentaa"))));
 BA.debugLineNum = 33;BA.debugLine="c.Position = 0";
Debug.ShouldStop(1);
foto.mostCurrent._c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 34;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
Debug.ShouldStop(2);
foto.mostCurrent._cuenta = foto.mostCurrent._c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA")));
 BA.debugLineNum = 35;BA.debugLine="End Sub";
Debug.ShouldStop(4);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _activity_keypress(RemoteObject _key) throws Exception{
try {
		Debug.PushSubsStack("Activity_KeyPress (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,174);
if (RapidSub.canDelegate("activity_keypress")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","activity_keypress", _key);}
Debug.locals.put("key", _key);
 BA.debugLineNum = 174;BA.debugLine="Sub Activity_KeyPress (key As Int) As Boolean";
Debug.ShouldStop(8192);
 BA.debugLineNum = 176;BA.debugLine="If key=KeyCodes.KEYCODE_BACK Then";
Debug.ShouldStop(32768);
if (RemoteObject.solveBoolean("=",_key,BA.numberCast(double.class, foto.mostCurrent.__c.getField(false,"KeyCodes").getField(true,"KEYCODE_BACK")))) { 
 BA.debugLineNum = 178;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
Debug.ShouldStop(131072);
foto.mostCurrent._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,foto.mostCurrent.activityBA,(Object)(RemoteObject.createImmutable("Principal")));
 };
 BA.debugLineNum = 182;BA.debugLine="Return False";
Debug.ShouldStop(2097152);
if (true) return foto.mostCurrent.__c.getField(true,"False");
 BA.debugLineNum = 183;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _activity_pause(RemoteObject _userclosed) throws Exception{
try {
		Debug.PushSubsStack("Activity_Pause (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,46);
if (RapidSub.canDelegate("activity_pause")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","activity_pause", _userclosed);}
Debug.locals.put("UserClosed", _userclosed);
 BA.debugLineNum = 46;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
Debug.ShouldStop(8192);
 BA.debugLineNum = 47;BA.debugLine="camEx.Release";
Debug.ShouldStop(16384);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_release" /*RemoteObject*/ );
 BA.debugLineNum = 48;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _activity_resume() throws Exception{
try {
		Debug.PushSubsStack("Activity_Resume (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,37);
if (RapidSub.canDelegate("activity_resume")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","activity_resume");}
 BA.debugLineNum = 37;BA.debugLine="Sub Activity_Resume";
Debug.ShouldStop(16);
 BA.debugLineNum = 38;BA.debugLine="InitializeCamera";
Debug.ShouldStop(32);
_initializecamera();
 BA.debugLineNum = 39;BA.debugLine="End Sub";
Debug.ShouldStop(64);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btneffect_click() throws Exception{
try {
		Debug.PushSubsStack("btnEffect_Click (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,138);
if (RapidSub.canDelegate("btneffect_click")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","btneffect_click");}
RemoteObject _effects = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _effect = RemoteObject.createImmutable("");
 BA.debugLineNum = 138;BA.debugLine="Sub btnEffect_Click";
Debug.ShouldStop(512);
 BA.debugLineNum = 139;BA.debugLine="Dim effects As List = camEx.GetSupportedColorEffe";
Debug.ShouldStop(1024);
_effects = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_effects = foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_getsupportedcoloreffects" /*RemoteObject*/ );Debug.locals.put("effects", _effects);Debug.locals.put("effects", _effects);
 BA.debugLineNum = 140;BA.debugLine="If effects.IsInitialized = False Then";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean("=",_effects.runMethod(true,"IsInitialized"),foto.mostCurrent.__c.getField(true,"False"))) { 
 BA.debugLineNum = 141;BA.debugLine="ToastMessageShow(\"Effects not supported.\", False";
Debug.ShouldStop(4096);
foto.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Effects not supported.")),(Object)(foto.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 142;BA.debugLine="Return";
Debug.ShouldStop(8192);
if (true) return RemoteObject.createImmutable("");
 };
 BA.debugLineNum = 144;BA.debugLine="Dim effect As String = effects.Get((effects.Index";
Debug.ShouldStop(32768);
_effect = BA.ObjectToString(_effects.runMethod(false,"Get",(Object)(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_effects.runMethod(true,"IndexOf",(Object)((foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_getcoloreffect" /*RemoteObject*/ )))),RemoteObject.createImmutable(1)}, "+",1, 1)),_effects.runMethod(true,"getSize")}, "%",0, 1))));Debug.locals.put("effect", _effect);Debug.locals.put("effect", _effect);
 BA.debugLineNum = 145;BA.debugLine="camEx.SetColorEffect(effect)";
Debug.ShouldStop(65536);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_setcoloreffect" /*RemoteObject*/ ,(Object)(_effect));
 BA.debugLineNum = 146;BA.debugLine="ToastMessageShow(effect, False)";
Debug.ShouldStop(131072);
foto.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(_effect)),(Object)(foto.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 147;BA.debugLine="camEx.CommitParameters";
Debug.ShouldStop(262144);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_commitparameters" /*RemoteObject*/ );
 BA.debugLineNum = 148;BA.debugLine="End Sub";
Debug.ShouldStop(524288);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btnflash_click() throws Exception{
try {
		Debug.PushSubsStack("btnFlash_Click (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,150);
if (RapidSub.canDelegate("btnflash_click")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","btnflash_click");}
RemoteObject _f = null;
RemoteObject _flashmodes = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _flash = RemoteObject.createImmutable("");
 BA.debugLineNum = 150;BA.debugLine="Sub btnFlash_Click";
Debug.ShouldStop(2097152);
 BA.debugLineNum = 151;BA.debugLine="Dim f() As Float = camEx.GetFocusDistances";
Debug.ShouldStop(4194304);
_f = foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_getfocusdistances" /*RemoteObject*/ );Debug.locals.put("f", _f);Debug.locals.put("f", _f);
 BA.debugLineNum = 152;BA.debugLine="Log(f(0) & \", \" & f(1) & \", \" & f(2))";
Debug.ShouldStop(8388608);
foto.mostCurrent.__c.runVoidMethod ("LogImpl","371106562",RemoteObject.concat(_f.getArrayElement(true,BA.numberCast(int.class, 0)),RemoteObject.createImmutable(", "),_f.getArrayElement(true,BA.numberCast(int.class, 1)),RemoteObject.createImmutable(", "),_f.getArrayElement(true,BA.numberCast(int.class, 2))),0);
 BA.debugLineNum = 153;BA.debugLine="Dim flashModes As List = camEx.GetSupportedFlashM";
Debug.ShouldStop(16777216);
_flashmodes = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_flashmodes = foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_getsupportedflashmodes" /*RemoteObject*/ );Debug.locals.put("flashModes", _flashmodes);Debug.locals.put("flashModes", _flashmodes);
 BA.debugLineNum = 154;BA.debugLine="If flashModes.IsInitialized = False Then";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean("=",_flashmodes.runMethod(true,"IsInitialized"),foto.mostCurrent.__c.getField(true,"False"))) { 
 BA.debugLineNum = 155;BA.debugLine="ToastMessageShow(\"Flash not supported.\", False)";
Debug.ShouldStop(67108864);
foto.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Flash not supported.")),(Object)(foto.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 156;BA.debugLine="Return";
Debug.ShouldStop(134217728);
if (true) return RemoteObject.createImmutable("");
 };
 BA.debugLineNum = 158;BA.debugLine="Dim flash As String = flashModes.Get((flashModes.";
Debug.ShouldStop(536870912);
_flash = BA.ObjectToString(_flashmodes.runMethod(false,"Get",(Object)(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_flashmodes.runMethod(true,"IndexOf",(Object)((foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_getflashmode" /*RemoteObject*/ )))),RemoteObject.createImmutable(1)}, "+",1, 1)),_flashmodes.runMethod(true,"getSize")}, "%",0, 1))));Debug.locals.put("flash", _flash);Debug.locals.put("flash", _flash);
 BA.debugLineNum = 159;BA.debugLine="camEx.SetFlashMode(flash)";
Debug.ShouldStop(1073741824);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_setflashmode" /*RemoteObject*/ ,(Object)(_flash));
 BA.debugLineNum = 160;BA.debugLine="ToastMessageShow(flash, False)";
Debug.ShouldStop(-2147483648);
foto.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(_flash)),(Object)(foto.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 161;BA.debugLine="camEx.CommitParameters";
Debug.ShouldStop(1);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_commitparameters" /*RemoteObject*/ );
 BA.debugLineNum = 162;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btnfocus_click() throws Exception{
try {
		Debug.PushSubsStack("btnFocus_Click (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,78);
if (RapidSub.canDelegate("btnfocus_click")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","btnfocus_click");}
 BA.debugLineNum = 78;BA.debugLine="Sub btnFocus_Click";
Debug.ShouldStop(8192);
 BA.debugLineNum = 79;BA.debugLine="camEx.FocusAndTakePicture";
Debug.ShouldStop(16384);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_focusandtakepicture" /*RemoteObject*/ );
 BA.debugLineNum = 80;BA.debugLine="End Sub";
Debug.ShouldStop(32768);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btnpicturesize_click() throws Exception{
try {
		Debug.PushSubsStack("btnPictureSize_Click (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,163);
if (RapidSub.canDelegate("btnpicturesize_click")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","btnpicturesize_click");}
RemoteObject _picturesizes = null;
RemoteObject _current = RemoteObject.declareNull("reparto_mazapa.keymon.lat.cameraexclass._camerasize");
int _i = 0;
RemoteObject _ps = RemoteObject.declareNull("reparto_mazapa.keymon.lat.cameraexclass._camerasize");
 BA.debugLineNum = 163;BA.debugLine="Sub btnPictureSize_Click";
Debug.ShouldStop(4);
 BA.debugLineNum = 164;BA.debugLine="Dim pictureSizes() As CameraSize = camEx.GetSuppo";
Debug.ShouldStop(8);
_picturesizes = foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_getsupportedpicturessizes" /*RemoteObject*/ );Debug.locals.put("pictureSizes", _picturesizes);Debug.locals.put("pictureSizes", _picturesizes);
 BA.debugLineNum = 165;BA.debugLine="Dim current As CameraSize = camEx.GetPictureSize";
Debug.ShouldStop(16);
_current = foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_getpicturesize" /*RemoteObject*/ );Debug.locals.put("current", _current);Debug.locals.put("current", _current);
 BA.debugLineNum = 166;BA.debugLine="For i = 0 To pictureSizes.Length - 1";
Debug.ShouldStop(32);
{
final int step3 = 1;
final int limit3 = RemoteObject.solve(new RemoteObject[] {_picturesizes.getField(true,"length" /*RemoteObject*/ ),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step3 > 0 && _i <= limit3) || (step3 < 0 && _i >= limit3) ;_i = ((int)(0 + _i + step3))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 167;BA.debugLine="If pictureSizes(i).Width = current.Width And pic";
Debug.ShouldStop(64);
if (RemoteObject.solveBoolean("=",_picturesizes.getArrayElement(false, /*RemoteObject*/ BA.numberCast(int.class, _i)).getField(true,"Width" /*RemoteObject*/ ),BA.numberCast(double.class, _current.getField(true,"Width" /*RemoteObject*/ ))) && RemoteObject.solveBoolean("=",_picturesizes.getArrayElement(false, /*RemoteObject*/ BA.numberCast(int.class, _i)).getField(true,"Height" /*RemoteObject*/ ),BA.numberCast(double.class, _current.getField(true,"Height" /*RemoteObject*/ )))) { 
if (true) break;};
 }
}Debug.locals.put("i", _i);
;
 BA.debugLineNum = 169;BA.debugLine="Dim ps As CameraSize = pictureSizes((i + 1) Mod p";
Debug.ShouldStop(256);
_ps = _picturesizes.getArrayElement(false, /*RemoteObject*/ RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {RemoteObject.createImmutable(_i),RemoteObject.createImmutable(1)}, "+",1, 1)),_picturesizes.getField(true,"length" /*RemoteObject*/ )}, "%",0, 1));Debug.locals.put("ps", _ps);Debug.locals.put("ps", _ps);
 BA.debugLineNum = 170;BA.debugLine="camEx.SetPictureSize(ps.Width, ps.Height)";
Debug.ShouldStop(512);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_setpicturesize" /*RemoteObject*/ ,(Object)(_ps.getField(true,"Width" /*RemoteObject*/ )),(Object)(_ps.getField(true,"Height" /*RemoteObject*/ )));
 BA.debugLineNum = 171;BA.debugLine="ToastMessageShow(ps.Width & \"x\" & ps.Height & i,";
Debug.ShouldStop(1024);
foto.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(_ps.getField(true,"Width" /*RemoteObject*/ ),RemoteObject.createImmutable("x"),_ps.getField(true,"Height" /*RemoteObject*/ ),RemoteObject.createImmutable(_i)))),(Object)(foto.mostCurrent.__c.getField(true,"False")));
 BA.debugLineNum = 172;BA.debugLine="camEx.CommitParameters";
Debug.ShouldStop(2048);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_commitparameters" /*RemoteObject*/ );
 BA.debugLineNum = 173;BA.debugLine="End Sub";
Debug.ShouldStop(4096);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _btntakepicture_click() throws Exception{
try {
		Debug.PushSubsStack("btnTakePicture_Click (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,68);
if (RapidSub.canDelegate("btntakepicture_click")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","btntakepicture_click");}
RemoteObject _ps = RemoteObject.declareNull("reparto_mazapa.keymon.lat.cameraexclass._camerasize");
 BA.debugLineNum = 68;BA.debugLine="Sub btnTakePicture_Click";
Debug.ShouldStop(8);
 BA.debugLineNum = 69;BA.debugLine="Dim ps As CameraSize";
Debug.ShouldStop(16);
_ps = RemoteObject.createNew ("reparto_mazapa.keymon.lat.cameraexclass._camerasize");Debug.locals.put("ps", _ps);
 BA.debugLineNum = 70;BA.debugLine="ps.Width =640";
Debug.ShouldStop(32);
_ps.setField ("Width" /*RemoteObject*/ ,BA.numberCast(int.class, 640));
 BA.debugLineNum = 71;BA.debugLine="ps.Height =480";
Debug.ShouldStop(64);
_ps.setField ("Height" /*RemoteObject*/ ,BA.numberCast(int.class, 480));
 BA.debugLineNum = 72;BA.debugLine="camEx.SetPictureSize(ps.Width, ps.Height)";
Debug.ShouldStop(128);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_setpicturesize" /*RemoteObject*/ ,(Object)(_ps.getField(true,"Width" /*RemoteObject*/ )),(Object)(_ps.getField(true,"Height" /*RemoteObject*/ )));
 BA.debugLineNum = 74;BA.debugLine="camEx.CommitParameters";
Debug.ShouldStop(512);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_commitparameters" /*RemoteObject*/ );
 BA.debugLineNum = 75;BA.debugLine="camEx.TakePicture";
Debug.ShouldStop(1024);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_takepicture" /*RemoteObject*/ );
 BA.debugLineNum = 76;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _camera1_picturetaken(RemoteObject _data) throws Exception{
try {
		Debug.PushSubsStack("Camera1_PictureTaken (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,82);
if (RapidSub.canDelegate("camera1_picturetaken")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","camera1_picturetaken", _data);}
RemoteObject _filename = RemoteObject.createImmutable("");
RemoteObject _dir = RemoteObject.createImmutable("");
RemoteObject _sdate = RemoteObject.createImmutable("");
RemoteObject _stime = RemoteObject.createImmutable("");
int _i = 0;
Debug.locals.put("Data", _data);
 BA.debugLineNum = 82;BA.debugLine="Sub Camera1_PictureTaken (Data() As Byte)";
Debug.ShouldStop(131072);
 BA.debugLineNum = 83;BA.debugLine="Dim filename As String = \"1.jpg\"";
Debug.ShouldStop(262144);
_filename = BA.ObjectToString("1.jpg");Debug.locals.put("filename", _filename);Debug.locals.put("filename", _filename);
 BA.debugLineNum = 84;BA.debugLine="Dim dir As String = File.DirInternal";
Debug.ShouldStop(524288);
_dir = foto.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal");Debug.locals.put("dir", _dir);Debug.locals.put("dir", _dir);
 BA.debugLineNum = 86;BA.debugLine="camEx.SavePictureToFile(Data, dir, filename)";
Debug.ShouldStop(2097152);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_savepicturetofile" /*RemoteObject*/ ,(Object)(_data),(Object)(_dir),(Object)(_filename));
 BA.debugLineNum = 87;BA.debugLine="camEx.StartPreview 'restart preview";
Debug.ShouldStop(4194304);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_startpreview" /*RemoteObject*/ );
 BA.debugLineNum = 91;BA.debugLine="Dim sDate,sTime As String";
Debug.ShouldStop(67108864);
_sdate = RemoteObject.createImmutable("");Debug.locals.put("sDate", _sdate);
_stime = RemoteObject.createImmutable("");Debug.locals.put("sTime", _stime);
 BA.debugLineNum = 94;BA.debugLine="DateTime.DateFormat = \"MM/dd/yyyy\"";
Debug.ShouldStop(536870912);
foto.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"setDateFormat",BA.ObjectToString("MM/dd/yyyy"));
 BA.debugLineNum = 95;BA.debugLine="sDate=DateTime.Date(DateTime.Now)";
Debug.ShouldStop(1073741824);
_sdate = foto.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Date",(Object)(foto.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow")));Debug.locals.put("sDate", _sdate);
 BA.debugLineNum = 96;BA.debugLine="sTime=DateTime.Time(DateTime.Now)";
Debug.ShouldStop(-2147483648);
_stime = foto.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"Time",(Object)(foto.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow")));Debug.locals.put("sTime", _stime);
 BA.debugLineNum = 97;BA.debugLine="c=Starter.skmt.ExecQuery(\"select CUENTA from cuen";
Debug.ShouldStop(1);
foto.mostCurrent._c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), foto.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select CUENTA from cuentaa"))));
 BA.debugLineNum = 98;BA.debugLine="c.Position = 0";
Debug.ShouldStop(2);
foto.mostCurrent._c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 99;BA.debugLine="cuenta = c.GetString(\"CUENTA\")";
Debug.ShouldStop(4);
foto.mostCurrent._cuenta = foto.mostCurrent._c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("CUENTA")));
 BA.debugLineNum = 100;BA.debugLine="c=Starter.skmt.ExecQuery(\"select USUARIO from usu";
Debug.ShouldStop(8);
foto.mostCurrent._c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), foto.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select USUARIO from usuarioa"))));
 BA.debugLineNum = 101;BA.debugLine="c.Position = 0";
Debug.ShouldStop(16);
foto.mostCurrent._c.runMethod(true,"setPosition",BA.numberCast(int.class, 0));
 BA.debugLineNum = 102;BA.debugLine="USUARIO = c.GetString(\"USUARIO\")";
Debug.ShouldStop(32);
foto.mostCurrent._usuario = foto.mostCurrent._c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("USUARIO")));
 BA.debugLineNum = 103;BA.debugLine="c.Close";
Debug.ShouldStop(64);
foto.mostCurrent._c.runVoidMethod ("Close");
 BA.debugLineNum = 104;BA.debugLine="Starter.skmt.ExecNonQuery(\"DELETE FROM NOVENTA WH";
Debug.ShouldStop(128);
foto.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("DELETE FROM NOVENTA WHERE NV_CLIENTE IN (select cuenta from cuentaa)")));
 BA.debugLineNum = 106;BA.debugLine="c=Starter.skmt.ExecQuery(\"select HVD_CLIENTE,HVD_";
Debug.ShouldStop(512);
foto.mostCurrent._c = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.sql.SQL.CursorWrapper"), foto.mostCurrent._starter._skmt /*RemoteObject*/ .runMethod(false,"ExecQuery",(Object)(RemoteObject.createImmutable("select HVD_CLIENTE,HVD_PRONOMBRE,HVD_CANT,HVD_COSTO_TOT from HIST_VENTAS WHERE HVD_CLIENTE IN (Select CUENTA from cuentaa) order by HVD_PRONOMBRE asc"))));
 BA.debugLineNum = 108;BA.debugLine="If c.RowCount>0 Then";
Debug.ShouldStop(2048);
if (RemoteObject.solveBoolean(">",foto.mostCurrent._c.runMethod(true,"getRowCount"),BA.numberCast(double.class, 0))) { 
 BA.debugLineNum = 109;BA.debugLine="For i=0 To c.RowCount -1";
Debug.ShouldStop(4096);
{
final int step19 = 1;
final int limit19 = RemoteObject.solve(new RemoteObject[] {foto.mostCurrent._c.runMethod(true,"getRowCount"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step19 > 0 && _i <= limit19) || (step19 < 0 && _i >= limit19) ;_i = ((int)(0 + _i + step19))  ) {
Debug.locals.put("i", _i);
 BA.debugLineNum = 110;BA.debugLine="c.Position=i";
Debug.ShouldStop(8192);
foto.mostCurrent._c.runMethod(true,"setPosition",BA.numberCast(int.class, _i));
 BA.debugLineNum = 111;BA.debugLine="Starter.skmt.ExecNonQuery2(\"insert into reparto";
Debug.ShouldStop(16384);
foto.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("insert into reparto(REP_CLIENTE, REP_PRONOMBRE, REP_CANT, REP_COSTO_TOT)  select  HVD_CLIENTE, HVD_PRONOMBRE, HVD_CANT, HVD_COSTO_TOT from hist_ventas where HVD_PRONOMBRE = ? and HVD_cliente in (Select CUENTA from cuentaa) ")),(Object)(foto.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("String",new int[] {1},new Object[] {foto.mostCurrent._c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PRONOMBRE")))})))));
 BA.debugLineNum = 113;BA.debugLine="Starter.skmt.ExecNonQuery2(\"update cat_gunaprod";
Debug.ShouldStop(65536);
foto.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("update cat_gunaprod set cat_gp_almacen = cat_gp_almacen + ? where cat_gp_nombre = ?")),(Object)(foto.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {(foto.mostCurrent._c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_CANT")))),(foto.mostCurrent._c.runMethod(true,"GetString",(Object)(RemoteObject.createImmutable("HVD_PRONOMBRE"))))})))));
 }
}Debug.locals.put("i", _i);
;
 };
 BA.debugLineNum = 124;BA.debugLine="Starter.skmt.ExecNonQuery2(\"INSERT INTO  NOVENTA";
Debug.ShouldStop(134217728);
foto.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery2",(Object)(BA.ObjectToString("INSERT INTO  NOVENTA (NV_CLIENTE,NV_FECHA,NV_USER,NV_MOTIVO,NV_COMM,NV_LAT,NV_LON, NV_FOTO) VALUES(?,?,?,?,?,?,?,?) ")),(Object)(foto.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {8},new Object[] {(foto.mostCurrent._cuenta),(RemoteObject.concat(_sdate,_stime)),(foto.mostCurrent._usuario),RemoteObject.createImmutable(("CERRADO")),(foto.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,foto.mostCurrent.activityBA).getField(false,"_noventa" /*RemoteObject*/ ).getField(true,"_comentario" /*RemoteObject*/ )),(foto.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,foto.mostCurrent.activityBA).getField(true,"_lat_gps" /*RemoteObject*/ )),(foto.mostCurrent._b4xpages.runMethod(false,"_mainpage" /*RemoteObject*/ ,foto.mostCurrent.activityBA).getField(true,"_lon_gps" /*RemoteObject*/ )),(_data)})))));
 BA.debugLineNum = 125;BA.debugLine="Starter.skmt.ExecNonQuery($\"UPDATE kmt_info set g";
Debug.ShouldStop(268435456);
foto.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)((RemoteObject.concat(RemoteObject.createImmutable("UPDATE kmt_info set gestion = 3, HORAENT = '"),foto.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((RemoteObject.concat(_sdate,RemoteObject.createImmutable(" "),_stime)))),RemoteObject.createImmutable("' where CAT_CL_CODIGO In (select cuenta from cuentaa)")))));
 BA.debugLineNum = 126;BA.debugLine="Starter.skmt.ExecNonQuery(\"update HIST_VENTAS SET";
Debug.ShouldStop(536870912);
foto.mostCurrent._starter._skmt /*RemoteObject*/ .runVoidMethod ("ExecNonQuery",(Object)(RemoteObject.createImmutable("update HIST_VENTAS SET HVD_RECHAZO = 1 WHERE HVD_CLIENTE IN (SELECT CUENTA FROM CUENTAA)")));
 BA.debugLineNum = 127;BA.debugLine="B4XPages.ShowPage(\"Principal\")";
Debug.ShouldStop(1073741824);
foto.mostCurrent._b4xpages.runVoidMethod ("_showpage" /*RemoteObject*/ ,foto.mostCurrent.activityBA,(Object)(RemoteObject.createImmutable("Principal")));
 BA.debugLineNum = 130;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _camera1_ready(RemoteObject _success) throws Exception{
try {
		Debug.PushSubsStack("Camera1_Ready (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,57);
if (RapidSub.canDelegate("camera1_ready")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","camera1_ready", _success);}
Debug.locals.put("Success", _success);
 BA.debugLineNum = 57;BA.debugLine="Sub Camera1_Ready (Success As Boolean)";
Debug.ShouldStop(16777216);
 BA.debugLineNum = 58;BA.debugLine="If Success Then";
Debug.ShouldStop(33554432);
if (_success.<Boolean>get().booleanValue()) { 
 BA.debugLineNum = 59;BA.debugLine="camEx.SetJpegQuality(90)";
Debug.ShouldStop(67108864);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_setjpegquality" /*RemoteObject*/ ,(Object)(BA.numberCast(int.class, 90)));
 BA.debugLineNum = 60;BA.debugLine="camEx.CommitParameters";
Debug.ShouldStop(134217728);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_commitparameters" /*RemoteObject*/ );
 BA.debugLineNum = 61;BA.debugLine="camEx.StartPreview";
Debug.ShouldStop(268435456);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_startpreview" /*RemoteObject*/ );
 BA.debugLineNum = 62;BA.debugLine="Log(camEx.GetPreviewSize)";
Debug.ShouldStop(536870912);
foto.mostCurrent.__c.runVoidMethod ("LogImpl","370713349",BA.ObjectToString(foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_getpreviewsize" /*RemoteObject*/ )),0);
 }else {
 BA.debugLineNum = 64;BA.debugLine="ToastMessageShow(\"Cannot open camera.\", True)";
Debug.ShouldStop(-2147483648);
foto.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Cannot open camera.")),(Object)(foto.mostCurrent.__c.getField(true,"True")));
 };
 BA.debugLineNum = 66;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _changecamera_click() throws Exception{
try {
		Debug.PushSubsStack("ChangeCamera_Click (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,132);
if (RapidSub.canDelegate("changecamera_click")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","changecamera_click");}
 BA.debugLineNum = 132;BA.debugLine="Sub ChangeCamera_Click";
Debug.ShouldStop(8);
 BA.debugLineNum = 133;BA.debugLine="camEx.Release";
Debug.ShouldStop(16);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_release" /*RemoteObject*/ );
 BA.debugLineNum = 134;BA.debugLine="frontCamera = Not(frontCamera)";
Debug.ShouldStop(32);
foto._frontcamera = foto.mostCurrent.__c.runMethod(true,"Not",(Object)(foto._frontcamera));
 BA.debugLineNum = 135;BA.debugLine="InitializeCamera";
Debug.ShouldStop(64);
_initializecamera();
 BA.debugLineNum = 136;BA.debugLine="End Sub";
Debug.ShouldStop(128);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _globals() throws Exception{
 //BA.debugLineNum = 14;BA.debugLine="Sub Globals";
 //BA.debugLineNum = 15;BA.debugLine="Private p_camara As Panel";
foto.mostCurrent._p_camara = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");
 //BA.debugLineNum = 16;BA.debugLine="Private camEx As CameraExClass";
foto.mostCurrent._camex = RemoteObject.createNew ("reparto_mazapa.keymon.lat.cameraexclass");
 //BA.debugLineNum = 17;BA.debugLine="Dim btnTakePicture As Button";
foto.mostCurrent._btntakepicture = RemoteObject.createNew ("anywheresoftware.b4a.objects.ButtonWrapper");
 //BA.debugLineNum = 19;BA.debugLine="Dim c As Cursor";
foto.mostCurrent._c = RemoteObject.createNew ("anywheresoftware.b4a.sql.SQL.CursorWrapper");
 //BA.debugLineNum = 20;BA.debugLine="Dim cuenta As String";
foto.mostCurrent._cuenta = RemoteObject.createImmutable("");
 //BA.debugLineNum = 21;BA.debugLine="Dim lat_gps As String";
foto.mostCurrent._lat_gps = RemoteObject.createImmutable("");
 //BA.debugLineNum = 23;BA.debugLine="Dim USUARIO As String";
foto.mostCurrent._usuario = RemoteObject.createImmutable("");
 //BA.debugLineNum = 24;BA.debugLine="Dim MOTIVO As String";
foto.mostCurrent._motivo = RemoteObject.createImmutable("");
 //BA.debugLineNum = 25;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject  _gps_locationchanged(RemoteObject _location1) throws Exception{
try {
		Debug.PushSubsStack("GPS_LocationChanged (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,50);
if (RapidSub.canDelegate("gps_locationchanged")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","gps_locationchanged", _location1);}
Debug.locals.put("Location1", _location1);
 BA.debugLineNum = 50;BA.debugLine="Sub GPS_LocationChanged (Location1 As Location)";
Debug.ShouldStop(131072);
 BA.debugLineNum = 55;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _initializecamera() throws Exception{
try {
		Debug.PushSubsStack("InitializeCamera (foto) ","foto",28,foto.mostCurrent.activityBA,foto.mostCurrent,41);
if (RapidSub.canDelegate("initializecamera")) { return reparto_mazapa.keymon.lat.foto.remoteMe.runUserSub(false, "foto","initializecamera");}
 BA.debugLineNum = 41;BA.debugLine="Private Sub InitializeCamera";
Debug.ShouldStop(256);
 BA.debugLineNum = 42;BA.debugLine="camEx.Initialize(p_camara, frontCamera, Me, \"Came";
Debug.ShouldStop(512);
foto.mostCurrent._camex.runClassMethod (reparto_mazapa.keymon.lat.cameraexclass.class, "_initialize" /*RemoteObject*/ ,foto.mostCurrent.activityBA,(Object)(foto.mostCurrent._p_camara),(Object)(foto._frontcamera),(Object)(foto.getObject()),(Object)(RemoteObject.createImmutable("Camera1")));
 BA.debugLineNum = 43;BA.debugLine="frontCamera = camEx.Front";
Debug.ShouldStop(1024);
foto._frontcamera = foto.mostCurrent._camex.getField(true,"_front" /*RemoteObject*/ );
 BA.debugLineNum = 44;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
			throw Debug.ErrorCaught(e);
		} 
finally {
			Debug.PopSubsStack();
		}}
public static RemoteObject  _process_globals() throws Exception{
 //BA.debugLineNum = 7;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 8;BA.debugLine="Private frontCamera As Boolean = False";
foto._frontcamera = foto.mostCurrent.__c.getField(true,"False");
 //BA.debugLineNum = 10;BA.debugLine="Dim g As GPS";
foto._g = RemoteObject.createNew ("anywheresoftware.b4a.gps.GPS");
 //BA.debugLineNum = 12;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
}