Update 20211218

This commit is contained in:
2021-12-18 10:02:42 +01:00
parent 1254540139
commit 3ef1971def
842 changed files with 199916 additions and 17112 deletions

View File

@@ -0,0 +1,439 @@
anywheresoftware.b4a.samples.camera
0
2
cameraexclass
httpjob
1
httpjob
main,activity_create,1,0,28,34
,panel1,,pnldrawing,,cvs,,detector,,searchforbarcodes
,panel1,,pnldrawing,,detector,,searchforbarcodes
,createdetector
main,createdetector,0,0,36,54
,detector,,searchforbarcodes
,detector,,searchforbarcodes
main,activity_pause,0,0,130,134
,camex
cameraexclass,release
main,activity_resume,0,0,117,119
starter,rp,,camex,,panel1,,frontcamera
,frontcamera
,initializecamera,cameraexclass,initialize,cameraexclass,findcamera
main,initializecamera,0,0,121,128
starter,rp,,camex,,panel1,,frontcamera
,frontcamera
cameraexclass,initialize,cameraexclass,findcamera
main,btneffect_click,0,0,180,190
,camex
cameraexclass,getsupportedcoloreffects,cameraexclass,getcoloreffect,cameraexclass,setcoloreffect,cameraexclass,commitparameters,cameraexclass,getparameter,cameraexclass,setparameter
main,btnflash_click,0,0,192,204
,camex
cameraexclass,getfocusdistances,cameraexclass,getsupportedflashmodes,cameraexclass,getflashmode,cameraexclass,setflashmode,cameraexclass,commitparameters
main,btnpicturesize_click,0,0,205,215
,camex
cameraexclass,getsupportedpicturessizes,cameraexclass,getpicturesize,cameraexclass,setpicturesize,cameraexclass,commitparameters
main,camera1_picturetaken,0,0,158,172
main,camera1_preview,0,0,56,115
,searchforbarcodes,,lastpreview,,intervalbetweenpreviewsms,,cvs,,camex,,detector,,panel1
,lastpreview
cameraexclass,getpreviewsize
main,camera1_ready,0,0,136,146
,camex
cameraexclass,setjpegquality,cameraexclass,setcontinuousautofocus,cameraexclass,commitparameters,cameraexclass,startpreview,cameraexclass,getsupportedfocusmodes,cameraexclass,setfocusmode
main,changecamera_click,0,0,174,178
,camex,,frontcamera,starter,rp,,panel1
,frontcamera
cameraexclass,release,,initializecamera,cameraexclass,initialize,cameraexclass,findcamera
main,globals,0,1,21,26
main,process_globals,0,1,13,19
,frontcamera,,intervalbetweenpreviewsms
,frontcamera,,intervalbetweenpreviewsms
main,seekbar1_valuechanged,0,0,218,222
,camex
cameraexclass,iszoomsupported,cameraexclass,setzoom,cameraexclass,getmaxzoom,cameraexclass,commitparameters
cameraexclass,release,0,0,122,124
cameraexclass,getsupportedcoloreffects,0,0,214,217
cameraexclass,getcoloreffect,0,0,153,155
,getparameter
cameraexclass,setcoloreffect,0,0,157,159
,setparameter
cameraexclass,commitparameters,0,0,143,151
cameraexclass,getfocusdistances,0,0,299,304
cameraexclass,getsupportedflashmodes,0,0,209,212
cameraexclass,getflashmode,0,0,204,207
cameraexclass,setflashmode,0,0,199,202
cameraexclass,getsupportedpicturessizes,0,0,177,187
cameraexclass,getpicturesize,0,0,246,253
cameraexclass,setpicturesize,0,0,189,192
cameraexclass,getpreviewsize,0,0,237,244
cameraexclass,setjpegquality,0,0,194,197
cameraexclass,setcontinuousautofocus,0,0,283,292
,getsupportedfocusmodes,,setfocusmode
cameraexclass,startpreview,0,0,114,116
cameraexclass,initialize,0,0,20,35
,findcamera
cameraexclass,iszoomsupported,0,0,332,335
cameraexclass,setzoom,0,0,347,350
cameraexclass,getmaxzoom,0,0,337,340
cameraexclass,camera_focusdone,0,0,323,330
,takepicture
cameraexclass,takepicture,0,0,106,108
cameraexclass,camera_picturetaken,1,0,110,112
cameraexclass,camera_preview,1,0,100,104
cameraexclass,camera_ready,1,0,87,98
,setdisplayorientation,,findcamera,,commitparameters
cameraexclass,setdisplayorientation,0,0,62,85
,findcamera,,commitparameters
cameraexclass,class_globals,0,0,6,18
cameraexclass,closenow,0,0,312,316
cameraexclass,facedetection_event,0,0,378,385
cameraexclass,findcamera,0,0,37,60
cameraexclass,focusandtakepicture,0,0,318,320
cameraexclass,getparameter,0,0,138,141
cameraexclass,getexposurecompensation,0,0,352,355
cameraexclass,getmaxexposurecompensation,0,0,367,370
cameraexclass,getminexposurecompensation,0,0,362,365
cameraexclass,getpreviewfpsrange,0,0,226,229
cameraexclass,getsupportedfocusmodes,0,0,278,281
cameraexclass,getsupportedpictureformats,0,0,306,309
cameraexclass,getsupportedpreviewfpsrange,0,0,220,223
cameraexclass,getsupportedpreviewsizes,0,0,161,171
cameraexclass,getzoom,0,0,342,345
cameraexclass,previewimagetojpeg,0,0,257,276
cameraexclass,savepicturetofile,0,0,127,131
cameraexclass,setparameter,0,0,133,136
cameraexclass,setfocusmode,0,0,294,297
cameraexclass,setexposurecompensation,0,0,357,360
cameraexclass,setfacedetectionlistener,0,0,372,376
cameraexclass,setpreviewfpsrange,0,0,231,235
cameraexclass,setpreviewsize,0,0,173,176
cameraexclass,startfacedetection,0,0,389,392
cameraexclass,stopfacedetection,0,0,394,397
cameraexclass,stoppreview,0,0,118,120
starter,application_error,0,0,21,23
starter,process_globals,0,1,6,10
starter,service_create,0,0,12,14
starter,service_destroy,0,0,25,27
starter,service_start,0,0,16,18
httputils2service,completejob,0,0,142,159
,taskidtojob
httpjob,complete
httputils2service,hc_responseerror,0,0,109,123
,taskidtojob
,completejob,httpjob,complete
httputils2service,hc_responsesuccess,0,0,86,99
,taskidtojob,,tempfolder
httputils2service,process_globals,0,1,2,25
httputils2service,response_streamfinish,0,0,101,107
,taskidtojob
,completejob,httpjob,complete
httputils2service,service_create,0,0,27,56
,tempfolder,,hc,,taskidtojob
,tempfolder
httputils2service,service_destroy,0,0,62,64
httputils2service,service_start,0,0,58,60
httputils2service,submitjob,0,0,68,82
,taskidtojob,,taskcounter,,hc,,tempfolder
,taskcounter,,tempfolder
,service_create,httpjob,getrequest
httpjob,complete,0,0,306,309
httpjob,getrequest,0,0,301,303
httpjob,addscheme,0,0,43,46
httpjob,class_globals,0,0,2,32
httpjob,delete,0,0,252,261
,addscheme
httpjob,delete2,0,0,263,272
,addscheme,,escapelink
httpjob,escapelink,0,0,237,249
httpjob,download,0,0,210,219
,addscheme
httpjob,download2,0,0,226,235
,addscheme,,escapelink
httpjob,getbitmap,0,0,321,325
httputils2service,tempfolder
httpjob,getbitmapresize,0,0,332,334
httputils2service,tempfolder
httpjob,getbitmapsample,0,0,328,330
httputils2service,tempfolder
httpjob,getinputstream,0,0,338,342
httputils2service,tempfolder
httpjob,getstring,0,0,282,284
httputils2service,tempfolder
,getstring2
httpjob,getstring2,0,0,287,297
httputils2service,tempfolder
httpjob,head,0,0,110,119
,addscheme
httpjob,initialize,0,0,38,41
httpjob,multipartstartsection,0,0,170,177
httpjob,patchbytes,0,0,88,106
,addscheme
httpjob,patchstring,0,0,83,85
,patchbytes,,addscheme
httpjob,postbytes,0,0,54,63
,addscheme
httpjob,postfile,0,0,181,207
,addscheme,,postbytes
httpjob,postmultipart,0,0,124,168
,multipartstartsection,,postbytes,,addscheme
httpjob,poststring,0,0,49,51
,postbytes,,addscheme
httpjob,putbytes,0,0,71,80
,addscheme
httpjob,putstring,0,0,66,68
,putbytes,,addscheme
httpjob,release,0,0,275,279
httputils2service,tempfolder

View File

@@ -0,0 +1,28 @@
package anywheresoftware.b4a.samples.camera;
import anywheresoftware.b4a.pc.PCBA;
import anywheresoftware.b4a.pc.RemoteObject;
public class cameraexclass {
public static RemoteObject myClass;
public cameraexclass() {
}
public static PCBA staticBA = new PCBA(null, cameraexclass.class);
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
public static RemoteObject _nativecam = RemoteObject.declareNull("Object");
public static RemoteObject _cam = RemoteObject.declareNull("anywheresoftware.b4a.objects.CameraW");
public static RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.agraham.reflection.Reflection");
public static RemoteObject _target = RemoteObject.declareNull("Object");
public static RemoteObject _event = RemoteObject.createImmutable("");
public static RemoteObject _front = RemoteObject.createImmutable(false);
public static RemoteObject _parameters = RemoteObject.declareNull("Object");
public static RemoteObject _previeworientation = RemoteObject.createImmutable(0);
public static anywheresoftware.b4a.samples.camera.main _main = null;
public static anywheresoftware.b4a.samples.camera.starter _starter = null;
public static anywheresoftware.b4a.samples.camera.httputils2service _httputils2service = null;
public static Object[] GetGlobals(RemoteObject _ref) throws Exception {
return new Object[] {"cam",_ref.getField(false, "_cam"),"event",_ref.getField(false, "_event"),"Front",_ref.getField(false, "_front"),"nativeCam",_ref.getField(false, "_nativecam"),"parameters",_ref.getField(false, "_parameters"),"PreviewOrientation",_ref.getField(false, "_previeworientation"),"r",_ref.getField(false, "_r"),"target",_ref.getField(false, "_target")};
}
}

View File

@@ -0,0 +1,32 @@
package anywheresoftware.b4a.samples.camera;
import anywheresoftware.b4a.pc.PCBA;
import anywheresoftware.b4a.pc.RemoteObject;
public class httpjob {
public static RemoteObject myClass;
public httpjob() {
}
public static PCBA staticBA = new PCBA(null, httpjob.class);
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
public static RemoteObject _jobname = RemoteObject.createImmutable("");
public static RemoteObject _success = RemoteObject.createImmutable(false);
public static RemoteObject _username = RemoteObject.createImmutable("");
public static RemoteObject _password = RemoteObject.createImmutable("");
public static RemoteObject _errormessage = RemoteObject.createImmutable("");
public static RemoteObject _target = RemoteObject.declareNull("Object");
public static RemoteObject _taskid = RemoteObject.createImmutable("");
public static RemoteObject _req = RemoteObject.declareNull("anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpRequest");
public static RemoteObject _response = RemoteObject.declareNull("anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpResponse");
public static RemoteObject _tag = RemoteObject.declareNull("Object");
public static RemoteObject _invalidurl = RemoteObject.createImmutable("");
public static RemoteObject _defaultscheme = RemoteObject.createImmutable("");
public static anywheresoftware.b4a.samples.camera.main _main = null;
public static anywheresoftware.b4a.samples.camera.starter _starter = null;
public static anywheresoftware.b4a.samples.camera.httputils2service _httputils2service = null;
public static Object[] GetGlobals(RemoteObject _ref) throws Exception {
return new Object[] {"DefaultScheme",_ref.getField(false, "_defaultscheme"),"ErrorMessage",_ref.getField(false, "_errormessage"),"InvalidURL",_ref.getField(false, "_invalidurl"),"JobName",_ref.getField(false, "_jobname"),"Password",_ref.getField(false, "_password"),"req",_ref.getField(false, "_req"),"Response",_ref.getField(false, "_response"),"Success",_ref.getField(false, "_success"),"Tag",_ref.getField(false, "_tag"),"target",_ref.getField(false, "_target"),"taskId",_ref.getField(false, "_taskid"),"Username",_ref.getField(false, "_username")};
}
}

View File

