package SHARK2.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, anywheresoftware.b4a.ShellBA.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 anywheresoftware.b4a.ShellBA(this, null, null, "SHARK2.keymon.com.mx", "SHARK2.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, "SHARK2.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");
    		}
    	}
    }
	
	@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 SHARK2.keymon.com.mx.main _main = null;
public SHARK2.keymon.com.mx.appupdater _appupdater = null;
public SHARK2.keymon.com.mx.mapa_cliente _mapa_cliente = null;
public SHARK2.keymon.com.mx.mapa_rutas _mapa_rutas = null;
public SHARK2.keymon.com.mx.pendientes _pendientes = null;
public SHARK2.keymon.com.mx.starter _starter = null;
public SHARK2.keymon.com.mx.subs _subs = null;
public SHARK2.keymon.com.mx.tracker _tracker = null;
public SHARK2.keymon.com.mx.newinst2 _newinst2 = null;
public SHARK2.keymon.com.mx.b4xpages _b4xpages = null;
public SHARK2.keymon.com.mx.b4xcollections _b4xcollections = null;
public SHARK2.keymon.com.mx.httputils2service _httputils2service = null;
public SHARK2.keymon.com.mx.xuiviewsutils _xuiviewsutils = null;
public static String  _esmensajewavalido(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "esmensajewavalido", false))
	 {return ((String) Debug.delegate(processBA, "esmensajewavalido", new Object[] {_sbn}));}
boolean _valido = false;
String[] _ww = null;
RDebugUtils.currentLine=35061760;
 //BA.debugLineNum = 35061760;BA.debugLine="Sub esMensajeWAValido(SBN As StatusBarNotification";
RDebugUtils.currentLine=35061761;
 //BA.debugLineNum = 35061761;BA.debugLine="Private valido As Boolean = False";
_valido = anywheresoftware.b4a.keywords.Common.False;
RDebugUtils.currentLine=35061762;
 //BA.debugLineNum = 35061762;BA.debugLine="Private ww() As String = Regex.Split(\"\\|\", SBN.Ke";
_ww = anywheresoftware.b4a.keywords.Common.Regex.Split("\\|",_sbn.getKey());
RDebugUtils.currentLine=35061763;
 //BA.debugLineNum = 35061763;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;};
RDebugUtils.currentLine=35061764;
 //BA.debugLineNum = 35061764;BA.debugLine="Return valido";
if (true) return BA.ObjectToString(_valido);
RDebugUtils.currentLine=35061765;
 //BA.debugLineNum = 35061765;BA.debugLine="End Sub";
return "";
}
public static String  _getgroupname(String _sbntitle) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "getgroupname", false))
	 {return ((String) Debug.delegate(processBA, "getgroupname", new Object[] {_sbntitle}));}
int _a = 0;
String _x = "";
String _b = "";
RDebugUtils.currentLine=35454976;
 //BA.debugLineNum = 35454976;BA.debugLine="Sub getGroupName(sbnTitle As String) As String 'ig";
RDebugUtils.currentLine=35454977;
 //BA.debugLineNum = 35454977;BA.debugLine="Private a As Int = sbnTitle.IndexOf(\": \")";
_a = _sbntitle.indexOf(": ");
RDebugUtils.currentLine=35454978;
 //BA.debugLineNum = 35454978;BA.debugLine="Private x As String = sbnTitle";
_x = _sbntitle;
RDebugUtils.currentLine=35454979;
 //BA.debugLineNum = 35454979;BA.debugLine="If a > -1 Then";
if (_a>-1) { 
RDebugUtils.currentLine=35454980;
 //BA.debugLineNum = 35454980;BA.debugLine="Private b As String = sbnTitle.SubString2(0, a)";
_b = _sbntitle.substring((int) (0),_a);
RDebugUtils.currentLine=35454981;
 //BA.debugLineNum = 35454981;BA.debugLine="x = Regex.Replace(\" \\(.+\\)\", b, \"\")";
_x = anywheresoftware.b4a.keywords.Common.Regex.Replace(" \\(.+\\)",_b,"");
 };
