Beispiel #1
0
 public static anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _getbitmap(
     anywheresoftware.b4a.BA _ba, String _url) throws Exception {
   anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper _b = null;
   // BA.debugLineNum = 97;BA.debugLine="Sub GetBitmap(URL As String) As Bitmap";
   // BA.debugLineNum = 98;BA.debugLine="Dim b As Bitmap";
   _b = new anywheresoftware.b4a.objects.drawable.CanvasWrapper.BitmapWrapper();
   // BA.debugLineNum = 99;BA.debugLine="If IsSuccess(URL) = False Then";
   if (_issuccess(_ba, _url) == anywheresoftware.b4a.keywords.Common.False) {
     // BA.debugLineNum = 100;BA.debugLine="Log(\"Task not completed successfully.\")";
     anywheresoftware.b4a.keywords.Common.Log("Task not completed successfully.");
     // BA.debugLineNum = 101;BA.debugLine="Return b";
     if (true) return _b;
   }
   ;
   // BA.debugLineNum = 103;BA.debugLine="b = LoadBitmap(HttpUtilsService.TempFolder,
   // SuccessfulUrls.Get(URL))";
   _b =
       anywheresoftware.b4a.keywords.Common.LoadBitmap(
           mostCurrent._httputilsservice._tempfolder,
           String.valueOf(_successfulurls.Get((Object) (_url))));
   // BA.debugLineNum = 104;BA.debugLine="Return b";
   if (true) return _b;
   // BA.debugLineNum = 105;BA.debugLine="End Sub";
   return null;
 }
Beispiel #2
0
 public static anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _getinputstream(
     anywheresoftware.b4a.BA _ba, String _url) throws Exception {
   anywheresoftware.b4a.objects.streams.File.InputStreamWrapper _in = null;
   // BA.debugLineNum = 107;BA.debugLine="Sub GetInputStream(URL As String) As InputStream";
   // BA.debugLineNum = 108;BA.debugLine="Dim In As InputStream";
   _in = new anywheresoftware.b4a.objects.streams.File.InputStreamWrapper();
   // BA.debugLineNum = 109;BA.debugLine="If IsSuccess(URL) = False Then";
   if (_issuccess(_ba, _url) == anywheresoftware.b4a.keywords.Common.False) {
     // BA.debugLineNum = 110;BA.debugLine="Log(\"Task not completed successfully.\")";
     anywheresoftware.b4a.keywords.Common.Log("Task not completed successfully.");
     // BA.debugLineNum = 111;BA.debugLine="Return In";
     if (true) return _in;
   }
   ;
   // BA.debugLineNum = 113;BA.debugLine="In = File.OpenInput(HttpUtilsService.TempFolder,
   // SuccessfulUrls.Get(URL))";
   _in =
       anywheresoftware.b4a.keywords.Common.File.OpenInput(
           mostCurrent._httputilsservice._tempfolder,
           String.valueOf(_successfulurls.Get((Object) (_url))));
   // BA.debugLineNum = 114;BA.debugLine="Return In";
   if (true) return _in;
   // BA.debugLineNum = 115;BA.debugLine="End Sub";
   return null;
 }
Beispiel #3
0
 public static String _getstring(anywheresoftware.b4a.BA _ba, String _url) throws Exception {
   // BA.debugLineNum = 89;BA.debugLine="Sub GetString(URL As String) As String";
   // BA.debugLineNum = 90;BA.debugLine="If IsSuccess(URL) = False Then";
   if (_issuccess(_ba, _url) == anywheresoftware.b4a.keywords.Common.False) {
     // BA.debugLineNum = 91;BA.debugLine="Log(\"Task not completed successfully.\")";
     anywheresoftware.b4a.keywords.Common.Log("Task not completed successfully.");
     // BA.debugLineNum = 92;BA.debugLine="Return \"\"";
     if (true) return "";
   }
   ;
   // BA.debugLineNum = 94;BA.debugLine="Return File.GetText(HttpUtilsService.TempFolder,
   // SuccessfulUrls.Get(URL))";
   if (true)
     return anywheresoftware.b4a.keywords.Common.File.GetText(
         mostCurrent._httputilsservice._tempfolder,
         String.valueOf(_successfulurls.Get((Object) (_url))));
   // BA.debugLineNum = 95;BA.debugLine="End Sub";
   return "";
 }