@@ -0,0 +1,969 @@
package anywheresoftware.b4a.samples.camera;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;
public class httpjob_subs_0 {
public static RemoteObject _addscheme(RemoteObject __ref,RemoteObject _link) throws Exception{
try {
Debug.PushSubsStack("AddScheme (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,43);
if (RapidSub.canDelegate("addscheme")) { return __ref.runUserSub(false, "httpjob","addscheme", __ref, _link);}
Debug.locals.put("Link", _link);
BA.debugLineNum = 43;BA.debugLine="Private Sub AddScheme (Link As String) As String";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 44;BA.debugLine="If DefaultScheme = \"\" Or Link.Contains(\":\") Then";
Debug.JustUpdateDeviceLine();
if (RemoteObject.solveBoolean("=",__ref.getField(true,"_defaultscheme" /*RemoteObject*/ ),BA.ObjectToString("")) || RemoteObject.solveBoolean(".",_link.runMethod(true,"contains",(Object)(RemoteObject.createImmutable(":"))))) {
if (true) return _link;};
BA.debugLineNum = 45;BA.debugLine="Return DefaultScheme & \"://\" & Link";
Debug.JustUpdateDeviceLine();
if (true) return RemoteObject.concat(__ref.getField(true,"_defaultscheme" /*RemoteObject*/ ),RemoteObject.createImmutable("://"),_link);
BA.debugLineNum = 46;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _class_globals(RemoteObject __ref) throws Exception{
//BA.debugLineNum = 2;BA.debugLine="Sub Class_Globals";
//BA.debugLineNum = 3;BA.debugLine="Public JobName As String";
httpjob._jobname = RemoteObject.createImmutable("");__ref.setField("_jobname",httpjob._jobname);
//BA.debugLineNum = 4;BA.debugLine="Public Success As Boolean";
httpjob._success = RemoteObject.createImmutable(false);__ref.setField("_success",httpjob._success);
//BA.debugLineNum = 5;BA.debugLine="Public Username, Password As String";
httpjob._username = RemoteObject.createImmutable("");__ref.setField("_username",httpjob._username);
httpjob._password = RemoteObject.createImmutable("");__ref.setField("_password",httpjob._password);
//BA.debugLineNum = 6;BA.debugLine="Public ErrorMessage As String";
httpjob._errormessage = RemoteObject.createImmutable("");__ref.setField("_errormessage",httpjob._errormessage);
//BA.debugLineNum = 7;BA.debugLine="Private target As Object";
httpjob._target = RemoteObject.createNew ("Object");__ref.setField("_target",httpjob._target);
//BA.debugLineNum = 13;BA.debugLine="Private taskId As String";
httpjob._taskid = RemoteObject.createImmutable("");__ref.setField("_taskid",httpjob._taskid);
//BA.debugLineNum = 15;BA.debugLine="Private req As OkHttpRequest";
httpjob._req = RemoteObject.createNew ("anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpRequest");__ref.setField("_req",httpjob._req);
//BA.debugLineNum = 16;BA.debugLine="Public Response As OkHttpResponse";
httpjob._response = RemoteObject.createNew ("anywheresoftware.b4h.okhttp.OkHttpClientWrapper.OkHttpResponse");__ref.setField("_response",httpjob._response);
//BA.debugLineNum = 25;BA.debugLine="Public Tag As Object";
httpjob._tag = RemoteObject.createNew ("Object");__ref.setField("_tag",httpjob._tag);
//BA.debugLineNum = 26;BA.debugLine="Type MultipartFileData (Dir As String, FileName A";
;
//BA.debugLineNum = 30;BA.debugLine="Private Const InvalidURL As String = \"https://inv";
httpjob._invalidurl = BA.ObjectToString("https://invalid-url/");__ref.setField("_invalidurl",httpjob._invalidurl);
//BA.debugLineNum = 31;BA.debugLine="Public DefaultScheme As String = \"https\"";
httpjob._defaultscheme = BA.ObjectToString("https");__ref.setField("_defaultscheme",httpjob._defaultscheme);
//BA.debugLineNum = 32;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject _complete(RemoteObject __ref,RemoteObject _id) throws Exception{
try {
Debug.PushSubsStack("Complete (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,306);
if (RapidSub.canDelegate("complete")) { return __ref.runUserSub(false, "httpjob","complete", __ref, _id);}
Debug.locals.put("id", _id);
BA.debugLineNum = 306;BA.debugLine="Public Sub Complete (id As Int)";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 307;BA.debugLine="taskId = id";
Debug.JustUpdateDeviceLine();
__ref.setField ("_taskid" /*RemoteObject*/ ,BA.NumberToString(_id));
BA.debugLineNum = 308;BA.debugLine="CallSubDelayed2(target, \"JobDone\", Me)";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("CallSubDelayed2",__ref.getField(false, "ba"),(Object)(__ref.getField(false,"_target" /*RemoteObject*/ )),(Object)(BA.ObjectToString("JobDone")),(Object)(__ref));
BA.debugLineNum = 309;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _delete(RemoteObject __ref,RemoteObject _link) throws Exception{
try {
Debug.PushSubsStack("Delete (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,252);
if (RapidSub.canDelegate("delete")) { return __ref.runUserSub(false, "httpjob","delete", __ref, _link);}
Debug.locals.put("Link", _link);
BA.debugLineNum = 252;BA.debugLine="Public Sub Delete(Link As String)";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 253;BA.debugLine="Try";
Debug.JustUpdateDeviceLine();
try { BA.debugLineNum = 254;BA.debugLine="Link = AddScheme(Link)";
Debug.JustUpdateDeviceLine();
_link = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_addscheme" /*RemoteObject*/ ,(Object)(_link));Debug.locals.put("Link", _link);
BA.debugLineNum = 255;BA.debugLine="req.InitializeDelete(Link)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializeDelete",(Object)(_link));
Debug.CheckDeviceExceptions();
}
catch (Exception e5) {
BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e5.toString()); BA.debugLineNum = 257;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("LogImpl","96356997",(RemoteObject.concat(RemoteObject.createImmutable("Invalid link: "),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_link))),RemoteObject.createImmutable(""))),0);
BA.debugLineNum = 258;BA.debugLine="req.InitializeDelete(InvalidURL)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializeDelete",(Object)(__ref.getField(true,"_invalidurl" /*RemoteObject*/ )));
};
BA.debugLineNum = 260;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("CallSubDelayed2",__ref.getField(false, "ba"),(Object)((httpjob._httputils2service.getObject())),(Object)(BA.ObjectToString("SubmitJob")),(Object)(__ref));
BA.debugLineNum = 261;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _delete2(RemoteObject __ref,RemoteObject _link,RemoteObject _parameters) throws Exception{
try {
Debug.PushSubsStack("Delete2 (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,263);
if (RapidSub.canDelegate("delete2")) { return __ref.runUserSub(false, "httpjob","delete2", __ref, _link, _parameters);}
Debug.locals.put("Link", _link);
Debug.locals.put("Parameters", _parameters);
BA.debugLineNum = 263;BA.debugLine="Public Sub Delete2(Link As String, Parameters() As";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 264;BA.debugLine="Try";
Debug.JustUpdateDeviceLine();
try { BA.debugLineNum = 265;BA.debugLine="Link = AddScheme(Link)";
Debug.JustUpdateDeviceLine();
_link = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_addscheme" /*RemoteObject*/ ,(Object)(_link));Debug.locals.put("Link", _link);
BA.debugLineNum = 266;BA.debugLine="req.InitializeDelete(escapeLink(Link, Parameters";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializeDelete",(Object)(__ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_escapelink" /*RemoteObject*/ ,(Object)(_link),(Object)(_parameters))));
Debug.CheckDeviceExceptions();
}
catch (Exception e5) {
BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e5.toString()); BA.debugLineNum = 268;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("LogImpl","96422533",(RemoteObject.concat(RemoteObject.createImmutable("Invalid link: "),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_link))),RemoteObject.createImmutable(""))),0);
BA.debugLineNum = 269;BA.debugLine="req.InitializeDelete(escapeLink(InvalidURL, Para";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializeDelete",(Object)(__ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_escapelink" /*RemoteObject*/ ,(Object)(__ref.getField(true,"_invalidurl" /*RemoteObject*/ )),(Object)(_parameters))));
};
BA.debugLineNum = 271;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("CallSubDelayed2",__ref.getField(false, "ba"),(Object)((httpjob._httputils2service.getObject())),(Object)(BA.ObjectToString("SubmitJob")),(Object)(__ref));
BA.debugLineNum = 272;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _download(RemoteObject __ref,RemoteObject _link) throws Exception{
try {
Debug.PushSubsStack("Download (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,210);
if (RapidSub.canDelegate("download")) { return __ref.runUserSub(false, "httpjob","download", __ref, _link);}
Debug.locals.put("Link", _link);
BA.debugLineNum = 210;BA.debugLine="Public Sub Download(Link As String)";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 211;BA.debugLine="Try";
Debug.JustUpdateDeviceLine();
try { BA.debugLineNum = 212;BA.debugLine="Link = AddScheme(Link)";
Debug.JustUpdateDeviceLine();
_link = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_addscheme" /*RemoteObject*/ ,(Object)(_link));Debug.locals.put("Link", _link);
BA.debugLineNum = 213;BA.debugLine="req.InitializeGet(Link)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializeGet",(Object)(_link));
Debug.CheckDeviceExceptions();
}
catch (Exception e5) {
BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e5.toString()); BA.debugLineNum = 215;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("LogImpl","96160389",(RemoteObject.concat(RemoteObject.createImmutable("Invalid link: "),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_link))),RemoteObject.createImmutable(""))),0);
BA.debugLineNum = 216;BA.debugLine="req.InitializeGet(InvalidURL)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializeGet",(Object)(__ref.getField(true,"_invalidurl" /*RemoteObject*/ )));
};
BA.debugLineNum = 218;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("CallSubDelayed2",__ref.getField(false, "ba"),(Object)((httpjob._httputils2service.getObject())),(Object)(BA.ObjectToString("SubmitJob")),(Object)(__ref));
BA.debugLineNum = 219;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _download2(RemoteObject __ref,RemoteObject _link,RemoteObject _parameters) throws Exception{
try {
Debug.PushSubsStack("Download2 (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,226);
if (RapidSub.canDelegate("download2")) { return __ref.runUserSub(false, "httpjob","download2", __ref, _link, _parameters);}
Debug.locals.put("Link", _link);
Debug.locals.put("Parameters", _parameters);
BA.debugLineNum = 226;BA.debugLine="Public Sub Download2(Link As String, Parameters()";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 227;BA.debugLine="Try";
Debug.JustUpdateDeviceLine();
try { BA.debugLineNum = 228;BA.debugLine="Link = AddScheme(Link)";
Debug.JustUpdateDeviceLine();
_link = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_addscheme" /*RemoteObject*/ ,(Object)(_link));Debug.locals.put("Link", _link);
BA.debugLineNum = 229;BA.debugLine="req.InitializeGet(escapeLink(Link, Parameters))";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializeGet",(Object)(__ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_escapelink" /*RemoteObject*/ ,(Object)(_link),(Object)(_parameters))));
Debug.CheckDeviceExceptions();
}
catch (Exception e5) {
BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e5.toString()); BA.debugLineNum = 231;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("LogImpl","96225925",(RemoteObject.concat(RemoteObject.createImmutable("Invalid link: "),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_link))),RemoteObject.createImmutable(""))),0);
BA.debugLineNum = 232;BA.debugLine="req.InitializeGet(escapeLink(InvalidURL, Paramet";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializeGet",(Object)(__ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_escapelink" /*RemoteObject*/ ,(Object)(__ref.getField(true,"_invalidurl" /*RemoteObject*/ )),(Object)(_parameters))));
};
BA.debugLineNum = 234;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("CallSubDelayed2",__ref.getField(false, "ba"),(Object)((httpjob._httputils2service.getObject())),(Object)(BA.ObjectToString("SubmitJob")),(Object)(__ref));
BA.debugLineNum = 235;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _escapelink(RemoteObject __ref,RemoteObject _link,RemoteObject _parameters) throws Exception{
try {
Debug.PushSubsStack("escapeLink (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,237);
if (RapidSub.canDelegate("escapelink")) { return __ref.runUserSub(false, "httpjob","escapelink", __ref, _link, _parameters);}
RemoteObject _sb = RemoteObject.declareNull("anywheresoftware.b4a.keywords.StringBuilderWrapper");
RemoteObject _su = RemoteObject.declareNull("anywheresoftware.b4a.objects.StringUtils");
int _i = 0;
Debug.locals.put("Link", _link);
Debug.locals.put("Parameters", _parameters);
BA.debugLineNum = 237;BA.debugLine="Private Sub escapeLink(Link As String, Parameters(";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 238;BA.debugLine="Dim sb As StringBuilder";
Debug.JustUpdateDeviceLine();
_sb = RemoteObject.createNew ("anywheresoftware.b4a.keywords.StringBuilderWrapper");Debug.locals.put("sb", _sb);
BA.debugLineNum = 239;BA.debugLine="sb.Initialize";
Debug.JustUpdateDeviceLine();
_sb.runVoidMethod ("Initialize");
BA.debugLineNum = 240;BA.debugLine="sb.Append(Link)";
Debug.JustUpdateDeviceLine();
_sb.runVoidMethod ("Append",(Object)(_link));
BA.debugLineNum = 241;BA.debugLine="If Parameters.Length > 0 Then sb.Append(\"?\")";
Debug.JustUpdateDeviceLine();
if (RemoteObject.solveBoolean(">",_parameters.getField(true,"length"),BA.numberCast(double.class, 0))) {
_sb.runVoidMethod ("Append",(Object)(RemoteObject.createImmutable("?")));};
BA.debugLineNum = 242;BA.debugLine="Dim su As StringUtils";
Debug.JustUpdateDeviceLine();
_su = RemoteObject.createNew ("anywheresoftware.b4a.objects.StringUtils");Debug.locals.put("su", _su);
BA.debugLineNum = 243;BA.debugLine="For i = 0 To Parameters.Length - 1 Step 2";
Debug.JustUpdateDeviceLine();
{
final int step6 = 2;
final int limit6 = RemoteObject.solve(new RemoteObject[] {_parameters.getField(true,"length"),RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step6 > 0 && _i <= limit6) || (step6 < 0 && _i >= limit6) ;_i = ((int)(0 + _i + step6)) ) {
Debug.locals.put("i", _i);
BA.debugLineNum = 244;BA.debugLine="If i > 0 Then sb.Append(\"&\")";
Debug.JustUpdateDeviceLine();
if (RemoteObject.solveBoolean(">",RemoteObject.createImmutable(_i),BA.numberCast(double.class, 0))) {
_sb.runVoidMethod ("Append",(Object)(RemoteObject.createImmutable("&")));};
BA.debugLineNum = 245;BA.debugLine="sb.Append(su.EncodeUrl(Parameters(i), \"UTF8\")).A";
Debug.JustUpdateDeviceLine();
_sb.runMethod(false,"Append",(Object)(_su.runMethod(true,"EncodeUrl",(Object)(_parameters.getArrayElement(true,BA.numberCast(int.class, _i))),(Object)(RemoteObject.createImmutable("UTF8"))))).runVoidMethod ("Append",(Object)(RemoteObject.createImmutable("=")));
BA.debugLineNum = 246;BA.debugLine="sb.Append(su.EncodeUrl(Parameters(i + 1), \"UTF8\"";
Debug.JustUpdateDeviceLine();
_sb.runVoidMethod ("Append",(Object)(_su.runMethod(true,"EncodeUrl",(Object)(_parameters.getArrayElement(true,RemoteObject.solve(new RemoteObject[] {RemoteObject.createImmutable(_i),RemoteObject.createImmutable(1)}, "+",1, 1))),(Object)(RemoteObject.createImmutable("UTF8")))));
}
}Debug.locals.put("i", _i);
;
BA.debugLineNum = 248;BA.debugLine="Return sb.ToString";
Debug.JustUpdateDeviceLine();
if (true) return _sb.runMethod(true,"ToString");
BA.debugLineNum = 249;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _getbitmap(RemoteObject __ref) throws Exception{
try {
Debug.PushSubsStack("GetBitmap (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,321);
if (RapidSub.canDelegate("getbitmap")) { return __ref.runUserSub(false, "httpjob","getbitmap", __ref);}
RemoteObject _b = RemoteObject.declareNull("anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper");
BA.debugLineNum = 321;BA.debugLine="Public Sub GetBitmap As Bitmap";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 322;BA.debugLine="Dim b As Bitmap";
Debug.JustUpdateDeviceLine();
_b = RemoteObject.createNew ("anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper");Debug.locals.put("b", _b);
BA.debugLineNum = 323;BA.debugLine="b = LoadBitmap(HttpUtils2Service.TempFolder, task";
Debug.JustUpdateDeviceLine();
_b = httpjob.__c.runMethod(false,"LoadBitmap",(Object)(httpjob._httputils2service._tempfolder /*RemoteObject*/ ),(Object)(__ref.getField(true,"_taskid" /*RemoteObject*/ )));Debug.locals.put("b", _b);
BA.debugLineNum = 324;BA.debugLine="Return b";
Debug.JustUpdateDeviceLine();
if (true) return _b;
BA.debugLineNum = 325;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _getbitmapresize(RemoteObject __ref,RemoteObject _width,RemoteObject _height,RemoteObject _keepaspectratio) throws Exception{
try {
Debug.PushSubsStack("GetBitmapResize (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,332);
if (RapidSub.canDelegate("getbitmapresize")) { return __ref.runUserSub(false, "httpjob","getbitmapresize", __ref, _width, _height, _keepaspectratio);}
Debug.locals.put("Width", _width);
Debug.locals.put("Height", _height);
Debug.locals.put("KeepAspectRatio", _keepaspectratio);
BA.debugLineNum = 332;BA.debugLine="Public Sub GetBitmapResize(Width As Int, Height As";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 333;BA.debugLine="Return LoadBitmapResize(HttpUtils2Service.TempFol";
Debug.JustUpdateDeviceLine();
if (true) return httpjob.__c.runMethod(false,"LoadBitmapResize",(Object)(httpjob._httputils2service._tempfolder /*RemoteObject*/ ),(Object)(__ref.getField(true,"_taskid" /*RemoteObject*/ )),(Object)(_width),(Object)(_height),(Object)(_keepaspectratio));
BA.debugLineNum = 334;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _getbitmapsample(RemoteObject __ref,RemoteObject _width,RemoteObject _height) throws Exception{
try {
Debug.PushSubsStack("GetBitmapSample (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,328);
if (RapidSub.canDelegate("getbitmapsample")) { return __ref.runUserSub(false, "httpjob","getbitmapsample", __ref, _width, _height);}
Debug.locals.put("Width", _width);
Debug.locals.put("Height", _height);
BA.debugLineNum = 328;BA.debugLine="Public Sub GetBitmapSample(Width As Int, Height As";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 329;BA.debugLine="Return LoadBitmapSample(HttpUtils2Service.TempFol";
Debug.JustUpdateDeviceLine();
if (true) return httpjob.__c.runMethod(false,"LoadBitmapSample",(Object)(httpjob._httputils2service._tempfolder /*RemoteObject*/ ),(Object)(__ref.getField(true,"_taskid" /*RemoteObject*/ )),(Object)(_width),(Object)(_height));
BA.debugLineNum = 330;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _getinputstream(RemoteObject __ref) throws Exception{
try {
Debug.PushSubsStack("GetInputStream (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,338);
if (RapidSub.canDelegate("getinputstream")) { return __ref.runUserSub(false, "httpjob","getinputstream", __ref);}
RemoteObject _in = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");
BA.debugLineNum = 338;BA.debugLine="Public Sub GetInputStream As InputStream";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 339;BA.debugLine="Dim In As InputStream";
Debug.JustUpdateDeviceLine();
_in = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");Debug.locals.put("In", _in);
BA.debugLineNum = 340;BA.debugLine="In = File.OpenInput(HttpUtils2Service.TempFolder,";
Debug.JustUpdateDeviceLine();
_in = httpjob.__c.getField(false,"File").runMethod(false,"OpenInput",(Object)(httpjob._httputils2service._tempfolder /*RemoteObject*/ ),(Object)(__ref.getField(true,"_taskid" /*RemoteObject*/ )));Debug.locals.put("In", _in);
BA.debugLineNum = 341;BA.debugLine="Return In";
Debug.JustUpdateDeviceLine();
if (true) return _in;
BA.debugLineNum = 342;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _getrequest(RemoteObject __ref) throws Exception{
try {
Debug.PushSubsStack("GetRequest (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,301);
if (RapidSub.canDelegate("getrequest")) { return __ref.runUserSub(false, "httpjob","getrequest", __ref);}
BA.debugLineNum = 301;BA.debugLine="Public Sub GetRequest As OkHttpRequest";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 302;BA.debugLine="Return req";
Debug.JustUpdateDeviceLine();
if (true) return __ref.getField(false,"_req" /*RemoteObject*/ );
BA.debugLineNum = 303;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable(null);
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _getstring(RemoteObject __ref) throws Exception{
try {
Debug.PushSubsStack("GetString (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,282);
if (RapidSub.canDelegate("getstring")) { return __ref.runUserSub(false, "httpjob","getstring", __ref);}
BA.debugLineNum = 282;BA.debugLine="Public Sub GetString As String";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 283;BA.debugLine="Return GetString2(\"UTF8\")";
Debug.JustUpdateDeviceLine();
if (true) return __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_getstring2" /*RemoteObject*/ ,(Object)(RemoteObject.createImmutable("UTF8")));
BA.debugLineNum = 284;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _getstring2(RemoteObject __ref,RemoteObject _encoding) throws Exception{
try {
Debug.PushSubsStack("GetString2 (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,287);
if (RapidSub.canDelegate("getstring2")) { return __ref.runUserSub(false, "httpjob","getstring2", __ref, _encoding);}
RemoteObject _tr = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.TextReaderWrapper");
RemoteObject _res = RemoteObject.createImmutable("");
Debug.locals.put("Encoding", _encoding);
BA.debugLineNum = 287;BA.debugLine="Public Sub GetString2(Encoding As String) As Strin";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 291;BA.debugLine="Dim tr As TextReader";
Debug.JustUpdateDeviceLine();
_tr = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.TextReaderWrapper");Debug.locals.put("tr", _tr);
BA.debugLineNum = 292;BA.debugLine="tr.Initialize2(File.OpenInput(HttpUtils2Service.T";
Debug.JustUpdateDeviceLine();
_tr.runVoidMethod ("Initialize2",(Object)((httpjob.__c.getField(false,"File").runMethod(false,"OpenInput",(Object)(httpjob._httputils2service._tempfolder /*RemoteObject*/ ),(Object)(__ref.getField(true,"_taskid" /*RemoteObject*/ ))).getObject())),(Object)(_encoding));
BA.debugLineNum = 293;BA.debugLine="Dim res As String = tr.ReadAll";
Debug.JustUpdateDeviceLine();
_res = _tr.runMethod(true,"ReadAll");Debug.locals.put("res", _res);Debug.locals.put("res", _res);
BA.debugLineNum = 294;BA.debugLine="tr.Close";
Debug.JustUpdateDeviceLine();
_tr.runVoidMethod ("Close");
BA.debugLineNum = 295;BA.debugLine="Return res";
Debug.JustUpdateDeviceLine();
if (true) return _res;
BA.debugLineNum = 297;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _head(RemoteObject __ref,RemoteObject _link) throws Exception{
try {
Debug.PushSubsStack("Head (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,110);
if (RapidSub.canDelegate("head")) { return __ref.runUserSub(false, "httpjob","head", __ref, _link);}
Debug.locals.put("Link", _link);
BA.debugLineNum = 110;BA.debugLine="Public Sub Head(Link As String)";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 111;BA.debugLine="Try";
Debug.JustUpdateDeviceLine();
try { BA.debugLineNum = 112;BA.debugLine="Link = AddScheme(Link)";
Debug.JustUpdateDeviceLine();
_link = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_addscheme" /*RemoteObject*/ ,(Object)(_link));Debug.locals.put("Link", _link);
BA.debugLineNum = 113;BA.debugLine="req.InitializeHead(Link)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializeHead",(Object)(_link));
Debug.CheckDeviceExceptions();
}
catch (Exception e5) {
BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e5.toString()); BA.debugLineNum = 115;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("LogImpl","95898245",(RemoteObject.concat(RemoteObject.createImmutable("Invalid link: "),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_link))),RemoteObject.createImmutable(""))),0);
BA.debugLineNum = 116;BA.debugLine="req.InitializeHead(InvalidURL)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializeHead",(Object)(__ref.getField(true,"_invalidurl" /*RemoteObject*/ )));
};
BA.debugLineNum = 118;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("CallSubDelayed2",__ref.getField(false, "ba"),(Object)((httpjob._httputils2service.getObject())),(Object)(BA.ObjectToString("SubmitJob")),(Object)(__ref));
BA.debugLineNum = 119;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _initialize(RemoteObject __ref,RemoteObject _ba,RemoteObject _name,RemoteObject _targetmodule) throws Exception{
try {
Debug.PushSubsStack("Initialize (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,38);
if (RapidSub.canDelegate("initialize")) { return __ref.runUserSub(false, "httpjob","initialize", __ref, _ba, _name, _targetmodule);}
__ref.runVoidMethodAndSync("innerInitializeHelper", _ba);
Debug.locals.put("ba", _ba);
Debug.locals.put("Name", _name);
Debug.locals.put("TargetModule", _targetmodule);
BA.debugLineNum = 38;BA.debugLine="Public Sub Initialize (Name As String, TargetModul";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 39;BA.debugLine="JobName = Name";
Debug.JustUpdateDeviceLine();
__ref.setField ("_jobname" /*RemoteObject*/ ,_name);
BA.debugLineNum = 40;BA.debugLine="target = TargetModule";
Debug.JustUpdateDeviceLine();
__ref.setField ("_target" /*RemoteObject*/ ,_targetmodule);
BA.debugLineNum = 41;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _multipartstartsection(RemoteObject __ref,RemoteObject _stream,RemoteObject _empty) throws Exception{
try {
Debug.PushSubsStack("MultipartStartSection (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,170);
if (RapidSub.canDelegate("multipartstartsection")) { return __ref.runUserSub(false, "httpjob","multipartstartsection", __ref, _stream, _empty);}
Debug.locals.put("stream", _stream);
Debug.locals.put("empty", _empty);
BA.debugLineNum = 170;BA.debugLine="Private Sub MultipartStartSection (stream As Outpu";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 171;BA.debugLine="If empty = False Then";
Debug.JustUpdateDeviceLine();
if (RemoteObject.solveBoolean("=",_empty,httpjob.__c.getField(true,"False"))) {
BA.debugLineNum = 172;BA.debugLine="stream.WriteBytes(Array As Byte(13, 10), 0, 2)";
Debug.JustUpdateDeviceLine();
_stream.runVoidMethod ("WriteBytes",(Object)(RemoteObject.createNewArray("byte",new int[] {2},new Object[] {BA.numberCast(byte.class, 13),BA.numberCast(byte.class, 10)})),(Object)(BA.numberCast(int.class, 0)),(Object)(BA.numberCast(int.class, 2)));
}else {
BA.debugLineNum = 174;BA.debugLine="empty = False";
Debug.JustUpdateDeviceLine();
_empty = httpjob.__c.getField(true,"False");Debug.locals.put("empty", _empty);
};
BA.debugLineNum = 176;BA.debugLine="Return empty";
Debug.JustUpdateDeviceLine();
if (true) return _empty;
BA.debugLineNum = 177;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _patchbytes(RemoteObject __ref,RemoteObject _link,RemoteObject _data) throws Exception{
try {
Debug.PushSubsStack("PatchBytes (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,88);
if (RapidSub.canDelegate("patchbytes")) { return __ref.runUserSub(false, "httpjob","patchbytes", __ref, _link, _data);}
Debug.locals.put("Link", _link);
Debug.locals.put("Data", _data);
BA.debugLineNum = 88;BA.debugLine="Public Sub PatchBytes(Link As String, Data() As By";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 89;BA.debugLine="Link = AddScheme(Link)";
Debug.JustUpdateDeviceLine();
_link = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_addscheme" /*RemoteObject*/ ,(Object)(_link));Debug.locals.put("Link", _link);
BA.debugLineNum = 97;BA.debugLine="Try";
Debug.JustUpdateDeviceLine();
try { BA.debugLineNum = 98;BA.debugLine="req.InitializePatch2(Link, Data)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializePatch2",(Object)(_link),(Object)(_data));
Debug.CheckDeviceExceptions();
}
catch (Exception e5) {
BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e5.toString()); BA.debugLineNum = 100;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("LogImpl","95832716",(RemoteObject.concat(RemoteObject.createImmutable("Invalid link: "),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_link))),RemoteObject.createImmutable(""))),0);
BA.debugLineNum = 101;BA.debugLine="req.InitializePatch2(InvalidURL, Data)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializePatch2",(Object)(__ref.getField(true,"_invalidurl" /*RemoteObject*/ )),(Object)(_data));
};
BA.debugLineNum = 105;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("CallSubDelayed2",__ref.getField(false, "ba"),(Object)((httpjob._httputils2service.getObject())),(Object)(BA.ObjectToString("SubmitJob")),(Object)(__ref));
BA.debugLineNum = 106;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _patchstring(RemoteObject __ref,RemoteObject _link,RemoteObject _text) throws Exception{
try {
Debug.PushSubsStack("PatchString (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,83);
if (RapidSub.canDelegate("patchstring")) { return __ref.runUserSub(false, "httpjob","patchstring", __ref, _link, _text);}
Debug.locals.put("Link", _link);
Debug.locals.put("Text", _text);
BA.debugLineNum = 83;BA.debugLine="Public Sub PatchString(Link As String, Text As Str";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 84;BA.debugLine="PatchBytes(Link, Text.GetBytes(\"UTF8\"))";
Debug.JustUpdateDeviceLine();
__ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_patchbytes" /*RemoteObject*/ ,(Object)(_link),(Object)(_text.runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF8")))));
BA.debugLineNum = 85;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _postbytes(RemoteObject __ref,RemoteObject _link,RemoteObject _data) throws Exception{
try {
Debug.PushSubsStack("PostBytes (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,54);
if (RapidSub.canDelegate("postbytes")) { return __ref.runUserSub(false, "httpjob","postbytes", __ref, _link, _data);}
Debug.locals.put("Link", _link);
Debug.locals.put("Data", _data);
BA.debugLineNum = 54;BA.debugLine="Public Sub PostBytes(Link As String, Data() As Byt";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 55;BA.debugLine="Try";
Debug.JustUpdateDeviceLine();
try { BA.debugLineNum = 56;BA.debugLine="Link = AddScheme(Link)";
Debug.JustUpdateDeviceLine();
_link = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_addscheme" /*RemoteObject*/ ,(Object)(_link));Debug.locals.put("Link", _link);
BA.debugLineNum = 57;BA.debugLine="req.InitializePost2(Link, Data)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializePost2",(Object)(_link),(Object)(_data));
Debug.CheckDeviceExceptions();
}
catch (Exception e5) {
BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e5.toString()); BA.debugLineNum = 59;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("LogImpl","95570565",(RemoteObject.concat(RemoteObject.createImmutable("Invalid link: "),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_link))),RemoteObject.createImmutable(""))),0);
BA.debugLineNum = 60;BA.debugLine="req.InitializePost2(InvalidURL, Data)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializePost2",(Object)(__ref.getField(true,"_invalidurl" /*RemoteObject*/ )),(Object)(_data));
};
BA.debugLineNum = 62;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("CallSubDelayed2",__ref.getField(false, "ba"),(Object)((httpjob._httputils2service.getObject())),(Object)(BA.ObjectToString("SubmitJob")),(Object)(__ref));
BA.debugLineNum = 63;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _postfile(RemoteObject __ref,RemoteObject _link,RemoteObject _dir,RemoteObject _filename) throws Exception{
try {
Debug.PushSubsStack("PostFile (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,181);
if (RapidSub.canDelegate("postfile")) { return __ref.runUserSub(false, "httpjob","postfile", __ref, _link, _dir, _filename);}
RemoteObject _length = RemoteObject.createImmutable(0);
RemoteObject _in = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");
RemoteObject _out = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
Debug.locals.put("Link", _link);
Debug.locals.put("Dir", _dir);
Debug.locals.put("FileName", _filename);
BA.debugLineNum = 181;BA.debugLine="Public Sub PostFile(Link As String, Dir As String,";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 182;BA.debugLine="Link = AddScheme(Link)";
Debug.JustUpdateDeviceLine();
_link = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_addscheme" /*RemoteObject*/ ,(Object)(_link));Debug.locals.put("Link", _link);
BA.debugLineNum = 187;BA.debugLine="Dim length As Int";
Debug.JustUpdateDeviceLine();
_length = RemoteObject.createImmutable(0);Debug.locals.put("length", _length);
BA.debugLineNum = 188;BA.debugLine="If Dir = File.DirAssets Then";
Debug.JustUpdateDeviceLine();
if (RemoteObject.solveBoolean("=",_dir,httpjob.__c.getField(false,"File").runMethod(true,"getDirAssets"))) {
BA.debugLineNum = 189;BA.debugLine="Log(\"Cannot send files from the assets folder.\")";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("LogImpl","96094856",RemoteObject.createImmutable("Cannot send files from the assets folder."),0);
BA.debugLineNum = 190;BA.debugLine="Return";
Debug.JustUpdateDeviceLine();
if (true) return RemoteObject.createImmutable("");
};
BA.debugLineNum = 192;BA.debugLine="length = File.Size(Dir, FileName)";
Debug.JustUpdateDeviceLine();
_length = BA.numberCast(int.class, httpjob.__c.getField(false,"File").runMethod(true,"Size",(Object)(_dir),(Object)(_filename)));Debug.locals.put("length", _length);
BA.debugLineNum = 193;BA.debugLine="Dim In As InputStream";
Debug.JustUpdateDeviceLine();
_in = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");Debug.locals.put("In", _in);
BA.debugLineNum = 194;BA.debugLine="In = File.OpenInput(Dir, FileName)";
Debug.JustUpdateDeviceLine();
_in = httpjob.__c.getField(false,"File").runMethod(false,"OpenInput",(Object)(_dir),(Object)(_filename));Debug.locals.put("In", _in);
BA.debugLineNum = 195;BA.debugLine="If length < 1000000 Then '1mb";
Debug.JustUpdateDeviceLine();
if (RemoteObject.solveBoolean("<",_length,BA.numberCast(double.class, 1000000))) {
BA.debugLineNum = 198;BA.debugLine="Dim out As OutputStream";
Debug.JustUpdateDeviceLine();
_out = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");Debug.locals.put("out", _out);
BA.debugLineNum = 199;BA.debugLine="out.InitializeToBytesArray(length)";
Debug.JustUpdateDeviceLine();
_out.runVoidMethod ("InitializeToBytesArray",(Object)(_length));
BA.debugLineNum = 200;BA.debugLine="File.Copy2(In, out)";
Debug.JustUpdateDeviceLine();
httpjob.__c.getField(false,"File").runVoidMethod ("Copy2",(Object)((_in.getObject())),(Object)((_out.getObject())));
BA.debugLineNum = 201;BA.debugLine="PostBytes(Link, out.ToBytesArray)";
Debug.JustUpdateDeviceLine();
__ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_postbytes" /*RemoteObject*/ ,(Object)(_link),(Object)(_out.runMethod(false,"ToBytesArray")));
}else {
BA.debugLineNum = 203;BA.debugLine="req.InitializePost(Link, In, length)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializePost",(Object)(_link),(Object)((_in.getObject())),(Object)(_length));
BA.debugLineNum = 204;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\",";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("CallSubDelayed2",__ref.getField(false, "ba"),(Object)((httpjob._httputils2service.getObject())),(Object)(BA.ObjectToString("SubmitJob")),(Object)(__ref));
};
BA.debugLineNum = 207;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _postmultipart(RemoteObject __ref,RemoteObject _link,RemoteObject _namevalues,RemoteObject _files) throws Exception{
try {
Debug.PushSubsStack("PostMultipart (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,124);
if (RapidSub.canDelegate("postmultipart")) { return __ref.runUserSub(false, "httpjob","postmultipart", __ref, _link, _namevalues, _files);}
RemoteObject _boundary = RemoteObject.createImmutable("");
RemoteObject _stream = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
RemoteObject _b = null;
RemoteObject _eol = RemoteObject.createImmutable("");
RemoteObject _empty = RemoteObject.createImmutable(false);
RemoteObject _key = RemoteObject.createImmutable("");
RemoteObject _value = RemoteObject.createImmutable("");
RemoteObject _s = RemoteObject.createImmutable("");
RemoteObject _fd = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.httpjob._multipartfiledata");
RemoteObject _in = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");
Debug.locals.put("Link", _link);
Debug.locals.put("NameValues", _namevalues);
Debug.locals.put("Files", _files);
BA.debugLineNum = 124;BA.debugLine="Public Sub PostMultipart(Link As String, NameValue";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 125;BA.debugLine="Dim boundary As String = \"-----------------------";
Debug.JustUpdateDeviceLine();
_boundary = BA.ObjectToString("---------------------------1461124740692");Debug.locals.put("boundary", _boundary);Debug.locals.put("boundary", _boundary);
BA.debugLineNum = 126;BA.debugLine="Dim stream As OutputStream";
Debug.JustUpdateDeviceLine();
_stream = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");Debug.locals.put("stream", _stream);
BA.debugLineNum = 127;BA.debugLine="stream.InitializeToBytesArray(0)";
Debug.JustUpdateDeviceLine();
_stream.runVoidMethod ("InitializeToBytesArray",(Object)(BA.numberCast(int.class, 0)));
BA.debugLineNum = 128;BA.debugLine="Dim b() As Byte";
Debug.JustUpdateDeviceLine();
_b = RemoteObject.createNewArray ("byte", new int[] {0}, new Object[]{});Debug.locals.put("b", _b);
BA.debugLineNum = 129;BA.debugLine="Dim eol As String = Chr(13) & Chr(10)";
Debug.JustUpdateDeviceLine();
_eol = RemoteObject.concat(httpjob.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 13))),httpjob.__c.runMethod(true,"Chr",(Object)(BA.numberCast(int.class, 10))));Debug.locals.put("eol", _eol);Debug.locals.put("eol", _eol);
BA.debugLineNum = 130;BA.debugLine="Dim empty As Boolean = True";
Debug.JustUpdateDeviceLine();
_empty = httpjob.__c.getField(true,"True");Debug.locals.put("empty", _empty);Debug.locals.put("empty", _empty);
BA.debugLineNum = 131;BA.debugLine="If NameValues <> Null And NameValues.IsInitialize";
Debug.JustUpdateDeviceLine();
if (RemoteObject.solveBoolean("N",_namevalues) && RemoteObject.solveBoolean(".",_namevalues.runMethod(true,"IsInitialized"))) {
BA.debugLineNum = 132;BA.debugLine="For Each key As String In NameValues.Keys";
Debug.JustUpdateDeviceLine();
{
final RemoteObject group8 = _namevalues.runMethod(false,"Keys");
final int groupLen8 = group8.runMethod(true,"getSize").<Integer>get()
;int index8 = 0;
;
for (; index8 < groupLen8;index8++){
_key = BA.ObjectToString(group8.runMethod(false,"Get",index8));Debug.locals.put("key", _key);
Debug.locals.put("key", _key);
BA.debugLineNum = 133;BA.debugLine="Dim value As String = NameValues.Get(key)";
Debug.JustUpdateDeviceLine();
_value = BA.ObjectToString(_namevalues.runMethod(false,"Get",(Object)((_key))));Debug.locals.put("value", _value);Debug.locals.put("value", _value);
BA.debugLineNum = 134;BA.debugLine="empty = MultipartStartSection (stream, empty)";
Debug.JustUpdateDeviceLine();
_empty = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_multipartstartsection" /*RemoteObject*/ ,(Object)(_stream),(Object)(_empty));Debug.locals.put("empty", _empty);
BA.debugLineNum = 135;BA.debugLine="Dim s As String = _ $\"--${boundary} Content-Dis";
Debug.JustUpdateDeviceLine();
_s = (RemoteObject.concat(RemoteObject.createImmutable("--"),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_boundary))),RemoteObject.createImmutable("\n"),RemoteObject.createImmutable("Content-Disposition: form-data; name=\""),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_key))),RemoteObject.createImmutable("\"\n"),RemoteObject.createImmutable("\n"),RemoteObject.createImmutable(""),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_value))),RemoteObject.createImmutable("")));Debug.locals.put("s", _s);Debug.locals.put("s", _s);
BA.debugLineNum = 140;BA.debugLine="b = s.Replace(CRLF, eol).GetBytes(\"UTF8\")";
Debug.JustUpdateDeviceLine();
_b = _s.runMethod(true,"replace",(Object)(httpjob.__c.getField(true,"CRLF")),(Object)(_eol)).runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF8")));Debug.locals.put("b", _b);
BA.debugLineNum = 141;BA.debugLine="stream.WriteBytes(b, 0, b.Length)";
Debug.JustUpdateDeviceLine();
_stream.runVoidMethod ("WriteBytes",(Object)(_b),(Object)(BA.numberCast(int.class, 0)),(Object)(_b.getField(true,"length")));
}
}Debug.locals.put("key", _key);
;
};
BA.debugLineNum = 144;BA.debugLine="If Files <> Null And Files.IsInitialized Then";
Debug.JustUpdateDeviceLine();
if (RemoteObject.solveBoolean("N",_files) && RemoteObject.solveBoolean(".",_files.runMethod(true,"IsInitialized"))) {
BA.debugLineNum = 145;BA.debugLine="For Each fd As MultipartFileData In Files";
Debug.JustUpdateDeviceLine();
{
final RemoteObject group17 = _files;
final int groupLen17 = group17.runMethod(true,"getSize").<Integer>get()
;int index17 = 0;
;
for (; index17 < groupLen17;index17++){
_fd = (group17.runMethod(false,"Get",index17));Debug.locals.put("fd", _fd);
Debug.locals.put("fd", _fd);
BA.debugLineNum = 146;BA.debugLine="empty = MultipartStartSection (stream, empty)";
Debug.JustUpdateDeviceLine();
_empty = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_multipartstartsection" /*RemoteObject*/ ,(Object)(_stream),(Object)(_empty));Debug.locals.put("empty", _empty);
BA.debugLineNum = 147;BA.debugLine="Dim s As String = _ $\"--${boundary} Content-Dis";
Debug.JustUpdateDeviceLine();
_s = (RemoteObject.concat(RemoteObject.createImmutable("--"),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_boundary))),RemoteObject.createImmutable("\n"),RemoteObject.createImmutable("Content-Disposition: form-data; name=\""),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_fd.getField(true,"KeyName" /*RemoteObject*/ )))),RemoteObject.createImmutable("\"; filename=\""),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_fd.getField(true,"FileName" /*RemoteObject*/ )))),RemoteObject.createImmutable("\"\n"),RemoteObject.createImmutable("Content-Type: "),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_fd.getField(true,"ContentType" /*RemoteObject*/ )))),RemoteObject.createImmutable("\n"),RemoteObject.createImmutable("\n"),RemoteObject.createImmutable("")));Debug.locals.put("s", _s);Debug.locals.put("s", _s);
BA.debugLineNum = 153;BA.debugLine="b = s.Replace(CRLF, eol).GetBytes(\"UTF8\")";
Debug.JustUpdateDeviceLine();
_b = _s.runMethod(true,"replace",(Object)(httpjob.__c.getField(true,"CRLF")),(Object)(_eol)).runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF8")));Debug.locals.put("b", _b);
BA.debugLineNum = 154;BA.debugLine="stream.WriteBytes(b, 0, b.Length)";
Debug.JustUpdateDeviceLine();
_stream.runVoidMethod ("WriteBytes",(Object)(_b),(Object)(BA.numberCast(int.class, 0)),(Object)(_b.getField(true,"length")));
BA.debugLineNum = 155;BA.debugLine="Dim in As InputStream = File.OpenInput(fd.Dir,";
Debug.JustUpdateDeviceLine();
_in = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.InputStreamWrapper");
_in = httpjob.__c.getField(false,"File").runMethod(false,"OpenInput",(Object)(_fd.getField(true,"Dir" /*RemoteObject*/ )),(Object)(_fd.getField(true,"FileName" /*RemoteObject*/ )));Debug.locals.put("in", _in);Debug.locals.put("in", _in);
BA.debugLineNum = 156;BA.debugLine="File.Copy2(in, stream)";
Debug.JustUpdateDeviceLine();
httpjob.__c.getField(false,"File").runVoidMethod ("Copy2",(Object)((_in.getObject())),(Object)((_stream.getObject())));
}
}Debug.locals.put("fd", _fd);
;
};
BA.debugLineNum = 159;BA.debugLine="empty = MultipartStartSection (stream, empty)";
Debug.JustUpdateDeviceLine();
_empty = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_multipartstartsection" /*RemoteObject*/ ,(Object)(_stream),(Object)(_empty));Debug.locals.put("empty", _empty);
BA.debugLineNum = 160;BA.debugLine="s = _ $\"--${boundary}-- \"$";
Debug.JustUpdateDeviceLine();
_s = (RemoteObject.concat(RemoteObject.createImmutable("--"),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_boundary))),RemoteObject.createImmutable("--\n"),RemoteObject.createImmutable("")));Debug.locals.put("s", _s);
BA.debugLineNum = 163;BA.debugLine="b = s.Replace(CRLF, eol).GetBytes(\"UTF8\")";
Debug.JustUpdateDeviceLine();
_b = _s.runMethod(true,"replace",(Object)(httpjob.__c.getField(true,"CRLF")),(Object)(_eol)).runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF8")));Debug.locals.put("b", _b);
BA.debugLineNum = 164;BA.debugLine="stream.WriteBytes(b, 0, b.Length)";
Debug.JustUpdateDeviceLine();
_stream.runVoidMethod ("WriteBytes",(Object)(_b),(Object)(BA.numberCast(int.class, 0)),(Object)(_b.getField(true,"length")));
BA.debugLineNum = 165;BA.debugLine="PostBytes(Link, stream.ToBytesArray)";
Debug.JustUpdateDeviceLine();
__ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_postbytes" /*RemoteObject*/ ,(Object)(_link),(Object)(_stream.runMethod(false,"ToBytesArray")));
BA.debugLineNum = 166;BA.debugLine="req.SetContentType(\"multipart/form-data; boundary";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("SetContentType",(Object)(RemoteObject.concat(RemoteObject.createImmutable("multipart/form-data; boundary="),_boundary)));
BA.debugLineNum = 167;BA.debugLine="req.SetContentEncoding(\"UTF8\")";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("SetContentEncoding",(Object)(RemoteObject.createImmutable("UTF8")));
BA.debugLineNum = 168;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _poststring(RemoteObject __ref,RemoteObject _link,RemoteObject _text) throws Exception{
try {
Debug.PushSubsStack("PostString (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,49);
if (RapidSub.canDelegate("poststring")) { return __ref.runUserSub(false, "httpjob","poststring", __ref, _link, _text);}
Debug.locals.put("Link", _link);
Debug.locals.put("Text", _text);
BA.debugLineNum = 49;BA.debugLine="Public Sub PostString(Link As String, Text As Stri";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 50;BA.debugLine="PostBytes(Link, Text.GetBytes(\"UTF8\"))";
Debug.JustUpdateDeviceLine();
__ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_postbytes" /*RemoteObject*/ ,(Object)(_link),(Object)(_text.runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF8")))));
BA.debugLineNum = 51;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _putbytes(RemoteObject __ref,RemoteObject _link,RemoteObject _data) throws Exception{
try {
Debug.PushSubsStack("PutBytes (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,71);
if (RapidSub.canDelegate("putbytes")) { return __ref.runUserSub(false, "httpjob","putbytes", __ref, _link, _data);}
Debug.locals.put("Link", _link);
Debug.locals.put("Data", _data);
BA.debugLineNum = 71;BA.debugLine="Public Sub PutBytes(Link As String, Data() As Byte";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 72;BA.debugLine="Try";
Debug.JustUpdateDeviceLine();
try { BA.debugLineNum = 73;BA.debugLine="Link = AddScheme(Link)";
Debug.JustUpdateDeviceLine();
_link = __ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_addscheme" /*RemoteObject*/ ,(Object)(_link));Debug.locals.put("Link", _link);
BA.debugLineNum = 74;BA.debugLine="req.InitializePut2(Link, Data)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializePut2",(Object)(_link),(Object)(_data));
Debug.CheckDeviceExceptions();
}
catch (Exception e5) {
BA.rdebugUtils.runVoidMethod("setLastException",__ref.getField(false, "ba"), e5.toString()); BA.debugLineNum = 76;BA.debugLine="Log($\"Invalid link: ${Link}\"$)";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("LogImpl","95701637",(RemoteObject.concat(RemoteObject.createImmutable("Invalid link: "),httpjob.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_link))),RemoteObject.createImmutable(""))),0);
BA.debugLineNum = 77;BA.debugLine="req.InitializePut2(InvalidURL, Data)";
Debug.JustUpdateDeviceLine();
__ref.getField(false,"_req" /*RemoteObject*/ ).runVoidMethod ("InitializePut2",(Object)(__ref.getField(true,"_invalidurl" /*RemoteObject*/ )),(Object)(_data));
};
BA.debugLineNum = 79;BA.debugLine="CallSubDelayed2(HttpUtils2Service, \"SubmitJob\", M";
Debug.JustUpdateDeviceLine();
httpjob.__c.runVoidMethod ("CallSubDelayed2",__ref.getField(false, "ba"),(Object)((httpjob._httputils2service.getObject())),(Object)(BA.ObjectToString("SubmitJob")),(Object)(__ref));
BA.debugLineNum = 80;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _putstring(RemoteObject __ref,RemoteObject _link,RemoteObject _text) throws Exception{
try {
Debug.PushSubsStack("PutString (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,66);
if (RapidSub.canDelegate("putstring")) { return __ref.runUserSub(false, "httpjob","putstring", __ref, _link, _text);}
Debug.locals.put("Link", _link);
Debug.locals.put("Text", _text);
BA.debugLineNum = 66;BA.debugLine="Public Sub PutString(Link As String, Text As Strin";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 67;BA.debugLine="PutBytes(Link, Text.GetBytes(\"UTF8\"))";
Debug.JustUpdateDeviceLine();
__ref.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_putbytes" /*RemoteObject*/ ,(Object)(_link),(Object)(_text.runMethod(false,"getBytes",(Object)(RemoteObject.createImmutable("UTF8")))));
BA.debugLineNum = 68;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _release(RemoteObject __ref) throws Exception{
try {
Debug.PushSubsStack("Release (httpjob) ","httpjob",4,__ref.getField(false, "ba"),__ref,275);
if (RapidSub.canDelegate("release")) { return __ref.runUserSub(false, "httpjob","release", __ref);}
BA.debugLineNum = 275;BA.debugLine="Public Sub Release";
Debug.JustUpdateDeviceLine();
BA.debugLineNum = 277;BA.debugLine="File.Delete(HttpUtils2Service.TempFolder, taskId)";
Debug.JustUpdateDeviceLine();
httpjob.__c.getField(false,"File").runVoidMethod ("Delete",(Object)(httpjob._httputils2service._tempfolder /*RemoteObject*/ ),(Object)(__ref.getField(true,"_taskid" /*RemoteObject*/ )));
BA.debugLineNum = 279;BA.debugLine="End Sub";
Debug.JustUpdateDeviceLine();
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
}

View File

@@ -0,0 +1,58 @@
package anywheresoftware.b4a.samples.camera;
import java.io.IOException;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.PCBA;
import anywheresoftware.b4a.pc.RDebug;
import anywheresoftware.b4a.pc.RemoteObject;
import anywheresoftware.b4a.pc.RDebug.IRemote;
import anywheresoftware.b4a.pc.Debug;
import anywheresoftware.b4a.pc.B4XTypes.B4XClass;
import anywheresoftware.b4a.pc.B4XTypes.DeviceClass;
public class httputils2service implements IRemote{
public static httputils2service mostCurrent;
public static RemoteObject processBA;
public static boolean processGlobalsRun;
public static RemoteObject myClass;
public static RemoteObject remoteMe;
public httputils2service() {
mostCurrent = this;
}
public RemoteObject getRemoteMe() {
return remoteMe;
}
public boolean isSingleton() {
return true;
}
static {
anywheresoftware.b4a.pc.RapidSub.moduleToObject.put(new B4XClass("httputils2service"), "anywheresoftware.b4a.samples.camera.httputils2service");
}
public static RemoteObject getObject() {
return myClass;
}
public RemoteObject _service;
private PCBA pcBA;
public PCBA create(Object[] args) throws ClassNotFoundException{
processBA = (RemoteObject) args[1];
_service = (RemoteObject) args[2];
remoteMe = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.httputils2service");
anywheresoftware.b4a.keywords.Common.Density = (Float)args[3];
pcBA = new PCBA(this, httputils2service.class);
main_subs_0.initializeProcessGlobals();
return pcBA;
}
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
public static RemoteObject _hc = RemoteObject.declareNull("anywheresoftware.b4h.okhttp.OkHttpClientWrapper");
public static RemoteObject _taskidtojob = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.Map");
public static RemoteObject _tempfolder = RemoteObject.createImmutable("");
public static RemoteObject _taskcounter = RemoteObject.createImmutable(0);
public static anywheresoftware.b4a.samples.camera.main _main = null;
public static anywheresoftware.b4a.samples.camera.starter _starter = null;
public Object[] GetGlobals() {
return new Object[] {"hc",httputils2service._hc,"Main",Debug.moduleToString(anywheresoftware.b4a.samples.camera.main.class),"Service",httputils2service.mostCurrent._service,"Starter",Debug.moduleToString(anywheresoftware.b4a.samples.camera.starter.class),"taskCounter",httputils2service._taskcounter,"TaskIdToJob",httputils2service._taskidtojob,"TempFolder",httputils2service._tempfolder};
}
}

View File

@@ -0,0 +1,321 @@
package anywheresoftware.b4a.samples.camera;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;
public class httputils2service_subs_0 {
public static RemoteObject _completejob(RemoteObject _taskid,RemoteObject _success,RemoteObject _errormessage) throws Exception{
try {
Debug.PushSubsStack("CompleteJob (httputils2service) ","httputils2service",3,httputils2service.processBA,httputils2service.mostCurrent,142);
if (RapidSub.canDelegate("completejob")) { return anywheresoftware.b4a.samples.camera.httputils2service.remoteMe.runUserSub(false, "httputils2service","completejob", _taskid, _success, _errormessage);}
RemoteObject _job = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.httpjob");
Debug.locals.put("TaskId", _taskid);
Debug.locals.put("success", _success);
Debug.locals.put("errorMessage", _errormessage);
BA.debugLineNum = 142;BA.debugLine="Sub CompleteJob(TaskId As Int, success As Boolean,";
Debug.ShouldStop(8192);
BA.debugLineNum = 146;BA.debugLine="Dim job As HttpJob = TaskIdToJob.Get(TaskId)";
Debug.ShouldStop(131072);
_job = (httputils2service._taskidtojob.runMethod(false,"Get",(Object)((_taskid))));Debug.locals.put("job", _job);Debug.locals.put("job", _job);
BA.debugLineNum = 147;BA.debugLine="If job = Null Then";
Debug.ShouldStop(262144);
if (RemoteObject.solveBoolean("n",_job)) {
BA.debugLineNum = 148;BA.debugLine="Log(\"HttpUtils2Service: job completed multiple t";
Debug.ShouldStop(524288);
httputils2service.mostCurrent.__c.runVoidMethod ("LogImpl","45242886",RemoteObject.concat(RemoteObject.createImmutable("HttpUtils2Service: job completed multiple times - "),_taskid),0);
BA.debugLineNum = 149;BA.debugLine="Return";
Debug.ShouldStop(1048576);
if (true) return RemoteObject.createImmutable("");
};
BA.debugLineNum = 151;BA.debugLine="TaskIdToJob.Remove(TaskId)";
Debug.ShouldStop(4194304);
httputils2service._taskidtojob.runVoidMethod ("Remove",(Object)((_taskid)));
BA.debugLineNum = 152;BA.debugLine="job.success = success";
Debug.ShouldStop(8388608);
_job.setField ("_success" /*RemoteObject*/ ,_success);
BA.debugLineNum = 153;BA.debugLine="job.errorMessage = errorMessage";
Debug.ShouldStop(16777216);
_job.setField ("_errormessage" /*RemoteObject*/ ,_errormessage);
BA.debugLineNum = 155;BA.debugLine="job.Complete(TaskId)";
Debug.ShouldStop(67108864);
_job.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_complete" /*RemoteObject*/ ,(Object)(_taskid));
BA.debugLineNum = 159;BA.debugLine="End Sub";
Debug.ShouldStop(1073741824);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _hc_responseerror(RemoteObject _response,RemoteObject _reason,RemoteObject _statuscode,RemoteObject _taskid) throws Exception{
try {
Debug.PushSubsStack("hc_ResponseError (httputils2service) ","httputils2service",3,httputils2service.processBA,httputils2service.mostCurrent,109);
if (RapidSub.canDelegate("hc_responseerror")) { return anywheresoftware.b4a.samples.camera.httputils2service.remoteMe.runUserSub(false, "httputils2service","hc_responseerror", _response, _reason, _statuscode, _taskid);}
RemoteObject _job = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.httpjob");
Debug.locals.put("Response", _response);
Debug.locals.put("Reason", _reason);
Debug.locals.put("StatusCode", _statuscode);
Debug.locals.put("TaskId", _taskid);
BA.debugLineNum = 109;BA.debugLine="Sub hc_ResponseError (Response As OkHttpResponse,";
Debug.ShouldStop(4096);
BA.debugLineNum = 110;BA.debugLine="Log($\"ResponseError. Reason: ${Reason}, Response:";
Debug.ShouldStop(8192);
httputils2service.mostCurrent.__c.runVoidMethod ("LogImpl","45177345",(RemoteObject.concat(RemoteObject.createImmutable("ResponseError. Reason: "),httputils2service.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_reason))),RemoteObject.createImmutable(", Response: "),httputils2service.mostCurrent.__c.runMethod(true,"SmartStringFormatter",(Object)(BA.ObjectToString("")),(Object)((_response.runMethod(true,"getErrorResponse")))),RemoteObject.createImmutable(""))),0);
BA.debugLineNum = 111;BA.debugLine="Response.Release";
Debug.ShouldStop(16384);
_response.runVoidMethod ("Release");
BA.debugLineNum = 112;BA.debugLine="Dim job As HttpJob = TaskIdToJob.Get(TaskId)";
Debug.ShouldStop(32768);
_job = (httputils2service._taskidtojob.runMethod(false,"Get",(Object)((_taskid))));Debug.locals.put("job", _job);Debug.locals.put("job", _job);
BA.debugLineNum = 113;BA.debugLine="If job = Null Then";
Debug.ShouldStop(65536);
if (RemoteObject.solveBoolean("n",_job)) {
BA.debugLineNum = 114;BA.debugLine="Log(\"HttpUtils2Service (hc_ResponseError): job c";
Debug.ShouldStop(131072);
httputils2service.mostCurrent.__c.runVoidMethod ("LogImpl","45177349",RemoteObject.concat(RemoteObject.createImmutable("HttpUtils2Service (hc_ResponseError): job completed multiple times - "),_taskid),0);
BA.debugLineNum = 115;BA.debugLine="Return";
Debug.ShouldStop(262144);
if (true) return RemoteObject.createImmutable("");
};
BA.debugLineNum = 117;BA.debugLine="job.Response = Response";
Debug.ShouldStop(1048576);
_job.setField ("_response" /*RemoteObject*/ ,_response);
BA.debugLineNum = 118;BA.debugLine="If Response.ErrorResponse <> \"\" Then";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean("!",_response.runMethod(true,"getErrorResponse"),BA.ObjectToString(""))) {
BA.debugLineNum = 119;BA.debugLine="CompleteJob(TaskId, False, Response.ErrorRespons";
Debug.ShouldStop(4194304);
_completejob(_taskid,httputils2service.mostCurrent.__c.getField(true,"False"),_response.runMethod(true,"getErrorResponse"));
}else {
BA.debugLineNum = 121;BA.debugLine="CompleteJob(TaskId, False, Reason)";
Debug.ShouldStop(16777216);
_completejob(_taskid,httputils2service.mostCurrent.__c.getField(true,"False"),_reason);
};
BA.debugLineNum = 123;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _hc_responsesuccess(RemoteObject _response,RemoteObject _taskid) throws Exception{
try {
Debug.PushSubsStack("hc_ResponseSuccess (httputils2service) ","httputils2service",3,httputils2service.processBA,httputils2service.mostCurrent,86);
if (RapidSub.canDelegate("hc_responsesuccess")) { return anywheresoftware.b4a.samples.camera.httputils2service.remoteMe.runUserSub(false, "httputils2service","hc_responsesuccess", _response, _taskid);}
RemoteObject _job = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.httpjob");
RemoteObject _out = RemoteObject.declareNull("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
Debug.locals.put("Response", _response);
Debug.locals.put("TaskId", _taskid);
BA.debugLineNum = 86;BA.debugLine="Sub hc_ResponseSuccess (Response As OkHttpResponse";
Debug.ShouldStop(2097152);
BA.debugLineNum = 87;BA.debugLine="Dim job As HttpJob = TaskIdToJob.Get(TaskId)";
Debug.ShouldStop(4194304);
_job = (httputils2service._taskidtojob.runMethod(false,"Get",(Object)((_taskid))));Debug.locals.put("job", _job);Debug.locals.put("job", _job);
BA.debugLineNum = 88;BA.debugLine="If job = Null Then";
Debug.ShouldStop(8388608);
if (RemoteObject.solveBoolean("n",_job)) {
BA.debugLineNum = 89;BA.debugLine="Log(\"HttpUtils2Service (hc_ResponseSuccess): job";
Debug.ShouldStop(16777216);
httputils2service.mostCurrent.__c.runVoidMethod ("LogImpl","45046275",RemoteObject.concat(RemoteObject.createImmutable("HttpUtils2Service (hc_ResponseSuccess): job completed multiple times - "),_taskid),0);
BA.debugLineNum = 90;BA.debugLine="Return";
Debug.ShouldStop(33554432);
if (true) return RemoteObject.createImmutable("");
};
BA.debugLineNum = 92;BA.debugLine="job.Response = Response";
Debug.ShouldStop(134217728);
_job.setField ("_response" /*RemoteObject*/ ,_response);
BA.debugLineNum = 93;BA.debugLine="Dim out As OutputStream = File.OpenOutput(TempFol";
Debug.ShouldStop(268435456);
_out = RemoteObject.createNew ("anywheresoftware.b4a.objects.streams.File.OutputStreamWrapper");
_out = httputils2service.mostCurrent.__c.getField(false,"File").runMethod(false,"OpenOutput",(Object)(httputils2service._tempfolder),(Object)(BA.NumberToString(_taskid)),(Object)(httputils2service.mostCurrent.__c.getField(true,"False")));Debug.locals.put("out", _out);Debug.locals.put("out", _out);
BA.debugLineNum = 97;BA.debugLine="Response.GetAsynchronously(\"response\", out , _";
Debug.ShouldStop(1);
_response.runVoidMethod ("GetAsynchronously",httputils2service.processBA,(Object)(BA.ObjectToString("response")),(Object)((_out.getObject())),(Object)(httputils2service.mostCurrent.__c.getField(true,"True")),(Object)(_taskid));
BA.debugLineNum = 99;BA.debugLine="End Sub";
Debug.ShouldStop(4);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _process_globals() throws Exception{
//BA.debugLineNum = 2;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 12;BA.debugLine="Private hc As OkHttpClient";
httputils2service._hc = RemoteObject.createNew ("anywheresoftware.b4h.okhttp.OkHttpClientWrapper");
//BA.debugLineNum = 16;BA.debugLine="Private TaskIdToJob As Map";
httputils2service._taskidtojob = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.Map");
//BA.debugLineNum = 19;BA.debugLine="Public TempFolder As String";
httputils2service._tempfolder = RemoteObject.createImmutable("");
//BA.debugLineNum = 23;BA.debugLine="Private taskCounter As Int";
httputils2service._taskcounter = RemoteObject.createImmutable(0);
//BA.debugLineNum = 25;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject _response_streamfinish(RemoteObject _success,RemoteObject _taskid) throws Exception{
try {
Debug.PushSubsStack("Response_StreamFinish (httputils2service) ","httputils2service",3,httputils2service.processBA,httputils2service.mostCurrent,101);
if (RapidSub.canDelegate("response_streamfinish")) { return anywheresoftware.b4a.samples.camera.httputils2service.remoteMe.runUserSub(false, "httputils2service","response_streamfinish", _success, _taskid);}
Debug.locals.put("Success", _success);
Debug.locals.put("TaskId", _taskid);
BA.debugLineNum = 101;BA.debugLine="Private Sub Response_StreamFinish (Success As Bool";
Debug.ShouldStop(16);
BA.debugLineNum = 102;BA.debugLine="If Success Then";
Debug.ShouldStop(32);
if (_success.<Boolean>get().booleanValue()) {
BA.debugLineNum = 103;BA.debugLine="CompleteJob(TaskId, Success, \"\")";
Debug.ShouldStop(64);
_completejob(_taskid,_success,RemoteObject.createImmutable(""));
}else {
BA.debugLineNum = 105;BA.debugLine="CompleteJob(TaskId, Success, LastException.Messa";
Debug.ShouldStop(256);
_completejob(_taskid,_success,httputils2service.mostCurrent.__c.runMethod(false,"LastException",httputils2service.processBA).runMethod(true,"getMessage"));
};
BA.debugLineNum = 107;BA.debugLine="End Sub";
Debug.ShouldStop(1024);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _service_create() throws Exception{
try {
Debug.PushSubsStack("Service_Create (httputils2service) ","httputils2service",3,httputils2service.processBA,httputils2service.mostCurrent,27);
if (RapidSub.canDelegate("service_create")) { return anywheresoftware.b4a.samples.camera.httputils2service.remoteMe.runUserSub(false, "httputils2service","service_create");}
BA.debugLineNum = 27;BA.debugLine="Sub Service_Create";
Debug.ShouldStop(67108864);
BA.debugLineNum = 29;BA.debugLine="TempFolder = File.DirInternalCache";
Debug.ShouldStop(268435456);
httputils2service._tempfolder = httputils2service.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternalCache");
BA.debugLineNum = 30;BA.debugLine="Try";
Debug.ShouldStop(536870912);
try { BA.debugLineNum = 31;BA.debugLine="File.WriteString(TempFolder, \"~test.test\", \"test";
Debug.ShouldStop(1073741824);
httputils2service.mostCurrent.__c.getField(false,"File").runVoidMethod ("WriteString",(Object)(httputils2service._tempfolder),(Object)(BA.ObjectToString("~test.test")),(Object)(RemoteObject.createImmutable("test")));
BA.debugLineNum = 32;BA.debugLine="File.Delete(TempFolder, \"~test.test\")";
Debug.ShouldStop(-2147483648);
httputils2service.mostCurrent.__c.getField(false,"File").runVoidMethod ("Delete",(Object)(httputils2service._tempfolder),(Object)(RemoteObject.createImmutable("~test.test")));
Debug.CheckDeviceExceptions();
}
catch (Exception e6) {
BA.rdebugUtils.runVoidMethod("setLastException",httputils2service.processBA, e6.toString()); BA.debugLineNum = 34;BA.debugLine="Log(LastException)";
Debug.ShouldStop(2);
httputils2service.mostCurrent.__c.runVoidMethod ("LogImpl","44784135",BA.ObjectToString(httputils2service.mostCurrent.__c.runMethod(false,"LastException",httputils2service.processBA)),0);
BA.debugLineNum = 35;BA.debugLine="Log(\"Switching to File.DirInternal\")";
Debug.ShouldStop(4);
httputils2service.mostCurrent.__c.runVoidMethod ("LogImpl","44784136",RemoteObject.createImmutable("Switching to File.DirInternal"),0);
BA.debugLineNum = 36;BA.debugLine="TempFolder = File.DirInternal";
Debug.ShouldStop(8);
httputils2service._tempfolder = httputils2service.mostCurrent.__c.getField(false,"File").runMethod(true,"getDirInternal");
};
BA.debugLineNum = 41;BA.debugLine="If hc.IsInitialized = False Then";
Debug.ShouldStop(256);
if (RemoteObject.solveBoolean("=",httputils2service._hc.runMethod(true,"IsInitialized"),httputils2service.mostCurrent.__c.getField(true,"False"))) {
BA.debugLineNum = 46;BA.debugLine="hc.Initialize(\"hc\")";
Debug.ShouldStop(8192);
httputils2service._hc.runVoidMethod ("Initialize",(Object)(RemoteObject.createImmutable("hc")));
};
BA.debugLineNum = 54;BA.debugLine="TaskIdToJob.Initialize";
Debug.ShouldStop(2097152);
httputils2service._taskidtojob.runVoidMethod ("Initialize");
BA.debugLineNum = 56;BA.debugLine="End Sub";
Debug.ShouldStop(8388608);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _service_destroy() throws Exception{
try {
Debug.PushSubsStack("Service_Destroy (httputils2service) ","httputils2service",3,httputils2service.processBA,httputils2service.mostCurrent,62);
if (RapidSub.canDelegate("service_destroy")) { return anywheresoftware.b4a.samples.camera.httputils2service.remoteMe.runUserSub(false, "httputils2service","service_destroy");}
BA.debugLineNum = 62;BA.debugLine="Sub Service_Destroy";
Debug.ShouldStop(536870912);
BA.debugLineNum = 64;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _service_start(RemoteObject _startingintent) throws Exception{
try {
Debug.PushSubsStack("Service_Start (httputils2service) ","httputils2service",3,httputils2service.processBA,httputils2service.mostCurrent,58);
if (RapidSub.canDelegate("service_start")) { return anywheresoftware.b4a.samples.camera.httputils2service.remoteMe.runUserSub(false, "httputils2service","service_start", _startingintent);}
Debug.locals.put("StartingIntent", _startingintent);
BA.debugLineNum = 58;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
Debug.ShouldStop(33554432);
BA.debugLineNum = 59;BA.debugLine="Service.StopAutomaticForeground";
Debug.ShouldStop(67108864);
httputils2service.mostCurrent._service.runVoidMethod ("StopAutomaticForeground");
BA.debugLineNum = 60;BA.debugLine="End Sub";
Debug.ShouldStop(134217728);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _submitjob(RemoteObject _job) throws Exception{
try {
Debug.PushSubsStack("SubmitJob (httputils2service) ","httputils2service",3,httputils2service.processBA,httputils2service.mostCurrent,68);
if (RapidSub.canDelegate("submitjob")) { return anywheresoftware.b4a.samples.camera.httputils2service.remoteMe.runUserSub(false, "httputils2service","submitjob", _job);}
RemoteObject _taskid = RemoteObject.createImmutable(0);
Debug.locals.put("job", _job);
BA.debugLineNum = 68;BA.debugLine="Public Sub SubmitJob(job As HttpJob)";
Debug.ShouldStop(8);
BA.debugLineNum = 69;BA.debugLine="If TaskIdToJob.IsInitialized = False Then Service";
Debug.ShouldStop(16);
if (RemoteObject.solveBoolean("=",httputils2service._taskidtojob.runMethod(true,"IsInitialized"),httputils2service.mostCurrent.__c.getField(true,"False"))) {
_service_create();};
BA.debugLineNum = 73;BA.debugLine="taskCounter = taskCounter + 1";
Debug.ShouldStop(256);
httputils2service._taskcounter = RemoteObject.solve(new RemoteObject[] {httputils2service._taskcounter,RemoteObject.createImmutable(1)}, "+",1, 1);
BA.debugLineNum = 74;BA.debugLine="Dim TaskId As Int = taskCounter";
Debug.ShouldStop(512);
_taskid = httputils2service._taskcounter;Debug.locals.put("TaskId", _taskid);Debug.locals.put("TaskId", _taskid);
BA.debugLineNum = 76;BA.debugLine="TaskIdToJob.Put(TaskId, job)";
Debug.ShouldStop(2048);
httputils2service._taskidtojob.runVoidMethod ("Put",(Object)((_taskid)),(Object)((_job)));
BA.debugLineNum = 77;BA.debugLine="If job.Username <> \"\" And job.Password <> \"\" Then";
Debug.ShouldStop(4096);
if (RemoteObject.solveBoolean("!",_job.getField(true,"_username" /*RemoteObject*/ ),BA.ObjectToString("")) && RemoteObject.solveBoolean("!",_job.getField(true,"_password" /*RemoteObject*/ ),BA.ObjectToString(""))) {
BA.debugLineNum = 78;BA.debugLine="hc.ExecuteCredentials(job.GetRequest, TaskId, jo";
Debug.ShouldStop(8192);
httputils2service._hc.runVoidMethod ("ExecuteCredentials",httputils2service.processBA,(Object)(_job.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_getrequest" /*RemoteObject*/ )),(Object)(_taskid),(Object)(_job.getField(true,"_username" /*RemoteObject*/ )),(Object)(_job.getField(true,"_password" /*RemoteObject*/ )));
}else {
BA.debugLineNum = 80;BA.debugLine="hc.Execute(job.GetRequest, TaskId)";
Debug.ShouldStop(32768);
httputils2service._hc.runVoidMethod ("Execute",httputils2service.processBA,(Object)(_job.runClassMethod (anywheresoftware.b4a.samples.camera.httpjob.class, "_getrequest" /*RemoteObject*/ )),(Object)(_taskid));
};
BA.debugLineNum = 82;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
}

View File

@@ -0,0 +1,72 @@
package anywheresoftware.b4a.samples.camera;
import java.io.IOException;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.PCBA;
import anywheresoftware.b4a.pc.RDebug;
import anywheresoftware.b4a.pc.RemoteObject;
import anywheresoftware.b4a.pc.RDebug.IRemote;
import anywheresoftware.b4a.pc.Debug;
import anywheresoftware.b4a.pc.B4XTypes.B4XClass;
import anywheresoftware.b4a.pc.B4XTypes.DeviceClass;
public class main implements IRemote{
public static main mostCurrent;
public static RemoteObject processBA;
public static boolean processGlobalsRun;
public static RemoteObject myClass;
public static RemoteObject remoteMe;
public main() {
mostCurrent = this;
}
public RemoteObject getRemoteMe() {
return remoteMe;
}
public static void main (String[] args) throws Exception {
new RDebug(args[0], Integer.parseInt(args[1]), Integer.parseInt(args[2]), args[3]);
RDebug.INSTANCE.waitForTask();
}
static {
anywheresoftware.b4a.pc.RapidSub.moduleToObject.put(new B4XClass("main"), "anywheresoftware.b4a.samples.camera.main");
}
public boolean isSingleton() {
return true;
}
public static RemoteObject getObject() {
return myClass;
}
public RemoteObject activityBA;
public RemoteObject _activity;
private PCBA pcBA;
public PCBA create(Object[] args) throws ClassNotFoundException{
processBA = (RemoteObject) args[1];
activityBA = (RemoteObject) args[2];
_activity = (RemoteObject) args[3];
anywheresoftware.b4a.keywords.Common.Density = (Float)args[4];
remoteMe = (RemoteObject) args[5];
pcBA = new PCBA(this, main.class);
main_subs_0.initializeProcessGlobals();
return pcBA;
}
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
public static RemoteObject _frontcamera = RemoteObject.createImmutable(false);
public static RemoteObject _detector = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
public static RemoteObject _searchforbarcodes = RemoteObject.createImmutable(false);
public static RemoteObject _lastpreview = RemoteObject.createImmutable(0L);
public static RemoteObject _intervalbetweenpreviewsms = RemoteObject.createImmutable(0);
public static RemoteObject _panel1 = RemoteObject.declareNull("anywheresoftware.b4a.objects.PanelWrapper");
public static RemoteObject _camex = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.cameraexclass");
public static RemoteObject _pnldrawing = RemoteObject.declareNull("anywheresoftware.b4a.objects.PanelWrapper");
public static RemoteObject _cvs = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XCanvas");
public static anywheresoftware.b4a.samples.camera.starter _starter = null;
public static anywheresoftware.b4a.samples.camera.httputils2service _httputils2service = null;
public Object[] GetGlobals() {
return new Object[] {"Activity",main.mostCurrent._activity,"camEx",main.mostCurrent._camex,"cvs",main.mostCurrent._cvs,"detector",main._detector,"frontCamera",main._frontcamera,"HttpUtils2Service",Debug.moduleToString(anywheresoftware.b4a.samples.camera.httputils2service.class),"IntervalBetweenPreviewsMs",main._intervalbetweenpreviewsms,"LastPreview",main._lastpreview,"Panel1",main.mostCurrent._panel1,"pnlDrawing",main.mostCurrent._pnldrawing,"SearchForBarcodes",main._searchforbarcodes,"Starter",Debug.moduleToString(anywheresoftware.b4a.samples.camera.starter.class)};
}
}

View File

@@ -0,0 +1,739 @@
package anywheresoftware.b4a.samples.camera;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;
public class main_subs_0 {
public static RemoteObject _activity_create(RemoteObject _firsttime) throws Exception{
try {
Debug.PushSubsStack("Activity_Create (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,28);
if (RapidSub.canDelegate("activity_create")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","activity_create", _firsttime);}
Debug.locals.put("FirstTime", _firsttime);
BA.debugLineNum = 28;BA.debugLine="Sub Activity_Create(FirstTime As Boolean)";
Debug.ShouldStop(134217728);
BA.debugLineNum = 29;BA.debugLine="Activity.LoadLayout(\"1\")";
Debug.ShouldStop(268435456);
main.mostCurrent._activity.runMethodAndSync(false,"LoadLayout",(Object)(RemoteObject.createImmutable("1")),main.mostCurrent.activityBA);
BA.debugLineNum = 30;BA.debugLine="If FirstTime Then";
Debug.ShouldStop(536870912);
if (_firsttime.<Boolean>get().booleanValue()) {
BA.debugLineNum = 31;BA.debugLine="CreateDetector (Array(\"CODE_128\", \"CODE_93\"))";
Debug.ShouldStop(1073741824);
_createdetector(main.mostCurrent.__c.runMethod(false, "ArrayToList", (Object)(RemoteObject.createNewArray("Object",new int[] {2},new Object[] {RemoteObject.createImmutable(("CODE_128")),(RemoteObject.createImmutable("CODE_93"))}))));
};
BA.debugLineNum = 33;BA.debugLine="cvs.Initialize(pnlDrawing)";
Debug.ShouldStop(1);
main.mostCurrent._cvs.runVoidMethod ("Initialize",RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4a.objects.B4XViewWrapper"), main.mostCurrent._pnldrawing.getObject()));
BA.debugLineNum = 34;BA.debugLine="End Sub";
Debug.ShouldStop(2);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _activity_pause(RemoteObject _userclosed) throws Exception{
try {
Debug.PushSubsStack("Activity_Pause (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,130);
if (RapidSub.canDelegate("activity_pause")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","activity_pause", _userclosed);}
Debug.locals.put("UserClosed", _userclosed);
BA.debugLineNum = 130;BA.debugLine="Sub Activity_Pause (UserClosed As Boolean)";
Debug.ShouldStop(2);
BA.debugLineNum = 131;BA.debugLine="If camEx.IsInitialized Then";
Debug.ShouldStop(4);
if (main.mostCurrent._camex.runMethod(true,"IsInitialized" /*RemoteObject*/ ).<Boolean>get().booleanValue()) {
BA.debugLineNum = 132;BA.debugLine="camEx.Release";
Debug.ShouldStop(8);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_release" /*RemoteObject*/ );
};
BA.debugLineNum = 134;BA.debugLine="End Sub";
Debug.ShouldStop(32);
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 (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,117);
if (RapidSub.canDelegate("activity_resume")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","activity_resume");}
BA.debugLineNum = 117;BA.debugLine="Sub Activity_Resume";
Debug.ShouldStop(1048576);
BA.debugLineNum = 118;BA.debugLine="InitializeCamera";
Debug.ShouldStop(2097152);
_initializecamera();
BA.debugLineNum = 119;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
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 (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,180);
if (RapidSub.canDelegate("btneffect_click")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","btneffect_click");}
RemoteObject _effects = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _effect = RemoteObject.createImmutable("");
BA.debugLineNum = 180;BA.debugLine="Sub btnEffect_Click";
Debug.ShouldStop(524288);
BA.debugLineNum = 181;BA.debugLine="Dim effects As List = camEx.GetSupportedColorEffe";
Debug.ShouldStop(1048576);
_effects = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_effects = main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_getsupportedcoloreffects" /*RemoteObject*/ );Debug.locals.put("effects", _effects);Debug.locals.put("effects", _effects);
BA.debugLineNum = 182;BA.debugLine="If effects.IsInitialized = False Then";
Debug.ShouldStop(2097152);
if (RemoteObject.solveBoolean("=",_effects.runMethod(true,"IsInitialized"),main.mostCurrent.__c.getField(true,"False"))) {
BA.debugLineNum = 183;BA.debugLine="ToastMessageShow(\"Effects not supported.\", False";
Debug.ShouldStop(4194304);
main.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Effects not supported.")),(Object)(main.mostCurrent.__c.getField(true,"False")));
BA.debugLineNum = 184;BA.debugLine="Return";
Debug.ShouldStop(8388608);
if (true) return RemoteObject.createImmutable("");
};
BA.debugLineNum = 186;BA.debugLine="Dim effect As String = effects.Get((effects.Index";
Debug.ShouldStop(33554432);
_effect = BA.ObjectToString(_effects.runMethod(false,"Get",(Object)(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_effects.runMethod(true,"IndexOf",(Object)((main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.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 = 187;BA.debugLine="camEx.SetColorEffect(effect)";
Debug.ShouldStop(67108864);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_setcoloreffect" /*RemoteObject*/ ,(Object)(_effect));
BA.debugLineNum = 188;BA.debugLine="ToastMessageShow(effect, False)";
Debug.ShouldStop(134217728);
main.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(_effect)),(Object)(main.mostCurrent.__c.getField(true,"False")));
BA.debugLineNum = 189;BA.debugLine="camEx.CommitParameters";
Debug.ShouldStop(268435456);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_commitparameters" /*RemoteObject*/ );
BA.debugLineNum = 190;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
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 (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,192);
if (RapidSub.canDelegate("btnflash_click")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","btnflash_click");}
RemoteObject _f = null;
RemoteObject _flashmodes = RemoteObject.declareNull("anywheresoftware.b4a.objects.collections.List");
RemoteObject _flash = RemoteObject.createImmutable("");
BA.debugLineNum = 192;BA.debugLine="Sub btnFlash_Click";
Debug.ShouldStop(-2147483648);
BA.debugLineNum = 193;BA.debugLine="Dim f() As Float = camEx.GetFocusDistances";
Debug.ShouldStop(1);
_f = main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_getfocusdistances" /*RemoteObject*/ );Debug.locals.put("f", _f);Debug.locals.put("f", _f);
BA.debugLineNum = 194;BA.debugLine="Log(f(0) & \", \" & f(1) & \", \" & f(2))";
Debug.ShouldStop(2);
main.mostCurrent.__c.runVoidMethod ("LogImpl","4786434",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 = 195;BA.debugLine="Dim flashModes As List = camEx.GetSupportedFlashM";
Debug.ShouldStop(4);
_flashmodes = RemoteObject.createNew ("anywheresoftware.b4a.objects.collections.List");
_flashmodes = main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_getsupportedflashmodes" /*RemoteObject*/ );Debug.locals.put("flashModes", _flashmodes);Debug.locals.put("flashModes", _flashmodes);
BA.debugLineNum = 196;BA.debugLine="If flashModes.IsInitialized = False Then";
Debug.ShouldStop(8);
if (RemoteObject.solveBoolean("=",_flashmodes.runMethod(true,"IsInitialized"),main.mostCurrent.__c.getField(true,"False"))) {
BA.debugLineNum = 197;BA.debugLine="ToastMessageShow(\"Flash not supported.\", False)";
Debug.ShouldStop(16);
main.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Flash not supported.")),(Object)(main.mostCurrent.__c.getField(true,"False")));
BA.debugLineNum = 198;BA.debugLine="Return";
Debug.ShouldStop(32);
if (true) return RemoteObject.createImmutable("");
};
BA.debugLineNum = 200;BA.debugLine="Dim flash As String = flashModes.Get((flashModes.";
Debug.ShouldStop(128);
_flash = BA.ObjectToString(_flashmodes.runMethod(false,"Get",(Object)(RemoteObject.solve(new RemoteObject[] {(RemoteObject.solve(new RemoteObject[] {_flashmodes.runMethod(true,"IndexOf",(Object)((main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.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 = 201;BA.debugLine="camEx.SetFlashMode(flash)";
Debug.ShouldStop(256);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_setflashmode" /*RemoteObject*/ ,(Object)(_flash));
BA.debugLineNum = 202;BA.debugLine="ToastMessageShow(flash, False)";
Debug.ShouldStop(512);
main.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(_flash)),(Object)(main.mostCurrent.__c.getField(true,"False")));
BA.debugLineNum = 203;BA.debugLine="camEx.CommitParameters";
Debug.ShouldStop(1024);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_commitparameters" /*RemoteObject*/ );
BA.debugLineNum = 204;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
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 (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,205);
if (RapidSub.canDelegate("btnpicturesize_click")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","btnpicturesize_click");}
RemoteObject _picturesizes = null;
RemoteObject _current = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.cameraexclass._camerasize");
int _i = 0;
RemoteObject _ps = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.cameraexclass._camerasize");
BA.debugLineNum = 205;BA.debugLine="Sub btnPictureSize_Click";
Debug.ShouldStop(4096);
BA.debugLineNum = 206;BA.debugLine="Dim pictureSizes() As CameraSize = camEx.GetSuppo";
Debug.ShouldStop(8192);
_picturesizes = main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_getsupportedpicturessizes" /*RemoteObject*/ );Debug.locals.put("pictureSizes", _picturesizes);Debug.locals.put("pictureSizes", _picturesizes);
BA.debugLineNum = 207;BA.debugLine="Dim current As CameraSize = camEx.GetPictureSize";
Debug.ShouldStop(16384);
_current = main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_getpicturesize" /*RemoteObject*/ );Debug.locals.put("current", _current);Debug.locals.put("current", _current);
BA.debugLineNum = 208;BA.debugLine="For i = 0 To pictureSizes.Length - 1";
Debug.ShouldStop(32768);
{
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 = 209;BA.debugLine="If pictureSizes(i).Width = current.Width And pic";
Debug.ShouldStop(65536);
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 = 211;BA.debugLine="Dim ps As CameraSize = pictureSizes((i + 1) Mod p";
Debug.ShouldStop(262144);
_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 = 212;BA.debugLine="camEx.SetPictureSize(ps.Width, ps.Height)";
Debug.ShouldStop(524288);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_setpicturesize" /*RemoteObject*/ ,(Object)(_ps.getField(true,"Width" /*RemoteObject*/ )),(Object)(_ps.getField(true,"Height" /*RemoteObject*/ )));
BA.debugLineNum = 213;BA.debugLine="ToastMessageShow(ps.Width & \"x\" & ps.Height, Fals";
Debug.ShouldStop(1048576);
main.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(_ps.getField(true,"Width" /*RemoteObject*/ ),RemoteObject.createImmutable("x"),_ps.getField(true,"Height" /*RemoteObject*/ )))),(Object)(main.mostCurrent.__c.getField(true,"False")));
BA.debugLineNum = 214;BA.debugLine="camEx.CommitParameters";
Debug.ShouldStop(2097152);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_commitparameters" /*RemoteObject*/ );
BA.debugLineNum = 215;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
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 (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,158);
if (RapidSub.canDelegate("camera1_picturetaken")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","camera1_picturetaken", _data);}
Debug.locals.put("Data", _data);
BA.debugLineNum = 158;BA.debugLine="Sub Camera1_PictureTaken (Data() As Byte)";
Debug.ShouldStop(536870912);
BA.debugLineNum = 172;BA.debugLine="End Sub";
Debug.ShouldStop(2048);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _camera1_preview(RemoteObject _data) throws Exception{
try {
Debug.PushSubsStack("Camera1_Preview (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,56);
if (RapidSub.canDelegate("camera1_preview")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","camera1_preview", _data);}
RemoteObject _framebuilder = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _bb = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _cs = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.cameraexclass._camerasize");
RemoteObject _frame = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _sparsearray = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _matches = RemoteObject.createImmutable(0);
int _i = 0;
RemoteObject _barcode = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _raw = RemoteObject.createImmutable("");
RemoteObject _points = null;
RemoteObject _tl = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _br = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _r = RemoteObject.declareNull("anywheresoftware.b4a.objects.B4XCanvas.B4XRect");
RemoteObject _size = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.cameraexclass._camerasize");
RemoteObject _xscale = RemoteObject.createImmutable(0f);
RemoteObject _yscale = RemoteObject.createImmutable(0f);
Debug.locals.put("data", _data);
BA.debugLineNum = 56;BA.debugLine="Sub Camera1_Preview (data() As Byte)";
Debug.ShouldStop(8388608);
BA.debugLineNum = 57;BA.debugLine="If SearchForBarcodes Then";
Debug.ShouldStop(16777216);
if (main._searchforbarcodes.<Boolean>get().booleanValue()) {
BA.debugLineNum = 58;BA.debugLine="If DateTime.Now > LastPreview + IntervalBetweenP";
Debug.ShouldStop(33554432);
if (RemoteObject.solveBoolean(">",main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow"),RemoteObject.solve(new RemoteObject[] {main._lastpreview,main._intervalbetweenpreviewsms}, "+",1, 2))) {
BA.debugLineNum = 60;BA.debugLine="cvs.ClearRect(cvs.TargetRect)";
Debug.ShouldStop(134217728);
main.mostCurrent._cvs.runVoidMethod ("ClearRect",(Object)(main.mostCurrent._cvs.runMethod(false,"getTargetRect")));
BA.debugLineNum = 61;BA.debugLine="Dim frameBuilder As JavaObject";
Debug.ShouldStop(268435456);
_framebuilder = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");Debug.locals.put("frameBuilder", _framebuilder);
BA.debugLineNum = 62;BA.debugLine="Dim bb As JavaObject";
Debug.ShouldStop(536870912);
_bb = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");Debug.locals.put("bb", _bb);
BA.debugLineNum = 63;BA.debugLine="bb = bb.InitializeStatic(\"java.nio.ByteBuffer\")";
Debug.ShouldStop(1073741824);
_bb = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.object.JavaObject"), _bb.runMethod(false,"InitializeStatic",(Object)(RemoteObject.createImmutable("java.nio.ByteBuffer"))).runMethod(false,"RunMethod",(Object)(BA.ObjectToString("wrap")),(Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(_data)}))));
BA.debugLineNum = 64;BA.debugLine="frameBuilder.InitializeNewInstance(\"com/google/";
Debug.ShouldStop(-2147483648);
_framebuilder.runVoidMethod ("InitializeNewInstance",(Object)(RemoteObject.createImmutable("com/google/android/gms/vision/Frame.Builder").runMethod(true,"replace",(Object)(BA.ObjectToString("/")),(Object)(RemoteObject.createImmutable(".")))),(Object)((main.mostCurrent.__c.getField(false,"Null"))));
BA.debugLineNum = 65;BA.debugLine="Dim cs As CameraSize = camEx.GetPreviewSize";
Debug.ShouldStop(1);
_cs = main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_getpreviewsize" /*RemoteObject*/ );Debug.locals.put("cs", _cs);Debug.locals.put("cs", _cs);
BA.debugLineNum = 66;BA.debugLine="frameBuilder.RunMethod(\"setImageData\", Array(bb";
Debug.ShouldStop(2);
_framebuilder.runVoidMethod ("RunMethod",(Object)(BA.ObjectToString("setImageData")),(Object)(RemoteObject.createNewArray("Object",new int[] {4},new Object[] {(_bb.getObject()),(_cs.getField(true,"Width" /*RemoteObject*/ )),(_cs.getField(true,"Height" /*RemoteObject*/ )),RemoteObject.createImmutable((842094169))})));
BA.debugLineNum = 67;BA.debugLine="Dim frame As JavaObject = frameBuilder.RunMetho";
Debug.ShouldStop(4);
_frame = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");
_frame = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.object.JavaObject"), _framebuilder.runMethod(false,"RunMethod",(Object)(BA.ObjectToString("build")),(Object)((main.mostCurrent.__c.getField(false,"Null")))));Debug.locals.put("frame", _frame);
BA.debugLineNum = 68;BA.debugLine="Dim SparseArray As JavaObject = detector.RunMet";
Debug.ShouldStop(8);
_sparsearray = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");
_sparsearray = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.object.JavaObject"), main._detector.runMethod(false,"RunMethod",(Object)(BA.ObjectToString("detect")),(Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(_frame.getObject())}))));Debug.locals.put("SparseArray", _sparsearray);
BA.debugLineNum = 69;BA.debugLine="LastPreview = DateTime.Now";
Debug.ShouldStop(16);
main._lastpreview = main.mostCurrent.__c.getField(false,"DateTime").runMethod(true,"getNow");
BA.debugLineNum = 70;BA.debugLine="Dim Matches As Int = SparseArray.RunMethod(\"siz";
Debug.ShouldStop(32);
_matches = BA.numberCast(int.class, _sparsearray.runMethod(false,"RunMethod",(Object)(BA.ObjectToString("size")),(Object)((main.mostCurrent.__c.getField(false,"Null")))));Debug.locals.put("Matches", _matches);Debug.locals.put("Matches", _matches);
BA.debugLineNum = 71;BA.debugLine="For i = 0 To Matches - 1";
Debug.ShouldStop(64);
{
final int step14 = 1;
final int limit14 = RemoteObject.solve(new RemoteObject[] {_matches,RemoteObject.createImmutable(1)}, "-",1, 1).<Integer>get().intValue();
_i = 0 ;
for (;(step14 > 0 && _i <= limit14) || (step14 < 0 && _i >= limit14) ;_i = ((int)(0 + _i + step14)) ) {
Debug.locals.put("i", _i);
BA.debugLineNum = 72;BA.debugLine="Dim barcode As JavaObject = SparseArray.RunMet";
Debug.ShouldStop(128);
_barcode = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");
_barcode = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.object.JavaObject"), _sparsearray.runMethod(false,"RunMethod",(Object)(BA.ObjectToString("valueAt")),(Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {RemoteObject.createImmutable((_i))}))));Debug.locals.put("barcode", _barcode);
BA.debugLineNum = 73;BA.debugLine="Dim raw As String = barcode.GetField(\"rawValue";
Debug.ShouldStop(256);
_raw = BA.ObjectToString(_barcode.runMethod(false,"GetField",(Object)(RemoteObject.createImmutable("rawValue"))));Debug.locals.put("raw", _raw);Debug.locals.put("raw", _raw);
BA.debugLineNum = 74;BA.debugLine="Log(raw)";
Debug.ShouldStop(512);
main.mostCurrent.__c.runVoidMethod ("LogImpl","4262162",_raw,0);
BA.debugLineNum = 75;BA.debugLine="ToastMessageShow(\"Found: \" & raw, True)";
Debug.ShouldStop(1024);
main.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence(RemoteObject.concat(RemoteObject.createImmutable("Found: "),_raw))),(Object)(main.mostCurrent.__c.getField(true,"True")));
BA.debugLineNum = 76;BA.debugLine="Dim points() As Object = barcode.GetField(\"cor";
Debug.ShouldStop(2048);
_points = (_barcode.runMethod(false,"GetField",(Object)(RemoteObject.createImmutable("cornerPoints"))));Debug.locals.put("points", _points);Debug.locals.put("points", _points);
BA.debugLineNum = 77;BA.debugLine="Dim tl As JavaObject = points(0)";
Debug.ShouldStop(4096);
_tl = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");
_tl = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.object.JavaObject"), _points.getArrayElement(false,BA.numberCast(int.class, 0)));Debug.locals.put("tl", _tl);
BA.debugLineNum = 79;BA.debugLine="Dim br As JavaObject = points(2)";
Debug.ShouldStop(16384);
_br = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");
_br = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.object.JavaObject"), _points.getArrayElement(false,BA.numberCast(int.class, 2)));Debug.locals.put("br", _br);
BA.debugLineNum = 81;BA.debugLine="Dim r As B4XRect";
Debug.ShouldStop(65536);
_r = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XCanvas.B4XRect");Debug.locals.put("r", _r);
BA.debugLineNum = 83;BA.debugLine="Dim size As CameraSize = camEx.GetPreviewSize";
Debug.ShouldStop(262144);
_size = main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_getpreviewsize" /*RemoteObject*/ );Debug.locals.put("size", _size);Debug.locals.put("size", _size);
BA.debugLineNum = 84;BA.debugLine="Dim xscale, yscale As Float";
Debug.ShouldStop(524288);
_xscale = RemoteObject.createImmutable(0f);Debug.locals.put("xscale", _xscale);
_yscale = RemoteObject.createImmutable(0f);Debug.locals.put("yscale", _yscale);
BA.debugLineNum = 85;BA.debugLine="If camEx.PreviewOrientation Mod 180 = 0 Then";
Debug.ShouldStop(1048576);
if (RemoteObject.solveBoolean("=",RemoteObject.solve(new RemoteObject[] {main.mostCurrent._camex.getField(true,"_previeworientation" /*RemoteObject*/ ),RemoteObject.createImmutable(180)}, "%",0, 1),BA.numberCast(double.class, 0))) {
BA.debugLineNum = 86;BA.debugLine="xscale = Panel1.Width / size.Width";
Debug.ShouldStop(2097152);
_xscale = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent._panel1.runMethod(true,"getWidth"),_size.getField(true,"Width" /*RemoteObject*/ )}, "/",0, 0));Debug.locals.put("xscale", _xscale);
BA.debugLineNum = 87;BA.debugLine="yscale = Panel1.Height / size.Height";
Debug.ShouldStop(4194304);
_yscale = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent._panel1.runMethod(true,"getHeight"),_size.getField(true,"Height" /*RemoteObject*/ )}, "/",0, 0));Debug.locals.put("yscale", _yscale);
BA.debugLineNum = 88;BA.debugLine="r.Initialize(tl.GetField(\"x\"), tl.GetField(\"y";
Debug.ShouldStop(8388608);
_r.runVoidMethod ("Initialize",(Object)(BA.numberCast(float.class, _tl.runMethod(false,"GetField",(Object)(RemoteObject.createImmutable("x"))))),(Object)(BA.numberCast(float.class, _tl.runMethod(false,"GetField",(Object)(RemoteObject.createImmutable("y"))))),(Object)(BA.numberCast(float.class, _br.runMethod(false,"GetField",(Object)(RemoteObject.createImmutable("x"))))),(Object)(BA.numberCast(float.class, _br.runMethod(false,"GetField",(Object)(RemoteObject.createImmutable("y"))))));
}else {
BA.debugLineNum = 90;BA.debugLine="xscale = Panel1.Width / size.Height";
Debug.ShouldStop(33554432);
_xscale = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent._panel1.runMethod(true,"getWidth"),_size.getField(true,"Height" /*RemoteObject*/ )}, "/",0, 0));Debug.locals.put("xscale", _xscale);
BA.debugLineNum = 91;BA.debugLine="yscale = Panel1.Height / size.Width";
Debug.ShouldStop(67108864);
_yscale = BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {main.mostCurrent._panel1.runMethod(true,"getHeight"),_size.getField(true,"Width" /*RemoteObject*/ )}, "/",0, 0));Debug.locals.put("yscale", _yscale);
BA.debugLineNum = 92;BA.debugLine="r.Initialize(br.GetField(\"y\"), br.GetField(\"x";
Debug.ShouldStop(134217728);
_r.runVoidMethod ("Initialize",(Object)(BA.numberCast(float.class, _br.runMethod(false,"GetField",(Object)(RemoteObject.createImmutable("y"))))),(Object)(BA.numberCast(float.class, _br.runMethod(false,"GetField",(Object)(RemoteObject.createImmutable("x"))))),(Object)(BA.numberCast(float.class, _tl.runMethod(false,"GetField",(Object)(RemoteObject.createImmutable("y"))))),(Object)(BA.numberCast(float.class, _tl.runMethod(false,"GetField",(Object)(RemoteObject.createImmutable("x"))))));
};
BA.debugLineNum = 95;BA.debugLine="Select camEx.PreviewOrientation";
Debug.ShouldStop(1073741824);
switch (BA.switchObjectToInt(main.mostCurrent._camex.getField(true,"_previeworientation" /*RemoteObject*/ ),BA.numberCast(int.class, 180),BA.numberCast(int.class, 90))) {
case 0: {
BA.debugLineNum = 97;BA.debugLine="r.Initialize(size.Width - r.Right, size.Heig";
Debug.ShouldStop(1);
_r.runVoidMethod ("Initialize",(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_size.getField(true,"Width" /*RemoteObject*/ ),_r.runMethod(true,"getRight")}, "-",1, 0))),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_size.getField(true,"Height" /*RemoteObject*/ ),_r.runMethod(true,"getBottom")}, "-",1, 0))),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_size.getField(true,"Width" /*RemoteObject*/ ),_r.runMethod(true,"getLeft")}, "-",1, 0))),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_size.getField(true,"Height" /*RemoteObject*/ ),_r.runMethod(true,"getTop")}, "-",1, 0))));
break; }
case 1: {
BA.debugLineNum = 99;BA.debugLine="r.Initialize(size.Height - r.Right, r.Top, s";
Debug.ShouldStop(4);
_r.runVoidMethod ("Initialize",(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_size.getField(true,"Height" /*RemoteObject*/ ),_r.runMethod(true,"getRight")}, "-",1, 0))),(Object)(_r.runMethod(true,"getTop")),(Object)(BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_size.getField(true,"Height" /*RemoteObject*/ ),_r.runMethod(true,"getLeft")}, "-",1, 0))),(Object)(_r.runMethod(true,"getBottom")));
break; }
}
;
BA.debugLineNum = 101;BA.debugLine="r.Left = r.Left * xscale";
Debug.ShouldStop(16);
_r.runMethod(true,"setLeft",BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_r.runMethod(true,"getLeft"),_xscale}, "*",0, 0)));
BA.debugLineNum = 102;BA.debugLine="r.Right = r.Right * xscale";
Debug.ShouldStop(32);
_r.runMethod(true,"setRight",BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_r.runMethod(true,"getRight"),_xscale}, "*",0, 0)));
BA.debugLineNum = 103;BA.debugLine="r.Top = r.Top * yscale";
Debug.ShouldStop(64);
_r.runMethod(true,"setTop",BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_r.runMethod(true,"getTop"),_yscale}, "*",0, 0)));
BA.debugLineNum = 104;BA.debugLine="r.Bottom = r.Bottom * yscale";
Debug.ShouldStop(128);
_r.runMethod(true,"setBottom",BA.numberCast(float.class, RemoteObject.solve(new RemoteObject[] {_r.runMethod(true,"getBottom"),_yscale}, "*",0, 0)));
BA.debugLineNum = 105;BA.debugLine="cvs.DrawRect(r, Colors.Red, False, 5dip)";
Debug.ShouldStop(256);
main.mostCurrent._cvs.runVoidMethod ("DrawRect",(Object)(_r),(Object)(main.mostCurrent.__c.getField(false,"Colors").getField(true,"Red")),(Object)(main.mostCurrent.__c.getField(true,"False")),(Object)(BA.numberCast(float.class, main.mostCurrent.__c.runMethod(true,"DipToCurrent",(Object)(BA.numberCast(int.class, 5))))));
}
}Debug.locals.put("i", _i);
;
BA.debugLineNum = 107;BA.debugLine="If Matches = 0 Then";
Debug.ShouldStop(1024);
if (RemoteObject.solveBoolean("=",_matches,BA.numberCast(double.class, 0))) {
BA.debugLineNum = 108;BA.debugLine="cvs.ClearRect(cvs.TargetRect)";
Debug.ShouldStop(2048);
main.mostCurrent._cvs.runVoidMethod ("ClearRect",(Object)(main.mostCurrent._cvs.runMethod(false,"getTargetRect")));
};
BA.debugLineNum = 110;BA.debugLine="cvs.Invalidate";
Debug.ShouldStop(8192);
main.mostCurrent._cvs.runVoidMethod ("Invalidate");
};
};
BA.debugLineNum = 115;BA.debugLine="End Sub";
Debug.ShouldStop(262144);
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 (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,136);
if (RapidSub.canDelegate("camera1_ready")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","camera1_ready", _success);}
Debug.locals.put("Success", _success);
BA.debugLineNum = 136;BA.debugLine="Sub Camera1_Ready (Success As Boolean)";
Debug.ShouldStop(128);
BA.debugLineNum = 137;BA.debugLine="If Success Then";
Debug.ShouldStop(256);
if (_success.<Boolean>get().booleanValue()) {
BA.debugLineNum = 138;BA.debugLine="camEx.SetJpegQuality(90)";
Debug.ShouldStop(512);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_setjpegquality" /*RemoteObject*/ ,(Object)(BA.numberCast(int.class, 90)));
BA.debugLineNum = 139;BA.debugLine="camEx.SetContinuousAutoFocus";
Debug.ShouldStop(1024);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_setcontinuousautofocus" /*RemoteObject*/ );
BA.debugLineNum = 140;BA.debugLine="camEx.CommitParameters";
Debug.ShouldStop(2048);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_commitparameters" /*RemoteObject*/ );
BA.debugLineNum = 141;BA.debugLine="camEx.StartPreview";
Debug.ShouldStop(4096);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_startpreview" /*RemoteObject*/ );
}else {
BA.debugLineNum = 144;BA.debugLine="ToastMessageShow(\"Cannot open camera.\", True)";
Debug.ShouldStop(32768);
main.mostCurrent.__c.runVoidMethod ("ToastMessageShow",(Object)(BA.ObjectToCharSequence("Cannot open camera.")),(Object)(main.mostCurrent.__c.getField(true,"True")));
};
BA.debugLineNum = 146;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
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 (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,174);
if (RapidSub.canDelegate("changecamera_click")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","changecamera_click");}
BA.debugLineNum = 174;BA.debugLine="Sub ChangeCamera_Click";
Debug.ShouldStop(8192);
BA.debugLineNum = 175;BA.debugLine="camEx.Release";
Debug.ShouldStop(16384);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_release" /*RemoteObject*/ );
BA.debugLineNum = 176;BA.debugLine="frontCamera = Not(frontCamera)";
Debug.ShouldStop(32768);
main._frontcamera = main.mostCurrent.__c.runMethod(true,"Not",(Object)(main._frontcamera));
BA.debugLineNum = 177;BA.debugLine="InitializeCamera";
Debug.ShouldStop(65536);
_initializecamera();
BA.debugLineNum = 178;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _createdetector(RemoteObject _codes) throws Exception{
try {
Debug.PushSubsStack("CreateDetector (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,36);
if (RapidSub.canDelegate("createdetector")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","createdetector", _codes);}
RemoteObject _ctxt = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _builder = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _barcodeclass = RemoteObject.createImmutable("");
RemoteObject _barcodestatic = RemoteObject.declareNull("anywheresoftware.b4j.object.JavaObject");
RemoteObject _format = RemoteObject.createImmutable(0);
RemoteObject _formatname = RemoteObject.createImmutable("");
RemoteObject _operational = RemoteObject.createImmutable(false);
Debug.locals.put("Codes", _codes);
BA.debugLineNum = 36;BA.debugLine="Private Sub CreateDetector (Codes As List)";
Debug.ShouldStop(8);
BA.debugLineNum = 37;BA.debugLine="Dim ctxt As JavaObject";
Debug.ShouldStop(16);
_ctxt = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");Debug.locals.put("ctxt", _ctxt);
BA.debugLineNum = 38;BA.debugLine="ctxt.InitializeContext";
Debug.ShouldStop(32);
_ctxt.runVoidMethod ("InitializeContext",main.processBA);
BA.debugLineNum = 39;BA.debugLine="Dim builder As JavaObject";
Debug.ShouldStop(64);
_builder = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");Debug.locals.put("builder", _builder);
BA.debugLineNum = 40;BA.debugLine="builder.InitializeNewInstance(\"com/google/android";
Debug.ShouldStop(128);
_builder.runVoidMethod ("InitializeNewInstance",(Object)(RemoteObject.createImmutable("com/google/android/gms/vision/barcode/BarcodeDetector.Builder").runMethod(true,"replace",(Object)(BA.ObjectToString("/")),(Object)(RemoteObject.createImmutable(".")))),(Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(_ctxt.getObject())})));
BA.debugLineNum = 41;BA.debugLine="Dim barcodeClass As String = \"com/google/android/";
Debug.ShouldStop(256);
_barcodeclass = RemoteObject.createImmutable("com/google/android/gms/vision/barcode/Barcode").runMethod(true,"replace",(Object)(BA.ObjectToString("/")),(Object)(RemoteObject.createImmutable(".")));Debug.locals.put("barcodeClass", _barcodeclass);Debug.locals.put("barcodeClass", _barcodeclass);
BA.debugLineNum = 42;BA.debugLine="Dim barcodeStatic As JavaObject";
Debug.ShouldStop(512);
_barcodestatic = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");Debug.locals.put("barcodeStatic", _barcodestatic);
BA.debugLineNum = 43;BA.debugLine="barcodeStatic.InitializeStatic(barcodeClass)";
Debug.ShouldStop(1024);
_barcodestatic.runVoidMethod ("InitializeStatic",(Object)(_barcodeclass));
BA.debugLineNum = 44;BA.debugLine="Dim format As Int";
Debug.ShouldStop(2048);
_format = RemoteObject.createImmutable(0);Debug.locals.put("format", _format);
BA.debugLineNum = 45;BA.debugLine="For Each formatName As String In Codes";
Debug.ShouldStop(4096);
{
final RemoteObject group9 = _codes;
final int groupLen9 = group9.runMethod(true,"getSize").<Integer>get()
;int index9 = 0;
;
for (; index9 < groupLen9;index9++){
_formatname = BA.ObjectToString(group9.runMethod(false,"Get",index9));Debug.locals.put("formatName", _formatname);
Debug.locals.put("formatName", _formatname);
BA.debugLineNum = 46;BA.debugLine="format = Bit.Or(format, barcodeStatic.GetField(f";
Debug.ShouldStop(8192);
_format = main.mostCurrent.__c.getField(false,"Bit").runMethod(true,"Or",(Object)(_format),(Object)(BA.numberCast(int.class, _barcodestatic.runMethod(false,"GetField",(Object)(_formatname)))));Debug.locals.put("format", _format);
}
}Debug.locals.put("formatName", _formatname);
;
BA.debugLineNum = 48;BA.debugLine="builder.RunMethod(\"setBarcodeFormats\", Array(form";
Debug.ShouldStop(32768);
_builder.runVoidMethod ("RunMethod",(Object)(BA.ObjectToString("setBarcodeFormats")),(Object)(RemoteObject.createNewArray("Object",new int[] {1},new Object[] {(_format)})));
BA.debugLineNum = 49;BA.debugLine="detector = builder.RunMethod(\"build\", Null)";
Debug.ShouldStop(65536);
main._detector = RemoteObject.declareNull("anywheresoftware.b4a.AbsObjectWrapper").runMethod(false, "ConvertToWrapper", RemoteObject.createNew("anywheresoftware.b4j.object.JavaObject"), _builder.runMethod(false,"RunMethod",(Object)(BA.ObjectToString("build")),(Object)((main.mostCurrent.__c.getField(false,"Null")))));
BA.debugLineNum = 50;BA.debugLine="Dim operational As Boolean = detector.RunMethod(\"";
Debug.ShouldStop(131072);
_operational = BA.ObjectToBoolean(main._detector.runMethod(false,"RunMethod",(Object)(BA.ObjectToString("isOperational")),(Object)((main.mostCurrent.__c.getField(false,"Null")))));Debug.locals.put("operational", _operational);Debug.locals.put("operational", _operational);
BA.debugLineNum = 51;BA.debugLine="Log(\"Is detector operational: \" & operational)";
Debug.ShouldStop(262144);
main.mostCurrent.__c.runVoidMethod ("LogImpl","4196623",RemoteObject.concat(RemoteObject.createImmutable("Is detector operational: "),_operational),0);
BA.debugLineNum = 52;BA.debugLine="SearchForBarcodes = operational";
Debug.ShouldStop(524288);
main._searchforbarcodes = _operational;
BA.debugLineNum = 54;BA.debugLine="End Sub";
Debug.ShouldStop(2097152);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _globals() throws Exception{
//BA.debugLineNum = 21;BA.debugLine="Sub Globals";
//BA.debugLineNum = 22;BA.debugLine="Private Panel1 As Panel";
main.mostCurrent._panel1 = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");
//BA.debugLineNum = 23;BA.debugLine="Private camEx As CameraExClass";
main.mostCurrent._camex = RemoteObject.createNew ("anywheresoftware.b4a.samples.camera.cameraexclass");
//BA.debugLineNum = 24;BA.debugLine="Private pnlDrawing As Panel";
main.mostCurrent._pnldrawing = RemoteObject.createNew ("anywheresoftware.b4a.objects.PanelWrapper");
//BA.debugLineNum = 25;BA.debugLine="Private cvs As B4XCanvas";
main.mostCurrent._cvs = RemoteObject.createNew ("anywheresoftware.b4a.objects.B4XCanvas");
//BA.debugLineNum = 26;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static void _initializecamera() throws Exception{
try {
Debug.PushSubsStack("InitializeCamera (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,121);
if (RapidSub.canDelegate("initializecamera")) { anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","initializecamera"); return;}
ResumableSub_InitializeCamera rsub = new ResumableSub_InitializeCamera(null);
rsub.resume(null, null);
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static class ResumableSub_InitializeCamera extends BA.ResumableSub {
public ResumableSub_InitializeCamera(anywheresoftware.b4a.samples.camera.main parent) {
this.parent = parent;
}
java.util.LinkedHashMap<String, Object> rsLocals = new java.util.LinkedHashMap<String, Object>();
anywheresoftware.b4a.samples.camera.main parent;
RemoteObject _permission = RemoteObject.createImmutable("");
RemoteObject _result = RemoteObject.createImmutable(false);
@Override
public void resume(BA ba, RemoteObject result) throws Exception{
try {
Debug.PushSubsStack("InitializeCamera (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,121);
Debug.locals = rsLocals;Debug.currentSubFrame.locals = rsLocals;
while (true) {
switch (state) {
case -1:
return;
case 0:
//C
this.state = 1;
BA.debugLineNum = 122;BA.debugLine="Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_";
Debug.ShouldStop(33554432);
parent.mostCurrent._starter._rp /*RemoteObject*/ .runVoidMethod ("CheckAndRequest",main.processBA,(Object)(parent.mostCurrent._starter._rp /*RemoteObject*/ .getField(true,"PERMISSION_CAMERA")));
BA.debugLineNum = 123;BA.debugLine="Wait For Activity_PermissionResult (Permission As";
Debug.ShouldStop(67108864);
parent.mostCurrent.__c.runVoidMethod ("WaitFor","activity_permissionresult", main.processBA, anywheresoftware.b4a.pc.PCResumableSub.createDebugResumeSub(this, "main", "initializecamera"), null);
this.state = 5;
return;
case 5:
//C
this.state = 1;
_permission = (RemoteObject) result.getArrayElement(true,RemoteObject.createImmutable(0));Debug.locals.put("Permission", _permission);
_result = (RemoteObject) result.getArrayElement(true,RemoteObject.createImmutable(1));Debug.locals.put("Result", _result);
;
BA.debugLineNum = 124;BA.debugLine="If Result Then";
Debug.ShouldStop(134217728);
if (true) break;
case 1:
//if
this.state = 4;
if (_result.<Boolean>get().booleanValue()) {
this.state = 3;
}if (true) break;
case 3:
//C
this.state = 4;
BA.debugLineNum = 125;BA.debugLine="camEx.Initialize(Panel1, frontCamera, Me, \"Camer";
Debug.ShouldStop(268435456);
parent.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_initialize" /*RemoteObject*/ ,main.mostCurrent.activityBA,(Object)(parent.mostCurrent._panel1),(Object)(parent._frontcamera),(Object)(main.getObject()),(Object)(RemoteObject.createImmutable("Camera1")));
BA.debugLineNum = 126;BA.debugLine="frontCamera = camEx.Front";
Debug.ShouldStop(536870912);
parent._frontcamera = parent.mostCurrent._camex.getField(true,"_front" /*RemoteObject*/ );
if (true) break;
case 4:
//C
this.state = -1;
;
BA.debugLineNum = 128;BA.debugLine="End Sub";
Debug.ShouldStop(-2147483648);
if (true) break;
}
}
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
}
public static void _activity_permissionresult(RemoteObject _permission,RemoteObject _result) throws Exception{
}
public static void initializeProcessGlobals() {
if (main.processGlobalsRun == false) {
main.processGlobalsRun = true;
try {
main_subs_0._process_globals();
starter_subs_0._process_globals();
httputils2service_subs_0._process_globals();
main.myClass = BA.getDeviceClass ("anywheresoftware.b4a.samples.camera.main");
cameraexclass.myClass = BA.getDeviceClass ("anywheresoftware.b4a.samples.camera.cameraexclass");
starter.myClass = BA.getDeviceClass ("anywheresoftware.b4a.samples.camera.starter");
httputils2service.myClass = BA.getDeviceClass ("anywheresoftware.b4a.samples.camera.httputils2service");
httpjob.myClass = BA.getDeviceClass ("anywheresoftware.b4a.samples.camera.httpjob");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}public static RemoteObject _process_globals() throws Exception{
//BA.debugLineNum = 13;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 14;BA.debugLine="Private frontCamera As Boolean = False";
main._frontcamera = main.mostCurrent.__c.getField(true,"False");
//BA.debugLineNum = 15;BA.debugLine="Private detector As JavaObject";
main._detector = RemoteObject.createNew ("anywheresoftware.b4j.object.JavaObject");
//BA.debugLineNum = 16;BA.debugLine="Private SearchForBarcodes As Boolean";
main._searchforbarcodes = RemoteObject.createImmutable(false);
//BA.debugLineNum = 17;BA.debugLine="Private LastPreview As Long";
main._lastpreview = RemoteObject.createImmutable(0L);
//BA.debugLineNum = 18;BA.debugLine="Private IntervalBetweenPreviewsMs As Int = 100";
main._intervalbetweenpreviewsms = BA.numberCast(int.class, 100);
//BA.debugLineNum = 19;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject _seekbar1_valuechanged(RemoteObject _value,RemoteObject _userchanged) throws Exception{
try {
Debug.PushSubsStack("SeekBar1_ValueChanged (main) ","main",0,main.mostCurrent.activityBA,main.mostCurrent,218);
if (RapidSub.canDelegate("seekbar1_valuechanged")) { return anywheresoftware.b4a.samples.camera.main.remoteMe.runUserSub(false, "main","seekbar1_valuechanged", _value, _userchanged);}
Debug.locals.put("Value", _value);
Debug.locals.put("UserChanged", _userchanged);
BA.debugLineNum = 218;BA.debugLine="Sub SeekBar1_ValueChanged (Value As Int, UserChang";
Debug.ShouldStop(33554432);
BA.debugLineNum = 219;BA.debugLine="If UserChanged = False Or camEx.IsZoomSupported =";
Debug.ShouldStop(67108864);
if (RemoteObject.solveBoolean("=",_userchanged,main.mostCurrent.__c.getField(true,"False")) || RemoteObject.solveBoolean("=",main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_iszoomsupported" /*RemoteObject*/ ),main.mostCurrent.__c.getField(true,"False"))) {
if (true) return RemoteObject.createImmutable("");};
BA.debugLineNum = 220;BA.debugLine="camEx.Zoom = Value / 100 * camEx.GetMaxZoom";
Debug.ShouldStop(134217728);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_setzoom" /*RemoteObject*/ ,BA.numberCast(int.class, RemoteObject.solve(new RemoteObject[] {_value,RemoteObject.createImmutable(100),main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_getmaxzoom" /*RemoteObject*/ )}, "/*",0, 0)));
BA.debugLineNum = 221;BA.debugLine="camEx.CommitParameters";
Debug.ShouldStop(268435456);
main.mostCurrent._camex.runClassMethod (anywheresoftware.b4a.samples.camera.cameraexclass.class, "_commitparameters" /*RemoteObject*/ );
BA.debugLineNum = 222;BA.debugLine="End Sub";
Debug.ShouldStop(536870912);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
}

View File

@@ -0,0 +1,60 @@
package anywheresoftware.b4a.samples.camera;
import java.io.IOException;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.PCBA;
import anywheresoftware.b4a.pc.RDebug;
import anywheresoftware.b4a.pc.RemoteObject;
import anywheresoftware.b4a.pc.RDebug.IRemote;
import anywheresoftware.b4a.pc.Debug;
import anywheresoftware.b4a.pc.B4XTypes.B4XClass;
import anywheresoftware.b4a.pc.B4XTypes.DeviceClass;
public class starter implements IRemote{
public static starter mostCurrent;
public static RemoteObject processBA;
public static boolean processGlobalsRun;
public static RemoteObject myClass;
public static RemoteObject remoteMe;
public starter() {
mostCurrent = this;
}
public RemoteObject getRemoteMe() {
return remoteMe;
}
public boolean isSingleton() {
return true;
}
static {
anywheresoftware.b4a.pc.RapidSub.moduleToObject.put(new B4XClass("starter"), "anywheresoftware.b4a.samples.camera.starter");
}
public static RemoteObject getObject() {
return myClass;
}
public RemoteObject _service;
private PCBA pcBA;
public PCBA create(Object[] args) throws ClassNotFoundException{
processBA = (RemoteObject) args[1];
_service = (RemoteObject) args[2];
remoteMe = RemoteObject.declareNull("anywheresoftware.b4a.samples.camera.starter");
anywheresoftware.b4a.keywords.Common.Density = (Float)args[3];
pcBA = new PCBA(this, starter.class);
main_subs_0.initializeProcessGlobals();
return pcBA;
}public static RemoteObject runMethod(boolean notUsed, String method, Object... args) throws Exception{
return (RemoteObject) mostCurrent.pcBA.raiseEvent(method.substring(1), args);
}
public static void runVoidMethod(String method, Object... args) throws Exception{
runMethod(false, method, args);
}
public static RemoteObject __c = RemoteObject.declareNull("anywheresoftware.b4a.keywords.Common");
public static RemoteObject _rp = RemoteObject.declareNull("anywheresoftware.b4a.objects.RuntimePermissions");
public static anywheresoftware.b4a.samples.camera.main _main = null;
public static anywheresoftware.b4a.samples.camera.httputils2service _httputils2service = null;
public Object[] GetGlobals() {
return new Object[] {"HttpUtils2Service",Debug.moduleToString(anywheresoftware.b4a.samples.camera.httputils2service.class),"Main",Debug.moduleToString(anywheresoftware.b4a.samples.camera.main.class),"rp",starter._rp,"Service",starter.mostCurrent._service};
}
}

View File

@@ -0,0 +1,86 @@
package anywheresoftware.b4a.samples.camera;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.pc.*;
public class starter_subs_0 {
public static RemoteObject _application_error(RemoteObject _error,RemoteObject _stacktrace) throws Exception{
try {
Debug.PushSubsStack("Application_Error (starter) ","starter",2,starter.processBA,starter.mostCurrent,21);
if (RapidSub.canDelegate("application_error")) { return anywheresoftware.b4a.samples.camera.starter.remoteMe.runUserSub(false, "starter","application_error", _error, _stacktrace);}
Debug.locals.put("Error", _error);
Debug.locals.put("StackTrace", _stacktrace);
BA.debugLineNum = 21;BA.debugLine="Sub Application_Error (Error As Exception, StackTr";
Debug.ShouldStop(1048576);
BA.debugLineNum = 22;BA.debugLine="Return True";
Debug.ShouldStop(2097152);
if (true) return starter.mostCurrent.__c.getField(true,"True");
BA.debugLineNum = 23;BA.debugLine="End Sub";
Debug.ShouldStop(4194304);
return RemoteObject.createImmutable(false);
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _process_globals() throws Exception{
//BA.debugLineNum = 6;BA.debugLine="Sub Process_Globals";
//BA.debugLineNum = 9;BA.debugLine="Public rp As RuntimePermissions";
starter._rp = RemoteObject.createNew ("anywheresoftware.b4a.objects.RuntimePermissions");
//BA.debugLineNum = 10;BA.debugLine="End Sub";
return RemoteObject.createImmutable("");
}
public static RemoteObject _service_create() throws Exception{
try {
Debug.PushSubsStack("Service_Create (starter) ","starter",2,starter.processBA,starter.mostCurrent,12);
if (RapidSub.canDelegate("service_create")) { return anywheresoftware.b4a.samples.camera.starter.remoteMe.runUserSub(false, "starter","service_create");}
BA.debugLineNum = 12;BA.debugLine="Sub Service_Create";
Debug.ShouldStop(2048);
BA.debugLineNum = 14;BA.debugLine="End Sub";
Debug.ShouldStop(8192);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _service_destroy() throws Exception{
try {
Debug.PushSubsStack("Service_Destroy (starter) ","starter",2,starter.processBA,starter.mostCurrent,25);
if (RapidSub.canDelegate("service_destroy")) { return anywheresoftware.b4a.samples.camera.starter.remoteMe.runUserSub(false, "starter","service_destroy");}
BA.debugLineNum = 25;BA.debugLine="Sub Service_Destroy";
Debug.ShouldStop(16777216);
BA.debugLineNum = 27;BA.debugLine="End Sub";
Debug.ShouldStop(67108864);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
public static RemoteObject _service_start(RemoteObject _startingintent) throws Exception{
try {
Debug.PushSubsStack("Service_Start (starter) ","starter",2,starter.processBA,starter.mostCurrent,16);
if (RapidSub.canDelegate("service_start")) { return anywheresoftware.b4a.samples.camera.starter.remoteMe.runUserSub(false, "starter","service_start", _startingintent);}
Debug.locals.put("StartingIntent", _startingintent);
BA.debugLineNum = 16;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
Debug.ShouldStop(32768);
BA.debugLineNum = 18;BA.debugLine="End Sub";
Debug.ShouldStop(131072);
return RemoteObject.createImmutable("");
}
catch (Exception e) {
throw Debug.ErrorCaught(e);
}
finally {
Debug.PopSubsStack();
}}
}