RDebugUtils.currentLine=35454983;
 //BA.debugLineNum = 35454983;BA.debugLine="Return x";
if (true) return _x;
RDebugUtils.currentLine=35454984;
 //BA.debugLineNum = 35454984;BA.debugLine="End Sub";
return "";
}
public static String  _getgroupname2(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "getgroupname2", false))
	 {return ((String) Debug.delegate(processBA, "getgroupname2", new Object[] {_sbn}));}
int _inicio = 0;
String _x = "";
int _fin = 0;
RDebugUtils.currentLine=35520512;
 //BA.debugLineNum = 35520512;BA.debugLine="Sub getGroupName2(sbn As StatusBarNotification) As";
RDebugUtils.currentLine=35520513;
 //BA.debugLineNum = 35520513;BA.debugLine="Private inicio As Int = sbn.Extras.As(String).Ind";
_inicio = (BA.ObjectToString(_sbn.Extras())).indexOf("hiddenConversationTitle=");
RDebugUtils.currentLine=35520514;
 //BA.debugLineNum = 35520514;BA.debugLine="If inicio > -1 And sbn.Extras.As(String).IndexOf(";
if (_inicio>-1 && (BA.ObjectToString(_sbn.Extras())).indexOf("hiddenConversationTitle=null")==-1) { 
RDebugUtils.currentLine=35520515;
 //BA.debugLineNum = 35520515;BA.debugLine="Private x As String = sbn.Extras.As(String) 'ign";
_x = (BA.ObjectToString(_sbn.Extras()));
RDebugUtils.currentLine=35520516;
 //BA.debugLineNum = 35520516;BA.debugLine="Private fin As Int = x.IndexOf(\", android.reduce";
_fin = _x.indexOf(", android.reduced.images=");
RDebugUtils.currentLine=35520517;
 //BA.debugLineNum = 35520517;BA.debugLine="x = x.SubString2(inicio+24, fin)";
_x = _x.substring((int) (_inicio+24),_fin);
RDebugUtils.currentLine=35520518;
 //BA.debugLineNum = 35520518;BA.debugLine="x = Regex.Replace(\" \\(.+\\)\", x, \"\") 'Replace any";
_x = anywheresoftware.b4a.keywords.Common.Regex.Replace(" \\(.+\\)",_x,"");
 }else {
RDebugUtils.currentLine=35520520;
 //BA.debugLineNum = 35520520;BA.debugLine="Private x As String = sbn.Title";
_x = _sbn.getTitle();
 };
RDebugUtils.currentLine=35520522;
 //BA.debugLineNum = 35520522;BA.debugLine="Return x";
if (true) return _x;
RDebugUtils.currentLine=35520523;
 //BA.debugLineNum = 35520523;BA.debugLine="End Sub";
return "";
}
public static String  _getnumberorgroupwa(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "getnumberorgroupwa", false))
	 {return ((String) Debug.delegate(processBA, "getnumberorgroupwa", new Object[] {_sbn}));}
String _numremitente = "";
RDebugUtils.currentLine=35651584;
 //BA.debugLineNum = 35651584;BA.debugLine="Sub getNumberOrGroupWA(sbn As StatusBarNotificatio";
RDebugUtils.currentLine=35651585;
 //BA.debugLineNum = 35651585;BA.debugLine="Private numRemitente As String = getNumberWA(sbn)";
_numremitente = _getnumberwa(_sbn);
RDebugUtils.currentLine=35651586;
 //BA.debugLineNum = 35651586;BA.debugLine="If numRemitente = \"Not a person\" Then numRemitent";
if ((_numremitente).equals("Not a person")) { 
_numremitente = _getgroupname(_sbn.getTitle());};
RDebugUtils.currentLine=35651587;
 //BA.debugLineNum = 35651587;BA.debugLine="Return numRemitente";
if (true) return _numremitente;
RDebugUtils.currentLine=35651588;
 //BA.debugLineNum = 35651588;BA.debugLine="End Sub";
return "";
}
public static String  _getnumberwa(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "getnumberwa", false))
	 {return ((String) Debug.delegate(processBA, "getnumberwa", new Object[] {_sbn}));}
