package reparto_izca.keymon.lat;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BALayout;
import anywheresoftware.b4a.debug.*;

public class manageexternalstorage extends B4AClass.ImplB4AClass implements BA.SubDelegator{
    private static java.util.HashMap<String, java.lang.reflect.Method> htSubs;
    private void innerInitialize(BA _ba) throws Exception {
        if (ba == null) {
            ba = new anywheresoftware.b4a.ShellBA(_ba, this, htSubs, "reparto_izca.keymon.lat.manageexternalstorage");
            if (htSubs == null) {
                ba.loadHtSubs(this.getClass());
                htSubs = ba.htSubs;
            }
            
        }
        if (BA.isShellModeRuntimeCheck(ba)) 
			   this.getClass().getMethod("_class_globals", reparto_izca.keymon.lat.manageexternalstorage.class).invoke(this, new Object[] {null});
        else
            ba.raiseEvent2(null, true, "class_globals", false);
    }

 
    public void  innerInitializeHelper(anywheresoftware.b4a.BA _ba) throws Exception{
        innerInitialize(_ba);
    }
    public Object callSub(String sub, Object sender, Object[] args) throws Exception {
        return BA.SubDelegator.SubNotFound;
    }
public anywheresoftware.b4a.keywords.Common __c = null;
public Object _ion = null;
public Object _mcallback = null;
public String _meventname = "";
public b4a.example.dateutils _dateutils = null;
public reparto_izca.keymon.lat.main _main = null;
public reparto_izca.keymon.lat.appupdater _appupdater = null;
public reparto_izca.keymon.lat.subs _subs = null;
public reparto_izca.keymon.lat.foto _foto = null;
public reparto_izca.keymon.lat.mapa_cliente _mapa_cliente = null;
public reparto_izca.keymon.lat.mapa_rutas _mapa_rutas = null;
public reparto_izca.keymon.lat.starter _starter = null;
public reparto_izca.keymon.lat.tracker _tracker = null;
public reparto_izca.keymon.lat.newinst2 _newinst2 = null;
public reparto_izca.keymon.lat.b4xpages _b4xpages = null;
public reparto_izca.keymon.lat.b4xcollections _b4xcollections = null;
public reparto_izca.keymon.lat.httputils2service _httputils2service = null;
public reparto_izca.keymon.lat.xuiviewsutils _xuiviewsutils = null;
public String  _initialize(reparto_izca.keymon.lat.manageexternalstorage __ref,anywheresoftware.b4a.BA _ba,Object _callback,String _eventname) throws Exception{
__ref = this;
innerInitialize(_ba);
RDebugUtils.currentModule="manageexternalstorage";
if (Debug.shouldDelegate(ba, "initialize", false))
	 {return ((String) Debug.delegate(ba, "initialize", new Object[] {_ba,_callback,_eventname}));}
RDebugUtils.currentLine=70451200;
 //BA.debugLineNum = 70451200;BA.debugLine="Public Sub Initialize (Callback As Object, EventNa";
RDebugUtils.currentLine=70451201;
 //BA.debugLineNum = 70451201;BA.debugLine="mCallback = Callback";
__ref._mcallback /*Object*/  = _callback;
RDebugUtils.currentLine=70451202;
 //BA.debugLineNum = 70451202;BA.debugLine="mEventName = EventName";
__ref._meventname /*String*/  = _eventname;
RDebugUtils.currentLine=70451203;
 //BA.debugLineNum = 70451203;BA.debugLine="End Sub";
return "";
}
public boolean  _haspermission(reparto_izca.keymon.lat.manageexternalstorage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="manageexternalstorage";
if (Debug.shouldDelegate(ba, "haspermission", false))
	 {return ((Boolean) Debug.delegate(ba, "haspermission", null));}
boolean _has = false;
anywheresoftware.b4j.object.JavaObject _jo = null;
RDebugUtils.currentLine=70516736;
 //BA.debugLineNum = 70516736;BA.debugLine="Public Sub HasPermission As Boolean";
RDebugUtils.currentLine=70516737;
 //BA.debugLineNum = 70516737;BA.debugLine="Dim has As Boolean";
_has = false;
RDebugUtils.currentLine=70516738;
 //BA.debugLineNum = 70516738;BA.debugLine="Dim jo As JavaObject";
_jo = new anywheresoftware.b4j.object.JavaObject();
RDebugUtils.currentLine=70516739;
 //BA.debugLineNum = 70516739;BA.debugLine="jo.InitializeStatic(\"android.os.Environment\")";
_jo.InitializeStatic("android.os.Environment");
RDebugUtils.currentLine=70516740;
 //BA.debugLineNum = 70516740;BA.debugLine="has = jo.RunMethod(\"isExternalStorageManager\", Nu";
_has = BA.ObjectToBoolean(_jo.RunMethod("isExternalStorageManager",(Object[])(__c.Null)));
RDebugUtils.currentLine=70516741;
 //BA.debugLineNum = 70516741;BA.debugLine="Return has";
if (true) return _has;
RDebugUtils.currentLine=70516742;
 //BA.debugLineNum = 70516742;BA.debugLine="End Sub";
return false;
}
public String  _getpermission(reparto_izca.keymon.lat.manageexternalstorage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="manageexternalstorage";
if (Debug.shouldDelegate(ba, "getpermission", false))
	 {return ((String) Debug.delegate(ba, "getpermission", null));}
anywheresoftware.b4a.objects.IntentWrapper _in = null;
RDebugUtils.currentLine=70582272;
 //BA.debugLineNum = 70582272;BA.debugLine="Public Sub GetPermission";
RDebugUtils.currentLine=70582273;
 //BA.debugLineNum = 70582273;BA.debugLine="If HasPermission Then";
if (__ref._haspermission /*boolean*/ (null)) { 
RDebugUtils.currentLine=70582274;
 //BA.debugLineNum = 70582274;BA.debugLine="RaiseEvent";
__ref._raiseevent /*String*/ (null);
RDebugUtils.currentLine=70582275;
 //BA.debugLineNum = 70582275;BA.debugLine="Return";
if (true) return "";
 };
RDebugUtils.currentLine=70582277;
 //BA.debugLineNum = 70582277;BA.debugLine="Dim in As Intent";
_in = new anywheresoftware.b4a.objects.IntentWrapper();
RDebugUtils.currentLine=70582279;
 //BA.debugLineNum = 70582279;BA.debugLine="in.Initialize(\"android.settings.MANAGE_APP_ALL_FI";
_in.Initialize("android.settings.MANAGE_APP_ALL_FILES_ACCESS_PERMISSION",("package:"+__c.SmartStringFormatter("",(Object)(__c.Application.getPackageName()))+""));
RDebugUtils.currentLine=70582280;
 //BA.debugLineNum = 70582280;BA.debugLine="StartActivityForResult(in)";
__ref._startactivityforresult /*String*/ (null,_in);
RDebugUtils.currentLine=70582281;
 //BA.debugLineNum = 70582281;BA.debugLine="End Sub";
return "";
}
public String  _class_globals(reparto_izca.keymon.lat.manageexternalstorage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="manageexternalstorage";
RDebugUtils.currentLine=70385664;
 //BA.debugLineNum = 70385664;BA.debugLine="Sub Class_Globals";
RDebugUtils.currentLine=70385665;
 //BA.debugLineNum = 70385665;BA.debugLine="Private ion As Object";
_ion = new Object();
RDebugUtils.currentLine=70385666;
 //BA.debugLineNum = 70385666;BA.debugLine="Private mCallback As Object";
_mcallback = new Object();
RDebugUtils.currentLine=70385667;
 //BA.debugLineNum = 70385667;BA.debugLine="Private mEventName As String";
_meventname = "";
RDebugUtils.currentLine=70385669;
 //BA.debugLineNum = 70385669;BA.debugLine="End Sub";
return "";
}
public Object  _getba(reparto_izca.keymon.lat.manageexternalstorage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="manageexternalstorage";
if (Debug.shouldDelegate(ba, "getba", false))
	 {return ((Object) Debug.delegate(ba, "getba", null));}
anywheresoftware.b4j.object.JavaObject _jo = null;
RDebugUtils.currentLine=70844416;
 //BA.debugLineNum = 70844416;BA.debugLine="Private Sub GetBA As Object";
RDebugUtils.currentLine=70844417;
 //BA.debugLineNum = 70844417;BA.debugLine="Dim jo As JavaObject = Me";
_jo = new anywheresoftware.b4j.object.JavaObject();
_jo = (anywheresoftware.b4j.object.JavaObject) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.object.JavaObject(), (java.lang.Object)(this));
RDebugUtils.currentLine=70844418;
 //BA.debugLineNum = 70844418;BA.debugLine="Return jo.RunMethod(\"getBA\", Null)";
if (true) return _jo.RunMethod("getBA",(Object[])(__c.Null));
RDebugUtils.currentLine=70844419;
 //BA.debugLineNum = 70844419;BA.debugLine="End Sub";
return null;
}
public String  _raiseevent(reparto_izca.keymon.lat.manageexternalstorage __ref) throws Exception{
__ref = this;
RDebugUtils.currentModule="manageexternalstorage";
if (Debug.shouldDelegate(ba, "raiseevent", false))
	 {return ((String) Debug.delegate(ba, "raiseevent", null));}
RDebugUtils.currentLine=70647808;
 //BA.debugLineNum = 70647808;BA.debugLine="Private Sub RaiseEvent";
RDebugUtils.currentLine=70647809;
 //BA.debugLineNum = 70647809;BA.debugLine="Log(\"Calling : \" &  mEventName & \"_StorageAvailab";
__c.LogImpl("870647809","Calling : "+__ref._meventname /*String*/ +"_StorageAvailable",0);
RDebugUtils.currentLine=70647810;
 //BA.debugLineNum = 70647810;BA.debugLine="CallSubDelayed(mCallback, mEventName & \"_StorageA";
__c.CallSubDelayed(ba,__ref._mcallback /*Object*/ ,__ref._meventname /*String*/ +"_StorageAvailable");
RDebugUtils.currentLine=70647811;
 //BA.debugLineNum = 70647811;BA.debugLine="End Sub";
return "";
}
public String  _startactivityforresult(reparto_izca.keymon.lat.manageexternalstorage __ref,anywheresoftware.b4a.objects.IntentWrapper _i) throws Exception{
__ref = this;
RDebugUtils.currentModule="manageexternalstorage";
if (Debug.shouldDelegate(ba, "startactivityforresult", false))
	 {return ((String) Debug.delegate(ba, "startactivityforresult", new Object[] {_i}));}
anywheresoftware.b4j.object.JavaObject _jo = null;
RDebugUtils.currentLine=70778880;
 //BA.debugLineNum = 70778880;BA.debugLine="Private Sub StartActivityForResult(i As Intent)";
RDebugUtils.currentLine=70778881;
 //BA.debugLineNum = 70778881;BA.debugLine="Dim jo As JavaObject = GetBA";
_jo = new anywheresoftware.b4j.object.JavaObject();
_jo = (anywheresoftware.b4j.object.JavaObject) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4j.object.JavaObject(), (java.lang.Object)(__ref._getba /*Object*/ (null)));
RDebugUtils.currentLine=70778882;
 //BA.debugLineNum = 70778882;BA.debugLine="ion = jo.CreateEvent(\"anywheresoftware.b4a.IOnAct";