Beispiel #4
0
 public static String _jobdone(metube.mncplaymedia.com.mnchttpjob _mnchttp) throws Exception {
   try {
     Debug.PushSubsStack(
         "JobDone (register) ", "register", 3, mostCurrent.activityBA, mostCurrent, 99);
     adr.stringfunctions.stringfunctions _sf = null;
     String _stmp = "";
     anywheresoftware.b4a.objects.collections.JSONParser _parser = null;
     anywheresoftware.b4a.objects.collections.Map _mresult = null;
     byte[] _btmp = null;
     anywheresoftware.b4a.agraham.byteconverter.ByteConverter _bctmp = null;
     anywheresoftware.b4a.objects.StringUtils _su = null;
     Debug.locals.put("MNChttp", _mnchttp);
     BA.debugLineNum = 99;
     BA.debugLine = "Sub JobDone (MNChttp As MNChttpjob)";
     Debug.ShouldStop(4);
     BA.debugLineNum = 100;
     BA.debugLine = "Dim sf			As StringFunctions";
     Debug.ShouldStop(8);
     _sf = new adr.stringfunctions.stringfunctions();
     Debug.locals.put("sf", _sf);
     BA.debugLineNum = 101;
     BA.debugLine = "Dim sTmp 		As String";
     Debug.ShouldStop(16);
     _stmp = "";
     Debug.locals.put("sTmp", _stmp);
     BA.debugLineNum = 102;
     BA.debugLine = "Dim parser 		As JSONParser";
     Debug.ShouldStop(32);
     _parser = new anywheresoftware.b4a.objects.collections.JSONParser();
     Debug.locals.put("parser", _parser);
     BA.debugLineNum = 103;
     BA.debugLine = "Dim mresult		As Map";
     Debug.ShouldStop(64);
     _mresult = new anywheresoftware.b4a.objects.collections.Map();
     Debug.locals.put("mresult", _mresult);
     BA.debugLineNum = 104;
     BA.debugLine = "Dim bTmp()		As Byte";
     Debug.ShouldStop(128);
     _btmp = new byte[(int) (0)];
     ;
     Debug.locals.put("bTmp", _btmp);
     BA.debugLineNum = 105;
     BA.debugLine = "Dim bcTmp		As ByteConverter";
     Debug.ShouldStop(256);
     _bctmp = new anywheresoftware.b4a.agraham.byteconverter.ByteConverter();
     Debug.locals.put("bcTmp", _bctmp);
     BA.debugLineNum = 106;
     BA.debugLine = "Dim su 			As StringUtils";
     Debug.ShouldStop(512);
     _su = new anywheresoftware.b4a.objects.StringUtils();
     Debug.locals.put("su", _su);
     BA.debugLineNum = 108;
     BA.debugLine = "Log((MNChttp.GetString))";
     Debug.ShouldStop(2048);
     anywheresoftware.b4a.keywords.Common.Log((_mnchttp._getstring()));
     BA.debugLineNum = 110;
     BA.debugLine = "If MNChttp.Success = False Then";
     Debug.ShouldStop(8192);
     if (_mnchttp._success == anywheresoftware.b4a.keywords.Common.False) {
       BA.debugLineNum = 111;
       BA.debugLine =
           "If (sf.InString(MNChttp.ErrorMessage, \"timed out\") > 0) OR (sf.InString(MNChttp.ErrorMessage, \"refused\") > 0) OR _ 			 (sf.InString(MNChttp.ErrorMessage, \"Unable to resolve host\") > 0) OR (sf.InString(MNChttp.ErrorMessage, \"UnknownHostException\") > 0) OR _ 			 (sf.InString(MNChttp.ErrorMessage, \"FileNotFound\") > 0) Then";
       Debug.ShouldStop(16384);
       if ((_sf._vvv4(_mnchttp._errormessage, "timed out") > 0)
           || (_sf._vvv4(_mnchttp._errormessage, "refused") > 0)
           || (_sf._vvv4(_mnchttp._errormessage, "Unable to resolve host") > 0)
           || (_sf._vvv4(_mnchttp._errormessage, "UnknownHostException") > 0)
           || (_sf._vvv4(_mnchttp._errormessage, "FileNotFound") > 0)) {
         BA.debugLineNum = 115;
         BA.debugLine =
             "Msgbox2(\"Offline Connection or Server Down\", \"Moviebay\", \"OK\", \"\", \"\", LoadBitmap(File.DirAssets, \"warning.png\"))";
         Debug.ShouldStop(262144);
         anywheresoftware.b4a.keywords.Common.Msgbox2(
             "Offline Connection or Server Down",
             "Moviebay",
             "OK",
             "",
             "",
             (android.graphics.Bitmap)
                 (anywheresoftware.b4a.keywords.Common.LoadBitmap(
                         anywheresoftware.b4a.keywords.Common.File.getDirAssets(), "warning.png")
                     .getObject()),
             mostCurrent.activityBA);
       } else {
         BA.debugLineNum = 117;
         BA.debugLine = "If sf.InString(MNChttp.ErrorMessage, \"Not Found\") < 0 Then";
         Debug.ShouldStop(1048576);
         if (_sf._vvv4(_mnchttp._errormessage, "Not Found") < 0) {
           BA.debugLineNum = 119;
           BA.debugLine =
               "Msgbox2(\"Unknown Error\", \"MeTube\", \"OK\", \"\", \"\", LoadBitmap(File.DirAssets, \"warning.png\"))";
           Debug.ShouldStop(4194304);
           anywheresoftware.b4a.keywords.Common.Msgbox2(
               "Unknown Error",
               "MeTube",
               "OK",
               "",
               "",
               (android.graphics.Bitmap)
                   (anywheresoftware.b4a.keywords.Common.LoadBitmap(
                           anywheresoftware.b4a.keywords.Common.File.getDirAssets(), "warning.png")
                       .getObject()),
               mostCurrent.activityBA);
         }
         ;
       }
       ;
       BA.debugLineNum = 123;
       BA.debugLine = "Fungsi.mpList.Put(\"Koneksi\", \"Offline\")";
       Debug.ShouldStop(67108864);
       mostCurrent._fungsi._mplist.Put((Object) ("Koneksi"), (Object) ("Offline"));
       BA.debugLineNum = 124;
       BA.debugLine = "MNChttp.Release";
       Debug.ShouldStop(134217728);
       _mnchttp._release();
     } else {
       BA.debugLineNum = 129;
       BA.debugLine = "Try";
       Debug.ShouldStop(1);
       try {
         BA.debugLineNum = 132;
         BA.debugLine = "parser.Initialize(MNChttp.GetString)";
         Debug.ShouldStop(8);
         _parser.Initialize(_mnchttp._getstring());
         BA.debugLineNum = 133;
         BA.debugLine = "MNChttp.Release";
         Debug.ShouldStop(16);
         _mnchttp._release();
       } catch (Exception e97) {
         processBA.setLastException(e97);
         BA.debugLineNum = 135;
         BA.debugLine =
             "Msgbox2(\"Process Failure !\", \"MeTube\", \"OK\", \"\", \"\", LoadBitmap(File.DirAssets, \"warning.png\"))";
         Debug.ShouldStop(64);
         anywheresoftware.b4a.keywords.Common.Msgbox2(
             "Process Failure !",
             "MeTube",
             "OK",
             "",
             "",
             (android.graphics.Bitmap)
                 (anywheresoftware.b4a.keywords.Common.LoadBitmap(
                         anywheresoftware.b4a.keywords.Common.File.getDirAssets(), "warning.png")
                     .getObject()),
             mostCurrent.activityBA);
         BA.debugLineNum = 136;
         BA.debugLine = "Return";
         Debug.ShouldStop(128);
         if (true) return "";
       }
       ;
       BA.debugLineNum = 139;
       BA.debugLine = "Try";
       Debug.ShouldStop(1024);
       try {
         BA.debugLineNum = 140;
         BA.debugLine = "mresult.Initialize";
         Debug.ShouldStop(2048);
         _mresult.Initialize();
         BA.debugLineNum = 141;
         BA.debugLine = "mresult = parser.NextObject";
         Debug.ShouldStop(4096);
         _mresult = _parser.NextObject();
         Debug.locals.put("mresult", _mresult);
       } catch (Exception e104) {
         processBA.setLastException(e104);
         BA.debugLineNum = 143;
         BA.debugLine =
             "Msgbox2(\"Process Failure !\", \"MeTube\", \"OK\", \"\", \"\", LoadBitmap(File.DirAssets, \"warning.png\"))";
         Debug.ShouldStop(16384);
         anywheresoftware.b4a.keywords.Common.Msgbox2(
             "Process Failure !",
             "MeTube",
             "OK",
             "",
             "",
             (android.graphics.Bitmap)
                 (anywheresoftware.b4a.keywords.Common.LoadBitmap(
                         anywheresoftware.b4a.keywords.Common.File.getDirAssets(), "warning.png")
                     .getObject()),
             mostCurrent.activityBA);
         BA.debugLineNum = 144;
         BA.debugLine = "Return";
         Debug.ShouldStop(32768);
         if (true) return "";
       }
       ;
       BA.debugLineNum = 147;
       BA.debugLine = "If mresult.Get(\"error_code\") <> \"0\" Then";
       Debug.ShouldStop(262144);
       if ((_mresult.Get((Object) ("error_code"))).equals((Object) ("0")) == false) {
         BA.debugLineNum = 148;
         BA.debugLine =
             "Msgbox2(mresult.Get(\"error_msg\"), \"MeTube\", \"OK\", \"\", \"\", LoadBitmap(File.DirAssets, \"warning.png\"))";
         Debug.ShouldStop(524288);
         anywheresoftware.b4a.keywords.Common.Msgbox2(
             BA.ObjectToString(_mresult.Get((Object) ("error_msg"))),
             "MeTube",
             "OK",
             "",
             "",
             (android.graphics.Bitmap)
                 (anywheresoftware.b4a.keywords.Common.LoadBitmap(
                         anywheresoftware.b4a.keywords.Common.File.getDirAssets(), "warning.png")
                     .getObject()),
             mostCurrent.activityBA);
       } else {
         BA.debugLineNum = 150;
         BA.debugLine = "Fungsi.mpList.Put(\"Koneksi\", \"Online\")";
         Debug.ShouldStop(2097152);
         mostCurrent._fungsi._mplist.Put((Object) ("Koneksi"), (Object) ("Online"));
         BA.debugLineNum = 151;
         BA.debugLine = "MNChttp.Release";
         Debug.ShouldStop(4194304);
         _mnchttp._release();
         BA.debugLineNum = 153;
         BA.debugLine = "Select MNChttp.JobName";
         Debug.ShouldStop(16777216);
         switch (BA.switchObjectToInt(_mnchttp._jobname)) {
         }
         ;
       }
       ;
     }
     ;
     BA.debugLineNum = 158;
     BA.debugLine = "End Sub";
     Debug.ShouldStop(536870912);
     return "";
   } catch (Exception e) {
     Debug.ErrorCaught(e);
     throw e;
   } finally {
     Debug.PopSubsStack();
   }
 }