int _a = 0;
String _x = "";
int _y = 0;
RDebugUtils.currentLine=35389440;
 //BA.debugLineNum = 35389440;BA.debugLine="Sub getNumberWA(sbn As StatusBarNotification) As S";
RDebugUtils.currentLine=35389441;
 //BA.debugLineNum = 35389441;BA.debugLine="Private a As Int = sbn.As(String).IndexOf(\"@s.wha";
_a = (BA.ObjectToString(_sbn)).indexOf("@s.whatsapp.net");
RDebugUtils.currentLine=35389442;
 //BA.debugLineNum = 35389442;BA.debugLine="If a > -1 Then";
if (_a>-1) { 
RDebugUtils.currentLine=35389443;
 //BA.debugLineNum = 35389443;BA.debugLine="Private x As String = sbn.As(String) 'ignore";
_x = (BA.ObjectToString(_sbn));
RDebugUtils.currentLine=35389444;
 //BA.debugLineNum = 35389444;BA.debugLine="Private y As Int = x.IndexOf(\"shortcut=\")";
_y = _x.indexOf("shortcut=");
RDebugUtils.currentLine=35389445;
 //BA.debugLineNum = 35389445;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 {
RDebugUtils.currentLine=35389447;
 //BA.debugLineNum = 35389447;BA.debugLine="x = \"Not a person\"";
_x = "Not a person";
 };
RDebugUtils.currentLine=35389449;
 //BA.debugLineNum = 35389449;BA.debugLine="Return x";
if (true) return _x;
RDebugUtils.currentLine=35389450;
 //BA.debugLineNum = 35389450;BA.debugLine="End Sub";
return "";
}
public static String  _getpersonfromgroup(String _sbntitle) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "getpersonfromgroup", false))
	 {return ((String) Debug.delegate(processBA, "getpersonfromgroup", new Object[] {_sbntitle}));}
int _a = 0;
String _b = "";
RDebugUtils.currentLine=35586048;
 //BA.debugLineNum = 35586048;BA.debugLine="Sub getPersonFromGroup(sbnTitle As String) As Stri";
RDebugUtils.currentLine=35586049;
 //BA.debugLineNum = 35586049;BA.debugLine="Private a As Int = sbnTitle.IndexOf(\": \")";
_a = _sbntitle.indexOf(": ");
RDebugUtils.currentLine=35586050;
 //BA.debugLineNum = 35586050;BA.debugLine="If a = -1 Then a = -2 'Is not from a group.";
if (_a==-1) { 
_a = (int) (-2);};
RDebugUtils.currentLine=35586051;
 //BA.debugLineNum = 35586051;BA.debugLine="Private b As String = sbnTitle.SubString(a+2)";
_b = _sbntitle.substring((int) (_a+2));
RDebugUtils.currentLine=35586052;
 //BA.debugLineNum = 35586052;BA.debugLine="Return b";
if (true) return _b;
RDebugUtils.currentLine=35586053;
 //BA.debugLineNum = 35586053;BA.debugLine="End Sub";
return "";
}
public static String  _getshortcut(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "getshortcut", false))
	 {return ((String) Debug.delegate(processBA, "getshortcut", new Object[] {_sbn}));}
int _ap = 0;
int _ag = 0;
String _x = "";
int _y = 0;
RDebugUtils.currentLine=35717120;
 //BA.debugLineNum = 35717120;BA.debugLine="Sub getShortcut(sbn As StatusBarNotification) As S";
RDebugUtils.currentLine=35717121;
 //BA.debugLineNum = 35717121;BA.debugLine="Private ap As Int = sbn.As(String).IndexOf(\"@s.wh";
_ap = (BA.ObjectToString(_sbn)).indexOf("@s.whatsapp.net");
RDebugUtils.currentLine=35717122;
 //BA.debugLineNum = 35717122;BA.debugLine="Private ag As Int = sbn.As(String).IndexOf(\"@g.us";