__ref._ion /*Object*/  = _jo.CreateEvent(ba,"anywheresoftware.b4a.IOnActivityResult","ion",__c.Null);
RDebugUtils.currentLine=70778883;
 //BA.debugLineNum = 70778883;BA.debugLine="jo.RunMethod(\"startActivityForResult\", Array As O";
_jo.RunMethod("startActivityForResult",new Object[]{__ref._ion /*Object*/ ,(Object)(_i.getObject())});
RDebugUtils.currentLine=70778884;
 //BA.debugLineNum = 70778884;BA.debugLine="End Sub";
return "";
}
public Object  _ion_event(reparto_izca.keymon.lat.manageexternalstorage __ref,String _methodname,Object[] _args) throws Exception{
__ref = this;
RDebugUtils.currentModule="manageexternalstorage";
if (Debug.shouldDelegate(ba, "ion_event", false))
	 {return ((Object) Debug.delegate(ba, "ion_event", new Object[] {_methodname,_args}));}
RDebugUtils.currentLine=70713344;
 //BA.debugLineNum = 70713344;BA.debugLine="Private Sub ion_Event (MethodName As String, Args(";
RDebugUtils.currentLine=70713345;
 //BA.debugLineNum = 70713345;BA.debugLine="RaiseEvent";
__ref._raiseevent /*String*/ (null);
RDebugUtils.currentLine=70713346;
 //BA.debugLineNum = 70713346;BA.debugLine="Return Null";
if (true) return __c.Null;
RDebugUtils.currentLine=70713347;
 //BA.debugLineNum = 70713347;BA.debugLine="End Sub";
return null;
}
}