package medicomed.keymon.com.mx;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.objects.ServiceHelper;
import anywheresoftware.b4a.debug.*;

public class notificationservice extends android.app.Service{
	public static class notificationservice_BR extends android.content.BroadcastReceiver {

		@Override
		public void onReceive(android.content.Context context, android.content.Intent intent) {
            BA.LogInfo("** Receiver (notificationservice) OnReceive **");
			android.content.Intent in = new android.content.Intent(context, notificationservice.class);
			if (intent != null)
				in.putExtra("b4a_internal_intent", intent);
            ServiceHelper.StarterHelper.startServiceFromReceiver (context, in, false, BA.class);
		}

	}
    static notificationservice mostCurrent;
	public static BA processBA;
    private ServiceHelper _service;
    public static Class<?> getObject() {
		return notificationservice.class;
	}
	@Override
	public void onCreate() {
        super.onCreate();
        mostCurrent = this;
        if (processBA == null) {
		    processBA = new BA(this, null, null, "medicomed.keymon.com.mx", "medicomed.keymon.com.mx.notificationservice");
            if (BA.isShellModeRuntimeCheck(processBA)) {
                processBA.raiseEvent2(null, true, "SHELL", false);
		    }
            try {
                Class.forName(BA.applicationContext.getPackageName() + ".main").getMethod("initializeProcessGlobals").invoke(null, null);
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
            processBA.loadHtSubs(this.getClass());
            ServiceHelper.init();
        }
        _service = new ServiceHelper(this);
        processBA.service = this;
        
        if (BA.isShellModeRuntimeCheck(processBA)) {
			processBA.raiseEvent2(null, true, "CREATE", true, "medicomed.keymon.com.mx.notificationservice", processBA, _service, anywheresoftware.b4a.keywords.Common.Density);
		}
        if (!false && ServiceHelper.StarterHelper.startFromServiceCreate(processBA, false) == false) {
				
		}
		else {
            processBA.setActivityPaused(false);
            BA.LogInfo("*** Service (notificationservice) Create ***");
            processBA.raiseEvent(null, "service_create");
        }
        processBA.runHook("oncreate", this, null);
        if (false) {
			if (ServiceHelper.StarterHelper.runWaitForLayouts() == false) {
                BA.LogInfo("stopping spontaneous created service");
                stopSelf();
            }
		}
    }
		@Override
	public void onStart(android.content.Intent intent, int startId) {
		onStartCommand(intent, 0, 0);
    }
    @Override
    public int onStartCommand(final android.content.Intent intent, int flags, int startId) {
    	if (ServiceHelper.StarterHelper.onStartCommand(processBA, new Runnable() {
            public void run() {
                handleStart(intent);
            }}))
			;
		else {
			ServiceHelper.StarterHelper.addWaitForLayout (new Runnable() {
				public void run() {
                    processBA.setActivityPaused(false);
                    BA.LogInfo("** Service (notificationservice) Create **");
                    processBA.raiseEvent(null, "service_create");
					handleStart(intent);
                    ServiceHelper.StarterHelper.removeWaitForLayout();
				}
			});
		}
        processBA.runHook("onstartcommand", this, new Object[] {intent, flags, startId});
		return android.app.Service.START_NOT_STICKY;
    }
    public void onTaskRemoved(android.content.Intent rootIntent) {
        super.onTaskRemoved(rootIntent);
        if (false)
            processBA.raiseEvent(null, "service_taskremoved");
            
    }
    private void handleStart(android.content.Intent intent) {
    	BA.LogInfo("** Service (notificationservice) Start **");
    	java.lang.reflect.Method startEvent = processBA.htSubs.get("service_start");
    	if (startEvent != null) {
    		if (startEvent.getParameterTypes().length > 0) {
    			anywheresoftware.b4a.objects.IntentWrapper iw = ServiceHelper.StarterHelper.handleStartIntent(intent, _service, processBA);
    			processBA.raiseEvent(null, "service_start", iw);
    		}
    		else {
    			processBA.raiseEvent(null, "service_start");
    		}
    	}
    }

	public void onTimeout(int startId) {
        BA.LogInfo("** Service (notificationservice) Timeout **");
        anywheresoftware.b4a.objects.collections.Map params = new anywheresoftware.b4a.objects.collections.Map();
        params.Initialize();
        params.Put("StartId", startId);
        processBA.raiseEvent(null, "service_timeout", params);
            
    }
	@Override
	public void onDestroy() {
        super.onDestroy();
        if (false) {
            BA.LogInfo("** Service (notificationservice) Destroy (ignored)**");
        }
        else {
            BA.LogInfo("** Service (notificationservice) Destroy **");
		    processBA.raiseEvent(null, "service_destroy");
            processBA.service = null;
		    mostCurrent = null;
		    processBA.setActivityPaused(true);
            processBA.runHook("ondestroy", this, null);
        }
	}

@Override
	public android.os.IBinder onBind(android.content.Intent intent) {
		return null;
	}public anywheresoftware.b4a.keywords.Common __c = null;
public static b4a.jsaplication.com.br.ReplyAuto.NotificationListener _rp = null;
public static boolean _logger = false;
public b4a.example.dateutils _dateutils = null;
public medicomed.keymon.com.mx.main _main = null;
public medicomed.keymon.com.mx.starter _starter = null;
public medicomed.keymon.com.mx.appupdater _appupdater = null;
public medicomed.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public medicomed.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public medicomed.keymon.com.mx.subs _subs = null;
public medicomed.keymon.com.mx.pendientes _pendientes = null;
public medicomed.keymon.com.mx.tracker _tracker = null;
public medicomed.keymon.com.mx.newinst2 _newinst2 = null;
public medicomed.keymon.com.mx.b4xpages _b4xpages = null;
public medicomed.keymon.com.mx.b4xcollections _b4xcollections = null;
public medicomed.keymon.com.mx.httputils2service _httputils2service = null;
public medicomed.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public static String  _esmensajewavalido(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
boolean _valido = false;
String[] _ww = null;
 //BA.debugLineNum = 97;BA.debugLine="Sub esMensajeWAValido(SBN As StatusBarNotification";
 //BA.debugLineNum = 98;BA.debugLine="Private valido As Boolean = False";
_valido = anywheresoftware.b4a.keywords.Common.False;
 //BA.debugLineNum = 99;BA.debugLine="Private ww() As String = Regex.Split(\"\\|\", SBN.Ke";
_ww = anywheresoftware.b4a.keywords.Common.Regex.Split("\\|",_sbn.getKey());
 //BA.debugLineNum = 100;BA.debugLine="If ww(3) <> Null And ww(3) <> \"null\" Then valido";
if (_ww[(int) (3)]!= null && (_ww[(int) (3)]).equals("null") == false) { 
_valido = anywheresoftware.b4a.keywords.Common.True;};
 //BA.debugLineNum = 101;BA.debugLine="Return valido";
if (true) return BA.ObjectToString(_valido);
 //BA.debugLineNum = 102;BA.debugLine="End Sub";
return "";
}
public static String  _getgroupname(String _sbntitle) throws Exception{
int _a = 0;
String _x = "";
String _b = "";
 //BA.debugLineNum = 151;BA.debugLine="Sub getGroupName(sbnTitle As String) As String 'ig";
 //BA.debugLineNum = 152;BA.debugLine="Private a As Int = sbnTitle.IndexOf(\": \")";
_a = _sbntitle.indexOf(": ");
 //BA.debugLineNum = 153;BA.debugLine="Private x As String = sbnTitle";
_x = _sbntitle;
 //BA.debugLineNum = 154;BA.debugLine="If a > -1 Then";
if (_a>-1) { 
 //BA.debugLineNum = 155;BA.debugLine="Private b As String = sbnTitle.SubString2(0, a)";
_b = _sbntitle.substring((int) (0),_a);
 //BA.debugLineNum = 156;BA.debugLine="x = Regex.Replace(\" \\(.+\\)\", b, \"\")";
_x = anywheresoftware.b4a.keywords.Common.Regex.Replace(" \\(.+\\)",_b,"");
 };
 //BA.debugLineNum = 158;BA.debugLine="Return x";
if (true) return _x;
 //BA.debugLineNum = 159;BA.debugLine="End Sub";
return "";
}
public static String  _getgroupname2(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
int _inicio = 0;
String _x = "";
int _fin = 0;
 //BA.debugLineNum = 164;BA.debugLine="Sub getGroupName2(sbn As StatusBarNotification) As";
 //BA.debugLineNum = 165;BA.debugLine="Private inicio As Int = sbn.Extras.As(String).Ind";
_inicio = (BA.ObjectToString(_sbn.Extras())).indexOf("hiddenConversationTitle=");
 //BA.debugLineNum = 166;BA.debugLine="If inicio > -1 And sbn.Extras.As(String).IndexOf(";
if (_inicio>-1 && (BA.ObjectToString(_sbn.Extras())).indexOf("hiddenConversationTitle=null")==-1) { 
 //BA.debugLineNum = 167;BA.debugLine="Private x As String = sbn.Extras.As(String) 'ign";
_x = (BA.ObjectToString(_sbn.Extras()));
 //BA.debugLineNum = 168;BA.debugLine="Private fin As Int = x.IndexOf(\", android.reduce";
_fin = _x.indexOf(", android.reduced.images=");
 //BA.debugLineNum = 169;BA.debugLine="x = x.SubString2(inicio+24, fin)";
_x = _x.substring((int) (_inicio+24),_fin);
 //BA.debugLineNum = 170;BA.debugLine="x = Regex.Replace(\" \\(.+\\)\", x, \"\") 'Replace any";
_x = anywheresoftware.b4a.keywords.Common.Regex.Replace(" \\(.+\\)",_x,"");
 }else {
 //BA.debugLineNum = 172;BA.debugLine="Private x As String = sbn.Title";
_x = _sbn.getTitle();
 };
 //BA.debugLineNum = 174;BA.debugLine="Return x";
if (true) return _x;
 //BA.debugLineNum = 175;BA.debugLine="End Sub";
return "";
}
public static String  _getnumberorgroupwa(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
String _numremitente = "";
 //BA.debugLineNum = 188;BA.debugLine="Sub getNumberOrGroupWA(sbn As StatusBarNotificatio";
 //BA.debugLineNum = 189;BA.debugLine="Private numRemitente As String = getNumberWA(sbn)";
_numremitente = _getnumberwa(_sbn);
 //BA.debugLineNum = 190;BA.debugLine="If numRemitente = \"Not a person\" Then numRemitent";
if ((_numremitente).equals("Not a person")) { 
_numremitente = _getgroupname(_sbn.getTitle());};
 //BA.debugLineNum = 191;BA.debugLine="Return numRemitente";
if (true) return _numremitente;
 //BA.debugLineNum = 192;BA.debugLine="End Sub";
return "";
}
public static String  _getnumberwa(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
int _a = 0;
String _x = "";
int _y = 0;
 //BA.debugLineNum = 137;BA.debugLine="Sub getNumberWA(sbn As StatusBarNotification) As S";
 //BA.debugLineNum = 138;BA.debugLine="Private a As Int = sbn.As(String).IndexOf(\"@s.wha";
_a = (BA.ObjectToString(_sbn)).indexOf("@s.whatsapp.net");
 //BA.debugLineNum = 139;BA.debugLine="If a > -1 Then";
if (_a>-1) { 
 //BA.debugLineNum = 140;BA.debugLine="Private x As String = sbn.As(String) 'ignore";
_x = (BA.ObjectToString(_sbn));
 //BA.debugLineNum = 141;BA.debugLine="Private y As Int = x.IndexOf(\"shortcut=\")";
_y = _x.indexOf("shortcut=");
 //BA.debugLineNum = 142;BA.debugLine="If (y+9) > 0 And a > (y+9) Then x = x.SubString2";
if ((_y+9)>0 && _a>(_y+9)) { 
_x = _x.substring((int) (_y+9),_a);}
else {
_x = "Not a person";};
 }else {
 //BA.debugLineNum = 144;BA.debugLine="x = \"Not a person\"";
_x = "Not a person";
 };
 //BA.debugLineNum = 146;BA.debugLine="Return x";
if (true) return _x;
 //BA.debugLineNum = 147;BA.debugLine="End Sub";
return "";
}
public static String  _getpersonfromgroup(String _sbntitle) throws Exception{
int _a = 0;
String _b = "";
 //BA.debugLineNum = 180;BA.debugLine="Sub getPersonFromGroup(sbnTitle As String) As Stri";
 //BA.debugLineNum = 181;BA.debugLine="Private a As Int = sbnTitle.IndexOf(\": \")";
_a = _sbntitle.indexOf(": ");
 //BA.debugLineNum = 182;BA.debugLine="If a = -1 Then a = -2 'Is not from a group.";
if (_a==-1) { 
_a = (int) (-2);};
 //BA.debugLineNum = 183;BA.debugLine="Private b As String = sbnTitle.SubString(a+2)";
_b = _sbntitle.substring((int) (_a+2));
 //BA.debugLineNum = 184;BA.debugLine="Return b";
if (true) return _b;
 //BA.debugLineNum = 185;BA.debugLine="End Sub";
return "";
}
public static String  _getshortcut(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
int _ap = 0;
int _ag = 0;
String _x = "";
int _y = 0;
 //BA.debugLineNum = 197;BA.debugLine="Sub getShortcut(sbn As StatusBarNotification) As S";
 //BA.debugLineNum = 198;BA.debugLine="Private ap As Int = sbn.As(String).IndexOf(\"@s.wh";
_ap = (BA.ObjectToString(_sbn)).indexOf("@s.whatsapp.net");
 //BA.debugLineNum = 199;BA.debugLine="Private ag As Int = sbn.As(String).IndexOf(\"@g.us";
_ag = (BA.ObjectToString(_sbn)).indexOf("@g.us");
 //BA.debugLineNum = 200;BA.debugLine="Private x As String = sbn.As(String) 'ignore";
_x = (BA.ObjectToString(_sbn));
 //BA.debugLineNum = 201;BA.debugLine="Private y As Int = x.IndexOf(\"shortcut=\")";
_y = _x.indexOf("shortcut=");
 //BA.debugLineNum = 202;BA.debugLine="If ap > -1 Then";
if (_ap>-1) { 
 //BA.debugLineNum = 203;BA.debugLine="Private x As String = sbn.As(String) 'ignore";
_x = (BA.ObjectToString(_sbn));
 //BA.debugLineNum = 204;BA.debugLine="Private y As Int = x.IndexOf(\"shortcut=\")";
_y = _x.indexOf("shortcut=");
 //BA.debugLineNum = 205;BA.debugLine="x = x.SubString2(y+9, ap+15)";
_x = _x.substring((int) (_y+9),(int) (_ap+15));
 }else if(_ag>-1) { 
 //BA.debugLineNum = 207;BA.debugLine="Private x As String = sbn.As(String) 'ignore";
_x = (BA.ObjectToString(_sbn));
 //BA.debugLineNum = 208;BA.debugLine="Private y As Int = x.IndexOf(\"shortcut=\")";
_y = _x.indexOf("shortcut=");
 //BA.debugLineNum = 209;BA.debugLine="x = x.SubString2(y+9, ag+5)";
_x = _x.substring((int) (_y+9),(int) (_ag+5));
 };
 //BA.debugLineNum = 211;BA.debugLine="Return x";
if (true) return _x;
 //BA.debugLineNum = 212;BA.debugLine="End Sub";
return "";
}
public static boolean  _isgroupwa(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
boolean _a = false;
 //BA.debugLineNum = 113;BA.debugLine="Sub isGroupWA(sbn As StatusBarNotification) As Boo";
 //BA.debugLineNum = 114;BA.debugLine="Private a As Boolean = False";
_a = anywheresoftware.b4a.keywords.Common.False;
 //BA.debugLineNum = 115;BA.debugLine="If sbn.As(String).IndexOf(\"@g.us\") > -1 Then a =";
if ((BA.ObjectToString(_sbn)).indexOf("@g.us")>-1) { 
_a = anywheresoftware.b4a.keywords.Common.True;};
 //BA.debugLineNum = 116;BA.debugLine="Return a";
if (true) return _a;
 //BA.debugLineNum = 117;BA.debugLine="End Sub";
return false;
}
public static boolean  _isgroupwa2(String _sbntitle) throws Exception{
boolean _x = false;
 //BA.debugLineNum = 106;BA.debugLine="Sub isGroupWA2(sbnTitle As String) As Boolean 'ign";
 //BA.debugLineNum = 107;BA.debugLine="Private x As Boolean = Regex.ismatch(\".*(: ).*\",";
_x = anywheresoftware.b4a.keywords.Common.Regex.IsMatch(".*(: ).*",_sbntitle);
 //BA.debugLineNum = 108;BA.debugLine="Return x";
if (true) return _x;
 //BA.debugLineNum = 109;BA.debugLine="End Sub";
return false;
}
public static boolean  _ispersonwa(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
boolean _a = false;
 //BA.debugLineNum = 121;BA.debugLine="Sub isPersonWA(sbn As StatusBarNotification) As Bo";
 //BA.debugLineNum = 122;BA.debugLine="Private a As Boolean = False";
_a = anywheresoftware.b4a.keywords.Common.False;
 //BA.debugLineNum = 123;BA.debugLine="If sbn.As(String).IndexOf(\"@s.whatsapp.net\") > -1";
if ((BA.ObjectToString(_sbn)).indexOf("@s.whatsapp.net")>-1) { 
_a = anywheresoftware.b4a.keywords.Common.True;};
 //BA.debugLineNum = 124;BA.debugLine="Return a";
if (true) return _a;
 //BA.debugLineNum = 125;BA.debugLine="End Sub";
return false;
}
public static boolean  _ispersonwa2(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
boolean _a = false;
 //BA.debugLineNum = 129;BA.debugLine="Sub isPersonWA2(sbn As StatusBarNotification) As B";
 //BA.debugLineNum = 130;BA.debugLine="Private a As Boolean = False";
_a = anywheresoftware.b4a.keywords.Common.False;
 //BA.debugLineNum = 131;BA.debugLine="If sbn.As(String).IndexOf(\"channel=individual\") >";
if ((BA.ObjectToString(_sbn)).indexOf("channel=individual")>-1) { 
_a = anywheresoftware.b4a.keywords.Common.True;};
 //BA.debugLineNum = 132;BA.debugLine="Return a";
if (true) return _a;
 //BA.debugLineNum = 133;BA.debugLine="End Sub";
return false;
}
public static void  _notimon_notificationposted(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
ResumableSub_NotiMon_NotificationPosted rsub = new ResumableSub_NotiMon_NotificationPosted(null,_sbn);
rsub.resume(processBA, null);
}
public static class ResumableSub_NotiMon_NotificationPosted extends BA.ResumableSub {
public ResumableSub_NotiMon_NotificationPosted(medicomed.keymon.com.mx.notificationservice parent,b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) {
this.parent = parent;
this._sbn = _sbn;
}
medicomed.keymon.com.mx.notificationservice parent;
b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn;
String[] _cmd = null;

@Override
public void resume(BA ba, Object[] result) throws Exception{

    while (true) {
        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 75;BA.debugLine="Private logger As Boolean = True";
parent._logger = anywheresoftware.b4a.keywords.Common.True;
 //BA.debugLineNum = 76;BA.debugLine="If SBN.PackageName = \"com.whatsapp\"	Then";
if (true) break;

case 1:
//if
this.state = 36;
if ((_sbn.getPackageName()).equals("com.whatsapp")) { 
this.state = 3;
}if (true) break;

case 3:
//C
this.state = 4;
 //BA.debugLineNum = 77;BA.debugLine="If logger Then LogColor(SBN.PackageName, Colors.";
if (true) break;

case 4:
//if
this.state = 9;
if (parent._logger) { 
this.state = 6;
;}if (true) break;

case 6:
//C
this.state = 9;
anywheresoftware.b4a.keywords.Common.LogImpl("776218371",_sbn.getPackageName(),anywheresoftware.b4a.keywords.Common.Colors.Red);
if (true) break;

case 9:
//C
this.state = 10;
;
 //BA.debugLineNum = 78;BA.debugLine="If logger Then LogColor(\"isGroupWA2: \"&isGroupWA";
if (true) break;

case 10:
//if
this.state = 15;
if (parent._logger) { 
this.state = 12;
;}if (true) break;

case 12:
//C
this.state = 15;
anywheresoftware.b4a.keywords.Common.LogImpl("776218372","isGroupWA2: "+BA.ObjectToString(_isgroupwa(_sbn)),anywheresoftware.b4a.keywords.Common.Colors.Magenta);
if (true) break;

case 15:
//C
this.state = 16;
;
 //BA.debugLineNum = 79;BA.debugLine="If logger Then LogColor(\"isPersonWA: \"&isPersonW";
if (true) break;

case 16:
//if
this.state = 21;
if (parent._logger) { 
this.state = 18;
;}if (true) break;

case 18:
//C
this.state = 21;
anywheresoftware.b4a.keywords.Common.LogImpl("776218373","isPersonWA: "+BA.ObjectToString(_ispersonwa(_sbn)),anywheresoftware.b4a.keywords.Common.Colors.Magenta);
if (true) break;

case 21:
//C
this.state = 22;
;
 //BA.debugLineNum = 80;BA.debugLine="If logger Then Log($\"getGroupName: |${getGroupNa";
if (true) break;

case 22:
//if
this.state = 27;
if (parent._logger) { 
this.state = 24;
;}if (true) break;

case 24:
//C
this.state = 27;
anywheresoftware.b4a.keywords.Common.LogImpl("776218374",("getGroupName: |"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(_getgroupname(_sbn.getTitle())))+"|"),0);
if (true) break;

case 27:
//C
this.state = 28;
;
 //BA.debugLineNum = 81;BA.debugLine="Private cmd() As String = Regex.Split(\" \", SBN.M";
_cmd = anywheresoftware.b4a.keywords.Common.Regex.Split(" ",_sbn.getMessage());
 //BA.debugLineNum = 82;BA.debugLine="If SBN.Message.StartsWith(\"#NS\") And cmd.Length";
if (true) break;

case 28:
//if
this.state = 35;
if (_sbn.getMessage().startsWith("#NS") && _cmd.length==2) { 
this.state = 30;
}if (true) break;

case 30:
//C
this.state = 31;
 //BA.debugLineNum = 83;BA.debugLine="If esMensajeWAValido(SBN) Then";
if (true) break;

case 31:
//if
this.state = 34;
if (BA.ObjectToBoolean(_esmensajewavalido(_sbn))) { 
this.state = 33;
}if (true) break;

case 33:
//C
this.state = 34;
 //BA.debugLineNum = 85;BA.debugLine="rp.ClearNotification(SBN)";
parent._rp.ClearNotification(_sbn);
 //BA.debugLineNum = 86;BA.debugLine="Starter.reinicializaReqManager(cmd(1))";
parent.mostCurrent._starter._reinicializareqmanager /*String*/ (_cmd[(int) (1)]);
 //BA.debugLineNum = 87;BA.debugLine="rp.reply(SBN.Notification, SBN.PackageName, $\"";
parent._rp.reply((Object)(_sbn.getNotification().getObject()),(Object)(_sbn.getPackageName()),("Servidor cambiado a "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(_cmd[(int) (1)]))+" "));
 //BA.debugLineNum = 88;BA.debugLine="Sleep(1000)";
anywheresoftware.b4a.keywords.Common.Sleep(processBA,this,(int) (1000));
this.state = 37;
return;
case 37:
//C
this.state = 34;
;
 //BA.debugLineNum = 90;BA.debugLine="rp.ClearAll";
parent._rp.ClearAll();
 if (true) break;

case 34:
//C
this.state = 35;
;
 if (true) break;

case 35:
//C
this.state = 36;
;
 if (true) break;

case 36:
//C
this.state = -1;
;
 //BA.debugLineNum = 94;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public static String  _process_globals() throws Exception{
 //BA.debugLineNum = 45;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 48;BA.debugLine="Dim rp As ReplyAuto";
_rp = new b4a.jsaplication.com.br.ReplyAuto.NotificationListener();
 //BA.debugLineNum = 51;BA.debugLine="Dim logger As Boolean = False";
_logger = anywheresoftware.b4a.keywords.Common.False;
 //BA.debugLineNum = 52;BA.debugLine="End Sub";
return "";
}
public static String  _service_create() throws Exception{
 //BA.debugLineNum = 54;BA.debugLine="Sub Service_Create";
 //BA.debugLineNum = 55;BA.debugLine="rp.Initialize(\"NotiMon\")";
_rp.Initialize(processBA,"NotiMon");
 //BA.debugLineNum = 57;BA.debugLine="logger = False";
_logger = anywheresoftware.b4a.keywords.Common.False;
 //BA.debugLineNum = 60;BA.debugLine="End Sub";
return "";
}
public static String  _service_destroy() throws Exception{
 //BA.debugLineNum = 70;BA.debugLine="Sub Service_Destroy";
 //BA.debugLineNum = 72;BA.debugLine="End Sub";
return "";
}
public static String  _service_start(anywheresoftware.b4a.objects.IntentWrapper _startingintent) throws Exception{
 //BA.debugLineNum = 62;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
 //BA.debugLineNum = 64;BA.debugLine="If rp.HandleIntent(StartingIntent) Then Return";
if (_rp.HandleIntent(_startingintent)) { 
if (true) return "";};
 //BA.debugLineNum = 68;BA.debugLine="End Sub";
return "";
}
}