_ag = (BA.ObjectToString(_sbn)).indexOf("@g.us");
RDebugUtils.currentLine=35717123;
 //BA.debugLineNum = 35717123;BA.debugLine="Private x As String = sbn.As(String) 'ignore";
_x = (BA.ObjectToString(_sbn));
RDebugUtils.currentLine=35717124;
 //BA.debugLineNum = 35717124;BA.debugLine="Private y As Int = x.IndexOf(\"shortcut=\")";
_y = _x.indexOf("shortcut=");
RDebugUtils.currentLine=35717125;
 //BA.debugLineNum = 35717125;BA.debugLine="If ap > -1 Then";
if (_ap>-1) { 
RDebugUtils.currentLine=35717126;
 //BA.debugLineNum = 35717126;BA.debugLine="Private x As String = sbn.As(String) 'ignore";
_x = (BA.ObjectToString(_sbn));
RDebugUtils.currentLine=35717127;
 //BA.debugLineNum = 35717127;BA.debugLine="Private y As Int = x.IndexOf(\"shortcut=\")";
_y = _x.indexOf("shortcut=");
RDebugUtils.currentLine=35717128;
 //BA.debugLineNum = 35717128;BA.debugLine="x = x.SubString2(y+9, ap+15)";
_x = _x.substring((int) (_y+9),(int) (_ap+15));
 }else 
{RDebugUtils.currentLine=35717129;
 //BA.debugLineNum = 35717129;BA.debugLine="Else if ag > -1 Then 'It is probably is a group.";
if (_ag>-1) { 
RDebugUtils.currentLine=35717130;
 //BA.debugLineNum = 35717130;BA.debugLine="Private x As String = sbn.As(String) 'ignore";
_x = (BA.ObjectToString(_sbn));
RDebugUtils.currentLine=35717131;
 //BA.debugLineNum = 35717131;BA.debugLine="Private y As Int = x.IndexOf(\"shortcut=\")";
_y = _x.indexOf("shortcut=");
RDebugUtils.currentLine=35717132;
 //BA.debugLineNum = 35717132;BA.debugLine="x = x.SubString2(y+9, ag+5)";
_x = _x.substring((int) (_y+9),(int) (_ag+5));
 }}
;
RDebugUtils.currentLine=35717134;
 //BA.debugLineNum = 35717134;BA.debugLine="Return x";
if (true) return _x;
RDebugUtils.currentLine=35717135;
 //BA.debugLineNum = 35717135;BA.debugLine="End Sub";
return "";
}
public static boolean  _isgroupwa(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "isgroupwa", false))
	 {return ((Boolean) Debug.delegate(processBA, "isgroupwa", new Object[] {_sbn}));}
boolean _a = false;
RDebugUtils.currentLine=35192832;
 //BA.debugLineNum = 35192832;BA.debugLine="Sub isGroupWA(sbn As StatusBarNotification) As Boo";
RDebugUtils.currentLine=35192833;
 //BA.debugLineNum = 35192833;BA.debugLine="Private a As Boolean = False";
_a = anywheresoftware.b4a.keywords.Common.False;
RDebugUtils.currentLine=35192834;
 //BA.debugLineNum = 35192834;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;};
RDebugUtils.currentLine=35192835;
 //BA.debugLineNum = 35192835;BA.debugLine="Return a";
if (true) return _a;
RDebugUtils.currentLine=35192836;
 //BA.debugLineNum = 35192836;BA.debugLine="End Sub";
return false;
}
public static boolean  _isgroupwa2(String _sbntitle) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "isgroupwa2", false))
	 {return ((Boolean) Debug.delegate(processBA, "isgroupwa2", new Object[] {_sbntitle}));}
boolean _x = false;
RDebugUtils.currentLine=35127296;
 //BA.debugLineNum = 35127296;BA.debugLine="Sub isGroupWA2(sbnTitle As String) As Boolean 'ign";
RDebugUtils.currentLine=35127297;
 //BA.debugLineNum = 35127297;BA.debugLine="Private x As Boolean = Regex.ismatch(\".*(: ).*\",";
_x = anywheresoftware.b4a.keywords.Common.Regex.IsMatch(".*(: ).*",_sbntitle);
RDebugUtils.currentLine=35127298;
 //BA.debugLineNum = 35127298;BA.debugLine="Return x";
if (true) return _x;
RDebugUtils.currentLine=35127299;
 //BA.debugLineNum = 35127299;BA.debugLine="End Sub";
return false;
}
public static boolean  _ispersonwa(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "ispersonwa", false))
	 {return ((Boolean) Debug.delegate(processBA, "ispersonwa", new Object[] {_sbn}));}
boolean _a = false;
RDebugUtils.currentLine=35258368;
 //BA.debugLineNum = 35258368;BA.debugLine="Sub isPersonWA(sbn As StatusBarNotification) As Bo";
RDebugUtils.currentLine=35258369;
 //BA.debugLineNum = 35258369;BA.debugLine="Private a As Boolean = False";
_a = anywheresoftware.b4a.keywords.Common.False;
RDebugUtils.currentLine=35258370;
 //BA.debugLineNum = 35258370;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;};
RDebugUtils.currentLine=35258371;
 //BA.debugLineNum = 35258371;BA.debugLine="Return a";
if (true) return _a;
RDebugUtils.currentLine=35258372;
 //BA.debugLineNum = 35258372;BA.debugLine="End Sub";
return false;
}
public static boolean  _ispersonwa2(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "ispersonwa2", false))
	 {return ((Boolean) Debug.delegate(processBA, "ispersonwa2", new Object[] {_sbn}));}
boolean _a = false;
RDebugUtils.currentLine=35323904;
 //BA.debugLineNum = 35323904;BA.debugLine="Sub isPersonWA2(sbn As StatusBarNotification) As B";
RDebugUtils.currentLine=35323905;
 //BA.debugLineNum = 35323905;BA.debugLine="Private a As Boolean = False";
_a = anywheresoftware.b4a.keywords.Common.False;
RDebugUtils.currentLine=35323906;
 //BA.debugLineNum = 35323906;BA.debugLine="If sbn.As(String).IndexOf(\"channel=individual\") >";
if ((BA.ObjectToString(_sbn)).indexOf("channel=individual")>-1) { 
_a = anywheresoftware.b4a.keywords.Common.True;};
RDebugUtils.currentLine=35323907;
 //BA.debugLineNum = 35323907;BA.debugLine="Return a";
if (true) return _a;
RDebugUtils.currentLine=35323908;
 //BA.debugLineNum = 35323908;BA.debugLine="End Sub";
return false;
}
public static void  _notimon_notificationposted(b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "notimon_notificationposted", false))
	 {Debug.delegate(processBA, "notimon_notificationposted", new Object[] {_sbn}); return;}
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(SHARK2.keymon.com.mx.notificationservice parent,b4a.jsaplication.com.br.ReplyAuto.StatusBarNotificationWrapper _sbn) {
this.parent = parent;
this._sbn = _sbn;
}
SHARK2.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{
RDebugUtils.currentModule="notificationservice";

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

case 0:
//C
this.state = 1;
RDebugUtils.currentLine=34996225;
 //BA.debugLineNum = 34996225;BA.debugLine="Private logger As Boolean = True";
parent._logger = anywheresoftware.b4a.keywords.Common.True;
RDebugUtils.currentLine=34996226;
 //BA.debugLineNum = 34996226;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;
RDebugUtils.currentLine=34996227;
 //BA.debugLineNum = 34996227;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("534996227",_sbn.getPackageName(),anywheresoftware.b4a.keywords.Common.Colors.Red);
if (true) break;

case 9:
//C
this.state = 10;
;
RDebugUtils.currentLine=34996228;
 //BA.debugLineNum = 34996228;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("534996228","isGroupWA2: "+BA.ObjectToString(_isgroupwa(_sbn)),anywheresoftware.b4a.keywords.Common.Colors.Magenta);
if (true) break;

case 15:
//C
this.state = 16;
;
RDebugUtils.currentLine=34996229;
 //BA.debugLineNum = 34996229;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("534996229","isPersonWA: "+BA.ObjectToString(_ispersonwa(_sbn)),anywheresoftware.b4a.keywords.Common.Colors.Magenta);
if (true) break;

case 21:
//C
this.state = 22;
;
RDebugUtils.currentLine=34996230;
 //BA.debugLineNum = 34996230;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("534996230",("getGroupName: |"+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(_getgroupname(_sbn.getTitle())))+"|"),0);
if (true) break;

case 27:
//C
this.state = 28;
;
RDebugUtils.currentLine=34996231;
 //BA.debugLineNum = 34996231;BA.debugLine="Private cmd() As String = Regex.Split(\" \", SBN.M";
_cmd = anywheresoftware.b4a.keywords.Common.Regex.Split(" ",_sbn.getMessage());
RDebugUtils.currentLine=34996232;
 //BA.debugLineNum = 34996232;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;
RDebugUtils.currentLine=34996233;
 //BA.debugLineNum = 34996233;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;
RDebugUtils.currentLine=34996235;
 //BA.debugLineNum = 34996235;BA.debugLine="rp.ClearNotification(SBN)";
parent._rp.ClearNotification(_sbn);
RDebugUtils.currentLine=34996236;
 //BA.debugLineNum = 34996236;BA.debugLine="Starter.reinicializaReqManager(cmd(1))";
parent.mostCurrent._starter._reinicializareqmanager /*String*/ (_cmd[(int) (1)]);
RDebugUtils.currentLine=34996237;
 //BA.debugLineNum = 34996237;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)]))+" "));
RDebugUtils.currentLine=34996238;
 //BA.debugLineNum = 34996238;BA.debugLine="Sleep(1000)";
anywheresoftware.b4a.keywords.Common.Sleep(processBA,new anywheresoftware.b4a.shell.DebugResumableSub.DelegatableResumableSub(this, "notificationservice", "notimon_notificationposted"),(int) (1000));
this.state = 37;
return;
case 37:
//C
this.state = 34;
;
RDebugUtils.currentLine=34996240;
 //BA.debugLineNum = 34996240;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;
;
RDebugUtils.currentLine=34996244;
 //BA.debugLineNum = 34996244;BA.debugLine="End Sub";
if (true) break;

            }
        }
    }
}
public static String  _service_create() throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "service_create", false))
	 {return ((String) Debug.delegate(processBA, "service_create", null));}
RDebugUtils.currentLine=34799616;
 //BA.debugLineNum = 34799616;BA.debugLine="Sub Service_Create";
RDebugUtils.currentLine=34799617;
 //BA.debugLineNum = 34799617;BA.debugLine="rp.Initialize(\"NotiMon\")";
_rp.Initialize(processBA,"NotiMon");
RDebugUtils.currentLine=34799622;
 //BA.debugLineNum = 34799622;BA.debugLine="End Sub";
return "";
}
public static String  _service_destroy() throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "service_destroy", false))
	 {return ((String) Debug.delegate(processBA, "service_destroy", null));}
RDebugUtils.currentLine=34930688;
 //BA.debugLineNum = 34930688;BA.debugLine="Sub Service_Destroy";
RDebugUtils.currentLine=34930690;
 //BA.debugLineNum = 34930690;BA.debugLine="End Sub";
return "";
}
public static String  _service_start(anywheresoftware.b4a.objects.IntentWrapper _startingintent) throws Exception{
RDebugUtils.currentModule="notificationservice";
if (Debug.shouldDelegate(processBA, "service_start", false))
	 {return ((String) Debug.delegate(processBA, "service_start", new Object[] {_startingintent}));}
RDebugUtils.currentLine=34865152;
 //BA.debugLineNum = 34865152;BA.debugLine="Sub Service_Start (StartingIntent As Intent)";
RDebugUtils.currentLine=34865154;
 //BA.debugLineNum = 34865154;BA.debugLine="If rp.HandleIntent(StartingIntent) Then Return";
if (_rp.HandleIntent(_startingintent)) { 
if (true) return "";};
RDebugUtils.currentLine=34865158;
 //BA.debugLineNum = 34865158;BA.debugLine="End Sub";
return "";
}
}