Forráskód Böngészése

[WallPadConfig]
1. App Ver. 갱신
- 2022.05.24.01
2. 모바일 기기 정보 동기화 작업
[WallPadMultiControlService]
1. App Ver. 갱신
- 2022.05.24.01
2. 모바일 기기 정보 동기화 작업

jslee(madeinlab) 2 éve
szülő
commit
770cdfefc5

+ 1 - 1
WallPadConfig/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadconfig"
     android:versionCode="01"
-    android:versionName="2022.05.23.01">
+    android:versionName="2022.05.24.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 11 - 3
WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/MainActivity.java

@@ -985,8 +985,12 @@ public class MainActivity extends WpadActivity
             else if (TargetId == ID.main.button.SYNK)
             {
                 Sound().Play(SND.effect.TOUCH_LATCHED);
-                if (mCurrentScreenId == API_Menu.SubMenuConfig.MobileDeviceReg)
-                    StartPopup(ID.screen.PopupMobileSync);
+                if(myIP.equals("10.1.1.1")) {
+                    if (mCurrentScreenId == API_Menu.SubMenuConfig.MobileDeviceReg)
+                        StartPopup(ID.screen.PopupMobileSync);
+                } else {
+                    StartPopup(ID.screen.PopupMobileNotUseConfirm);
+                }
             }
             else if(TargetId == ID.main.button.BACK_INROOM)
             {
@@ -1984,7 +1988,7 @@ public class MainActivity extends WpadActivity
 
     int mMultiAddress;
 
-    String myIP = "NONE";
+    public String myIP = "NONE";
     String myHo = "NONE";
     int ho = 0;
 
@@ -1995,6 +1999,10 @@ public class MainActivity extends WpadActivity
         return date;
     }
 
+    public boolean setFinishTimerDestroyFromScreen() {
+       return super.setFinishTimerDestroy();
+    }
+
     class ClientThread extends Thread {
         private Handler handler;
         private String  value1;

+ 18 - 0
WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/PopupActivity.java

@@ -32,6 +32,8 @@ import kr.co.icontrols.wallpadconfig.screen.PopupAsCall;
 import kr.co.icontrols.wallpadconfig.screen.PopupMobileDeviceAdd;
 import kr.co.icontrols.wallpadconfig.screen.PopupMobileDeviceDel;
 import kr.co.icontrols.wallpadconfig.screen.PopupMobileDeviceInit;
+import kr.co.icontrols.wallpadconfig.screen.PopupMobileNetworkCheck;
+import kr.co.icontrols.wallpadconfig.screen.PopupMobileNotUseConfirm;
 import kr.co.icontrols.wallpadconfig.screen.PopupMobileSync;
 import kr.co.icontrols.wallpadconfig.screen.PopupNameSet;
 //import kr.co.icontrols.wallpadconfig.screen.PopupNoiseLog;
@@ -122,6 +124,8 @@ public class PopupActivity extends WpadActivity
 
     private PopupRemoteCtrlSmartlight popupRemoteCtrlSmartlight;
     private PopupMobileSync popupMobileSync;
+    private PopupMobileNotUseConfirm popupMobileNotUseConfirm;
+    private PopupMobileNetworkCheck popupMobileNetworkCheck;
 
 
     public WallpadStatusData GetDBObj()
@@ -611,6 +615,20 @@ public class PopupActivity extends WpadActivity
                     FinishTime = Common.FINISH_TIME_POPUP_NORMAL_SEC;
                     break;
 
+                case ID.screen.PopupMobileNotUseConfirm:
+                    popupMobileNotUseConfirm = new PopupMobileNotUseConfirm(mContext, AllLayout);
+                    super.setCurrentScreen(popupMobileNotUseConfirm);
+                    Style = Common.POPUP_STYLE_NOMAL;
+                    FinishTime = Common.FINISH_TIME_POPUP_NORMAL_SEC;
+                    break;
+
+                case ID.screen.PopupMobileNetworkCheck:
+                    popupMobileNetworkCheck = new PopupMobileNetworkCheck(mContext, AllLayout);
+                    super.setCurrentScreen(popupMobileNetworkCheck);
+                    Style = Common.POPUP_STYLE_NOMAL;
+                    FinishTime = Common.FINISH_TIME_POPUP_NORMAL_SEC;
+                    break;
+
                 case ID.screen.PopupRemoteCtrlSmartlight:
                     popupRemoteCtrlSmartlight = new PopupRemoteCtrlSmartlight(mContext, AllLayout, wpapi, OPERATION_MODE);
                     super.setCurrentScreen(popupRemoteCtrlSmartlight);

+ 76 - 0
WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/declare/ID.java

@@ -82,6 +82,8 @@ public final class ID
 
         public final static int PopupRemoteCtrlSmartlight                       = 41000;     // 원격제어 스마트 조명 유의사항 알림 팝업
         public final static int PopupMobileSync                                 = 42000;     // 모바일 기기 동기화 확인 팝업
+        public final static int PopupMobileNotUseConfirm                        = 43000;     // 모바일 등록 기능 1층만 가능 팝업
+        public final static int PopupMobileNetworkCheck                         = 44000;     // 모바일 등록 시, 핑 테스트 실패 팝업
     }
 
     /* ==========================================================================
@@ -1576,6 +1578,80 @@ public final class ID
         }
     }
 
+    /* ==========================================================================
+     * PopupMobileNotUseConfirm
+     * ========================================================================== */
+    public static final class PopupMobileNotUseConfirm
+    {
+        final static int BASE = screen.PopupMobileNotUseConfirm;
+
+        public static final class layout
+        {
+        }
+        public static final class image
+        {
+            public final static int BACKGROUND        = BASE + 100;
+            public final static int TITLE             = BASE + 101;
+            public final static int IMAGE             = BASE + 102;
+
+            public final static int STATUS            = BASE + 106;
+        }
+        public static final class button
+        {
+            public final static int OK                = BASE + 200;
+            public final static int CANCEL            = BASE + 201;
+            public final static int CLOSE             = BASE + 202;
+        }
+        public static final class text
+        {
+            public final static int TITLE             = BASE + 300;
+            public final static int TEXT1             = BASE + 301;
+            public final static int TEXT2             = BASE + 302;
+        }
+        public static final class ResultCode
+        {
+            public final static int OK                = BASE + 400;
+            public final static int CANCEL            = BASE + 401;
+        }
+    }
+
+    /* ==========================================================================
+     * PopupMobileNetworkCheck
+     * ========================================================================== */
+    public static final class PopupMobileNetworkCheck
+    {
+        final static int BASE = screen.PopupMobileNetworkCheck;
+
+        public static final class layout
+        {
+        }
+        public static final class image
+        {
+            public final static int BACKGROUND        = BASE + 100;
+            public final static int TITLE             = BASE + 101;
+            public final static int IMAGE             = BASE + 102;
+
+            public final static int STATUS            = BASE + 106;
+        }
+        public static final class button
+        {
+            public final static int OK                = BASE + 200;
+            public final static int CANCEL            = BASE + 201;
+            public final static int CLOSE             = BASE + 202;
+        }
+        public static final class text
+        {
+            public final static int TITLE             = BASE + 300;
+            public final static int TEXT1             = BASE + 301;
+            public final static int TEXT2             = BASE + 302;
+        }
+        public static final class ResultCode
+        {
+            public final static int OK                = BASE + 400;
+            public final static int CANCEL            = BASE + 401;
+        }
+    }
+
 
     /* ==========================================================================
      * InRoomSensorID

+ 147 - 0
WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/imap/Request_check_sip_activation.java

@@ -0,0 +1,147 @@
+package kr.co.icontrols.wallpadconfig.imap;
+
+import android.content.Context;
+import android.util.Log;
+
+import com.artncore.WallPadDataMgr.WallpadStatusData;
+import com.artncore.WallPadDataMgr.wallpaddbmgr;
+import com.artncore.wallpadimap.RetProci;
+import com.artncore.wallpadimap.WallPadiMAPClient;
+import com.util.LogUtil;
+
+public class Request_check_sip_activation extends WallPadiMAPClient {
+    String TAG = "Reqst_chck_sip_activ";
+    String DeviceIP = "NONE";
+    String DeviceDong = "NONE";
+    String DeviceHo = "NONE";
+
+    Context mContext;
+    RetProci Proc;
+    String XMLHeader;
+    WallpadStatusData DBMGR = null;
+
+    String svrIP = "10.0.1.10";
+    int svrPort = 10000;
+    int RequestWork = 0;
+
+    public Request_check_sip_activation(Context context) {
+        super.setContext(context);
+        try {
+            mContext = context;
+            super.setContext(mContext);
+            DBMGR = new WallpadStatusData(mContext);
+            wallpaddbmgr.AddressSet Address = DBMGR.getAddressMGR(); //DB에서 동호 정보 받아옴
+            DBMGR.closeDB();
+            //동, 호, ip 정보 저장
+            DeviceIP = Address.IPAddress;
+            DeviceDong = Address.Dong;
+            DeviceHo = Address.Ho;
+
+            //타임아웃 설정
+            SetSocketWaitCount(2000);
+
+            //XML Header 생성
+            XMLHeader = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" +
+                    "<imap ver = \"1.0\" address = \"" + DeviceIP + "\" sender = \"" + DeviceDong + "동 " + DeviceHo + "호" + "\">\r\n";
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] Request_check_sip_activation(Context context)");
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    private String makeXMLMsg(String strMessage) {
+        try {
+            String strResult = XMLHeader +
+                    "   <service type=\"request\" name=\"check_sip_activation\">\r\n" +
+                    "      <message>\"" + strMessage + "\"</message>\r\n" +
+                    "   </service>\r\n" +
+                    "</imap>";
+            return strResult;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return null;
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] makeXMLMsg(String strMessage)");
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
+            return null;
+        }
+    }
+
+    public void setServerInfo(String strIPAddress, int nPort) {
+        try {
+            svrIP = strIPAddress;
+            svrPort = nPort;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] setServerInfo(String strIPAddress, int nPort)");
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    public void setResultCtrl(RetProci retProci) {
+        try {
+            Proc = retProci;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] setResultCtrl(RetProci retProci)");
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    protected void ProcComplite() {
+        try {
+            if (Proc != null) {
+                SetItem("service");
+                String result = GetAttributeVal(0, "result");
+                if (result != null) {
+                    if (result.equalsIgnoreCase("ok")) {
+                        String name = GetAttributeVal(0, "name");
+                        String type = GetAttributeVal(0, "type");
+                        if ((name!=null && name.equalsIgnoreCase("check_sip_activation")) && (type!=null && type.equalsIgnoreCase("reply"))) {
+                            Proc.ProcSuccess();
+                            return;
+                        }
+                    }
+                }
+                Proc.ProcError();
+            } else {
+                if(Proc!=null) Proc.ProcError();
+            }
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] ProcComplite()");
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
+        }
+    }
+
+    protected void ProcError() {
+        Proc.ProcError();
+    }
+
+    public boolean send_check_sip_activation(String strTargetIP, String strMessage) {
+        try {
+//            Log.d(TAG, "[send_check_sip_activation] strTargetIP: " + strTargetIP + ", svrPort: " + svrPort);
+            SetServerIPConfig(strTargetIP, svrPort);
+            SendXMLDoc(makeXMLMsg(strMessage), true);
+            return true;
+        } catch (RuntimeException re) {
+            LogUtil.errorLogInfo("", TAG, re);
+            return false;
+        } catch (Exception e) {
+            Log.e(TAG, "[Exception] send_check_sip_activation(String strTargetIP, String strMessage)");
+            //e.printStackTrace();            
+            LogUtil.errorLogInfo("", TAG, e);
+            return false;
+        }
+    }
+}

+ 242 - 59
WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/screen/ConfigMobileDeviceAddScreen.java

@@ -7,6 +7,7 @@ import android.content.Context;
 import android.content.Intent;
 import android.content.IntentFilter;
 import android.graphics.Color;
+import android.os.AsyncTask;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
@@ -32,6 +33,9 @@ import com.util.LogUtil;
 import org.json.JSONException;
 import org.json.JSONObject;
 
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -41,6 +45,7 @@ import kr.co.icontrols.wallpadconfig.data.ResultData;
 import kr.co.icontrols.wallpadconfig.declare.Common;
 import kr.co.icontrols.wallpadconfig.declare.ID;
 import kr.co.icontrols.wallpadconfig.imap.iMAPDeleteNewMobileDevice;
+import kr.co.icontrols.wallpadsupport.WpadActivity;
 import kr.co.icontrols.wallpadsupport.WpadImageView;
 import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
 import kr.co.icontrols.wallpadsupport.WpadScreen;
@@ -225,6 +230,8 @@ public class ConfigMobileDeviceAddScreen extends WpadScreen
                 try
                 {
                     listView[index].NumText.setText(String.format("%d", Num));
+                    //명칭 가장 앞에 '_' 붙는 것 제거
+                    if(Name.startsWith("_")) Name = Name.substring(1);
                     listView[index].ContentsText.setText(Name);
                     listView[index].DateText.setText(RegDate);
                     listView[index].AreaBtn.setButtonEventOffDisable();
@@ -466,6 +473,8 @@ public class ConfigMobileDeviceAddScreen extends WpadScreen
 
         // 8. BR 등록
         if (MainActivity.bRemoteCallUse) registerBRReceiver();
+
+        //doPingTest("10.1.1.2", "10.1.1.3");
     }
 
     /**
@@ -564,69 +573,85 @@ public class ConfigMobileDeviceAddScreen extends WpadScreen
         DebugLogOutput("[[[[ onBrReceive ]]]]  ActionName = " + ActionName);
     }
 
+    private final int PING_TIMEOUT = 1000;
+    private String pingResult = "fail";
+    private class PingTestTask extends AsyncTask<Object, Void, String[]> {
+        @Override
+        protected String[] doInBackground(Object... params) {
+            pingResult = "";
+            String type = (String)params[0];
+            String testIP1 = (String)params[1];
+            String testIP2 = (String)params[2];
 
-    // =================================================================================================
-    // [[ Touch & Key Event ]] region
-    // =================================================================================================
-    /**
-     * 본 클래스에서 등록한 [WpadImageView] [WpadTextView] 의 TouchEvent 가 있을시 호출됨
-     */
-    @Override
-    protected void onTouchEvent(View v, MotionEvent event)
-    {
-        super.onTouchEvent(v, event);
+            String arrResult[] = new String[2];
 
-        int TargetId = v.getId();
-        int MoveEvent = event.getAction();
+            StringBuilder result = new StringBuilder();
 
-        if(MoveEvent == MotionEvent.ACTION_UP)
-        {
-            if(TargetId == ID.configMobileDeviceAddScreen.button.REG)
-            {
-                // [등록]
-                DebugLogOutput("onTouchEvent [REG] BUTTON !!!");
+            try {
+                InetAddress ia = InetAddress.getByName(testIP1);
+                if(ia.isReachable(PING_TIMEOUT) == true) {
+                    result.append("success");
+                } else {
+                    result.append("fail");
+                }
+                InetAddress ia2 = InetAddress.getByName(testIP2);
+                if(ia2.isReachable(PING_TIMEOUT) == true) {
+                    result.append("success");
+                } else {
+                    result.append("fail");
+                }
+            } catch (UnknownHostException e){
+                result.append("fail");
+            } catch (IOException e) {
+                result.append("fail");
+            } catch (IllegalArgumentException e) {
+                result.append("fail");
+            }
 
-                if(mData.DataList.size() >= MAX_MOBILE_USER_CNT)
-                {
+            arrResult[0] = type;
+            arrResult[1] = result.toString();
+
+            return arrResult;
+        }
+
+        @Override
+        protected void onPostExecute(String[] arrResult) {
+            if (arrResult[1].contains("fail")) {
+                Sound().Play(SND.effect.TOUCH_LATCHED);
+                ((MainActivity) (getContext())).StartPopup(ID.screen.PopupMobileNetworkCheck);
+                return;
+            }
+            if (arrResult[0].contains("reg")) {
+                if (mData.DataList.size() >= MAX_MOBILE_USER_CNT) {
                     // 등록개수가 최대 개수(100개) 이상
                     Sound().Play(SND.effect.WARNING005);
                     Toast.makeText(getContext(), "모바일 기기는 " + MAX_MOBILE_USER_CNT + "대를 초과할 수 없습니다.", Toast.LENGTH_SHORT).show();
-                }
-                else
-                {
+                } else {
                     Sound().Play(SND.effect.TOUCH_LATCHED);
-                    boolean bRet = ((MainActivity)(getContext())).StartPopup(ID.screen.PopupMobileDeviceAdd);
-                    if(bRet)
-                    {
+                    boolean bRet = ((MainActivity) (getContext())).StartPopup(ID.screen.PopupMobileDeviceAdd);
+                    if (bRet) {
                         // 자동종료 타이머 삭제
-                        bRet = super.setFinishTimerDestroy();
+                        bRet = ((MainActivity) mContext).setFinishTimerDestroyFromScreen();
                         DebugLogOutput("setFinishTimerDestroy = " + bRet);
 
                         // LCD 항상 켜져 있게 하는 기능
                         /*PowerManager pm = (PowerManager) ((MainActivity)(getContext())).getSystemService(Context.POWER_SERVICE);
                         pm.userActivity(2, true);*/
-                        ((Activity)this.getContext()).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+                        ((Activity) mContext).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
                     }
                 }
             }
-            else if(TargetId == ID.configMobileDeviceAddScreen.button.DEL)
-            {
-                // [삭제]
-                DebugLogOutput("onTouchEvent [DEL] BUTTON !!!");
-                Sound().Play(SND.effect.TOUCH_LATCHED);
-
-                //DB_DeleteAll();
-
+            else if (arrResult[0].contains("del")) {
                 Intent data = new Intent();
                 int Number = (chartView.getCurEnabledIndex() + 1) + (mData.CurPageIdx * ChartView.ROWS_COUNT);
                 data.putExtra("DEL_TYPE", 1);                               // 개별삭제
-                data.putExtra("DEL_NAME", mData.DataList.get(Number-1).Name);     // 개별 NAME
-                data.putExtra("DEL_UID", mData.DataList.get(Number-1).Uid);       // 개별 UID
+                data.putExtra("DEL_NAME", mData.DataList.get(Number - 1).Name);     // 개별 NAME
+                data.putExtra("DEL_UID", mData.DataList.get(Number - 1).Uid);       // 개별 UID
 //                Log.d(TAG, "[onTouchEvent] Number [" + Number + "]");
 
                 // 방문객원격통화 사용자 DB에서 삭제
                 if (MainActivity.bRemoteCallUse) {
-                    if (mData.DataList.get(Number-1).Name.contains("remotecall_")) {
+                    if (mData.DataList.get(Number - 1).Name.contains("remotecall_")) {
                         if (wallPadRemoteCallUserData != null) {
                             nRemoteCallUserCnt = wallPadRemoteCallUserData.GetRemoteCallUserCnt();
                             Log.d(TAG, "[onTouchEvent] nRemoteCallUserCnt [" + nRemoteCallUserCnt + "]");
@@ -648,32 +673,28 @@ public class ConfigMobileDeviceAddScreen extends WpadScreen
                     }
                 }
 
-                ((MainActivity)(getContext())).StartPopup(ID.screen.PopupMobileDeviceDel, data);
+                ((MainActivity) (getContext())).StartPopup(ID.screen.PopupMobileDeviceDel, data);
                 // 자동종료 타이머 삭제
-                boolean bRet = super.setFinishTimerDestroy();
+                boolean bRet = ((MainActivity) mContext).setFinishTimerDestroyFromScreen();
                 DebugLogOutput("setFinishTimerDestroy = " + bRet);
 
                 // LCD 항상 켜져 있게 하는 기능
 //                PowerManager pm = (PowerManager) ((MainActivity)(getContext())).getSystemService(Context.POWER_SERVICE);
 //                pm.userActivity(2, true);
-                ((Activity)this.getContext()).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+                ((Activity) mContext).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
             }
-            else if(TargetId == ID.configMobileDeviceAddScreen.button.ALLDEL)
-            {
-                if(mData == null) return;
-                if(mData.DataList == null) return;
+            else if (arrResult[0].contains("alldel")) {
+                if (mData == null) return;
+                if (mData.DataList == null) return;
 
                 int size = mData.DataList.size();
-                if(size == 0)
-                {
+                if (size == 0) {
                     // [INIT]
                     DebugLogOutput("onTouchEvent [ALLDEL] - INIT BUTTON !!!");
                     Sound().Play(SND.effect.TOUCH_LATCHED);
 
-                    ((MainActivity)(getContext())).StartPopup(ID.screen.PopupMobileDeviceInit);
-                }
-                else if(size > 0)
-                {
+                    ((MainActivity) (getContext())).StartPopup(ID.screen.PopupMobileDeviceInit);
+                } else if (size > 0) {
                     // [전체 삭제]
                     DebugLogOutput("onTouchEvent [ALLDEL] DELETE BUTTON !!!");
                     Sound().Play(SND.effect.TOUCH_LATCHED);
@@ -682,27 +703,189 @@ public class ConfigMobileDeviceAddScreen extends WpadScreen
 
                     // 제휴사 삭제를 구분하기 위한 용도로 추가함 yskim
                     String KindName = "";
-                    for (int i = 0 ; i < mData.DataList.size() ; i++) {
+                    for (int i = 0; i < mData.DataList.size(); i++) {
                         KindName += mData.DataList.get(i).Name;
                         KindName += "_";
                     }
                     data.putExtra("DEL_NAME", KindName);     // 개별 NAME
 
-                    ((MainActivity)(getContext())).StartPopup(ID.screen.PopupMobileDeviceDel, data);
+                    ((MainActivity) (getContext())).StartPopup(ID.screen.PopupMobileDeviceDel, data);
 
                     // 자동종료 타이머 삭제
-                    boolean bRet = super.setFinishTimerDestroy();
+                    boolean bRet = ((MainActivity) mContext).setFinishTimerDestroyFromScreen();
                     DebugLogOutput("setFinishTimerDestroy = " + bRet);
 
                     // 방문객원격통화 사용자 DB 전체 삭제
                     if (MainActivity.bRemoteCallUse) {
-                        if (wallPadRemoteCallUserData != null) wallPadRemoteCallUserData.DeleteAllRemoteCallUserInfo();
+                        if (wallPadRemoteCallUserData != null)
+                            wallPadRemoteCallUserData.DeleteAllRemoteCallUserInfo();
                     }
 
                     // LCD 항상 켜져 있게 하는 기능
-                /*PowerManager pm = (PowerManager) ((MainActivity)(getContext())).getSystemService(Context.POWER_SERVICE);
-                pm.userActivity(2, true);*/
-                    ((Activity)this.getContext()).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+                    ((Activity) mContext).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+                }
+            }
+        }
+    }
+
+    // testIP로 ping test를 수행
+    private void doPingTest2(String type, String IP1, String IP2) {
+        new PingTestTask().execute(type, IP1, IP2);
+    }
+
+
+
+    // =================================================================================================
+    // [[ Touch & Key Event ]] region
+    // =================================================================================================
+    /**
+     * 본 클래스에서 등록한 [WpadImageView] [WpadTextView] 의 TouchEvent 가 있을시 호출됨
+     */
+    @Override
+    protected void onTouchEvent(View v, MotionEvent event)
+    {
+        super.onTouchEvent(v, event);
+
+        int TargetId = v.getId();
+        int MoveEvent = event.getAction();
+
+        if(MoveEvent == MotionEvent.ACTION_UP)
+        {
+            if(TargetId == ID.configMobileDeviceAddScreen.button.REG)
+            {
+                // [등록]
+                DebugLogOutput("onTouchEvent [REG] BUTTON !!!");
+
+                if(((MainActivity)getContext()).myIP.equals("10.1.1.1")) {
+                    doPingTest2("reg", "10.1.2.1", "10.1.3.1");
+                    /*
+                    if (mData.DataList.size() >= MAX_MOBILE_USER_CNT) {
+                        // 등록개수가 최대 개수(100개) 이상
+                        Sound().Play(SND.effect.WARNING005);
+                        Toast.makeText(getContext(), "모바일 기기는 " + MAX_MOBILE_USER_CNT + "대를 초과할 수 없습니다.", Toast.LENGTH_SHORT).show();
+                    } else {
+                        Sound().Play(SND.effect.TOUCH_LATCHED);
+                        boolean bRet = ((MainActivity) (getContext())).StartPopup(ID.screen.PopupMobileDeviceAdd);
+                        if (bRet) {
+                            // 자동종료 타이머 삭제
+                            bRet = super.setFinishTimerDestroy();
+                            DebugLogOutput("setFinishTimerDestroy = " + bRet);
+
+                            // LCD 항상 켜져 있게 하는 기능
+                            ((Activity) this.getContext()).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+                        }
+                    }
+
+                     */
+
+                } else {
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
+                    ((MainActivity)(getContext())).StartPopup(ID.screen.PopupMobileNotUseConfirm);
+                }
+            }
+            else if(TargetId == ID.configMobileDeviceAddScreen.button.DEL)
+            {
+                // [삭제]
+                DebugLogOutput("onTouchEvent [DEL] BUTTON !!!");
+                Sound().Play(SND.effect.TOUCH_LATCHED);
+                if(((MainActivity)getContext()).myIP.equals("10.1.1.1")) {
+
+                    doPingTest2("del", "10.1.2.1", "10.1.3.1");
+                    /*
+
+                    Intent data = new Intent();
+                    int Number = (chartView.getCurEnabledIndex() + 1) + (mData.CurPageIdx * ChartView.ROWS_COUNT);
+                    data.putExtra("DEL_TYPE", 1);                               // 개별삭제
+                    data.putExtra("DEL_NAME", mData.DataList.get(Number - 1).Name);     // 개별 NAME
+                    data.putExtra("DEL_UID", mData.DataList.get(Number - 1).Uid);       // 개별 UID
+//                Log.d(TAG, "[onTouchEvent] Number [" + Number + "]");
+
+                    // 방문객원격통화 사용자 DB에서 삭제
+                    if (MainActivity.bRemoteCallUse) {
+                        if (mData.DataList.get(Number - 1).Name.contains("remotecall_")) {
+                            if (wallPadRemoteCallUserData != null) {
+                                nRemoteCallUserCnt = wallPadRemoteCallUserData.GetRemoteCallUserCnt();
+                                Log.d(TAG, "[onTouchEvent] nRemoteCallUserCnt [" + nRemoteCallUserCnt + "]");
+                                if (nRemoteCallUserCnt > 0) {
+                                    List<RemoteCallUserClass> dataList = wallPadRemoteCallUserData.GetRemoteCallUserData();
+                                    if (dataList != null) {
+                                        for (int i = 0; i < dataList.size(); i++) {
+//                                        Log.d(TAG, "[onTouchEvent] dataList.get(" + i + ").Name = " + dataList.get(i).Name);
+//                                        Log.d(TAG, "[onTouchEvent] mData.DataList.get(" + (Number - 1) + ").Name = " + mData.DataList.get(Number - 1).Name);
+                                            if (mData.DataList.get(Number - 1).Name.equals("remotecall_".concat(dataList.get(i).Name))) {
+                                                String targetPhoneKey = dataList.get(i).PhoneKey; // 삭제할 방문객원격통화 사용자의 phonekey
+                                                Log.d(TAG, "[onTouchEvent] targetPhoneKey [" + targetPhoneKey + "]");
+                                                data.putExtra("DEL_PHONEKEY", targetPhoneKey);
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    ((MainActivity) (getContext())).StartPopup(ID.screen.PopupMobileDeviceDel, data);
+                    // 자동종료 타이머 삭제
+                    boolean bRet = super.setFinishTimerDestroy();
+                    DebugLogOutput("setFinishTimerDestroy = " + bRet);
+
+                    // LCD 항상 켜져 있게 하는 기능
+                    ((Activity) this.getContext()).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+
+                     */
+                } else {
+                    ((MainActivity)(getContext())).StartPopup(ID.screen.PopupMobileNotUseConfirm);
+                }
+            }
+            else if(TargetId == ID.configMobileDeviceAddScreen.button.ALLDEL)
+            {
+                if(((MainActivity)getContext()).myIP.equals("10.1.1.1")) {
+                    doPingTest2("alldel", "10.1.2.1", "10.1.3.1");
+                    /*
+                    if (mData == null) return;
+                    if (mData.DataList == null) return;
+
+                    int size = mData.DataList.size();
+                    if (size == 0) {
+                        // [INIT]
+                        DebugLogOutput("onTouchEvent [ALLDEL] - INIT BUTTON !!!");
+                        Sound().Play(SND.effect.TOUCH_LATCHED);
+
+                        ((MainActivity) (getContext())).StartPopup(ID.screen.PopupMobileDeviceInit);
+                    } else if (size > 0) {
+                        // [전체 삭제]
+                        DebugLogOutput("onTouchEvent [ALLDEL] DELETE BUTTON !!!");
+                        Sound().Play(SND.effect.TOUCH_LATCHED);
+                        Intent data = new Intent();
+                        data.putExtra("DEL_TYPE", 2); //전체삭제
+
+                        // 제휴사 삭제를 구분하기 위한 용도로 추가함 yskim
+                        String KindName = "";
+                        for (int i = 0; i < mData.DataList.size(); i++) {
+                            KindName += mData.DataList.get(i).Name;
+                            KindName += "_";
+                        }
+                        data.putExtra("DEL_NAME", KindName);     // 개별 NAME
+
+                        ((MainActivity) (getContext())).StartPopup(ID.screen.PopupMobileDeviceDel, data);
+
+                        // 자동종료 타이머 삭제
+                        boolean bRet = super.setFinishTimerDestroy();
+                        DebugLogOutput("setFinishTimerDestroy = " + bRet);
+
+                        // 방문객원격통화 사용자 DB 전체 삭제
+                        if (MainActivity.bRemoteCallUse) {
+                            if (wallPadRemoteCallUserData != null)
+                                wallPadRemoteCallUserData.DeleteAllRemoteCallUserInfo();
+                        }
+
+                        // LCD 항상 켜져 있게 하는 기능
+                        ((Activity) this.getContext()).getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+
+                     */
+                } else {
+                    Sound().Play(SND.effect.TOUCH_LATCHED);
+                    ((MainActivity)(getContext())).StartPopup(ID.screen.PopupMobileNotUseConfirm);
                 }
             }
             else if((TargetId == ID.configMobileDeviceAddScreen.button.NEXT) || (TargetId == ID.configMobileDeviceAddScreen.button.BEFORE))

+ 85 - 0
WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/screen/PopupMobileNetworkCheck.java

@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2014 Android WallPad Project
+ *
+ * FileName  : PopupMobileSync.java
+ * Project   : 성북동 프로젝트
+ */
+
+package kr.co.icontrols.wallpadconfig.screen;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.graphics.Color;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import kr.co.icontrols.wallpadconfig.PopupActivity;
+import kr.co.icontrols.wallpadconfig.R;
+import kr.co.icontrols.wallpadconfig.declare.Common;
+import kr.co.icontrols.wallpadconfig.declare.ID;
+import kr.co.icontrols.wallpadsupport.WpadImageView;
+import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
+import kr.co.icontrols.wallpadsupport.WpadScreen;
+import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import kr.co.icontrols.wallpadsupport.WpadTextView;
+
+@SuppressLint("ViewConstructor")
+public class PopupMobileNetworkCheck extends WpadScreen {
+    String TAG = "PopupMobileNetworkCheck";
+
+    // [Image]
+    WpadImageView Background;
+
+    // [Button]
+    WpadImageView OkBtn, CancelBtn, CloseBtn;
+
+    // [Text]
+    WpadTextView TitleText, Text1;
+
+    // [Variables]
+
+    public PopupMobileNetworkCheck(Context context, RelativeLayout layout) {
+        super(context, layout);
+        Log.d(TAG, "[START - Screen] --------------------------------------------");
+
+        Background = new WpadImageView(context, TOUCH_KIND.NONE, 990, 680, R.drawable.popup_bg_a, 0, ID.PopupMobileNetworkCheck.image.BACKGROUND);
+        ViewRegistration(layout, Background, Common.PopupNomalMarginLEFT(145), Common.PopupNomalMarginTOP(60));
+
+        TitleText = new WpadTextView(context, false, 981, 90, Gravity.CENTER, Color.WHITE, Common.fontsize._46, true, ID.PopupMobileNetworkCheck.text.TITLE);
+        ViewRegistration(layout, TitleText, Common.PopupNomalMarginLEFT(145), Common.PopupNomalMarginTOP(60));
+        TitleText.setText("모바일기기 등록");
+
+        OkBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 360, 80, R.drawable.popup_but_ok, R.drawable.popup_but_ok_p, ID.PopupMobileNetworkCheck.button.OK);
+        ViewRegistration(layout, OkBtn, Common.PopupNomalMarginLEFT(445), Common.PopupNomalMarginTOP(637));
+        CloseBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 80, R.drawable.topbar_icon_close_normal, R.drawable.topbar_icon_close_pressed, ID.PopupMobileNetworkCheck.button.CLOSE);
+        ViewRegistration(layout, CloseBtn, Common.PopupNomalMarginLEFT(1048), Common.PopupNomalMarginTOP(67));
+
+        Text1 = new WpadTextView(context, false, 990, 260, Gravity.CENTER, Color.WHITE, Common.fontsize._46, true, ID.PopupMobileNetworkCheck.text.TEXT1);
+        ViewRegistration(layout, Text1, Common.PopupAlarmMarginLEFT(147), Common.PopupNomalMarginTOP(250));
+        Text1.setText("2층, 3층의 네트워크를 확인해주세요. ");
+    }
+
+    @Override
+    protected void onClose() {
+        super.onClose();
+        Log.d(TAG, "[END   - Screen] ********************************************");
+    }
+
+    @Override
+    protected void onTouchEvent(View v, MotionEvent event) {
+        super.onTouchEvent(v, event);
+
+        int TargetId = v.getId();
+        int MoveEvent = event.getAction();
+
+        if (MoveEvent == MotionEvent.ACTION_UP) {
+            if (TargetId == ID.PopupMobileNetworkCheck.button.OK || TargetId == ID.PopupMobileNetworkCheck.button.CLOSE) {
+                Sound().Play(SND.effect.TOUCH_LATCHED);
+                ((PopupActivity) (super.getContext())).finish();
+            }
+        }
+    }
+}

+ 89 - 0
WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/screen/PopupMobileNotUseConfirm.java

@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2014 Android WallPad Project
+ *
+ * FileName  : PopupMobileSync.java
+ * Project   : 성북동 프로젝트
+ */
+
+package kr.co.icontrols.wallpadconfig.screen;
+
+import android.annotation.SuppressLint;
+import android.content.Context;
+import android.content.Intent;
+import android.graphics.Color;
+import android.util.Log;
+import android.view.Gravity;
+import android.view.MotionEvent;
+import android.view.View;
+import android.widget.RelativeLayout;
+
+import com.artncore.WallPadDataMgr.WallpadStatusData;
+import com.artncore.WallPadDataMgr.wallpaddbmgr;
+
+import kr.co.icontrols.wallpadconfig.PopupActivity;
+import kr.co.icontrols.wallpadconfig.R;
+import kr.co.icontrols.wallpadconfig.declare.Common;
+import kr.co.icontrols.wallpadconfig.declare.ID;
+import kr.co.icontrols.wallpadsupport.WpadImageView;
+import kr.co.icontrols.wallpadsupport.WpadImageView.TOUCH_KIND;
+import kr.co.icontrols.wallpadsupport.WpadScreen;
+import kr.co.icontrols.wallpadsupport.WpadSound.SND;
+import kr.co.icontrols.wallpadsupport.WpadTextView;
+
+@SuppressLint("ViewConstructor")
+public class PopupMobileNotUseConfirm extends WpadScreen {
+    String TAG = "PopupMobileNotUseConfirm";
+
+    // [Image]
+    WpadImageView Background;
+
+    // [Button]
+    WpadImageView OkBtn, CancelBtn, CloseBtn;
+
+    // [Text]
+    WpadTextView TitleText, Text1;
+
+    // [Variables]
+
+    public PopupMobileNotUseConfirm(Context context, RelativeLayout layout) {
+        super(context, layout);
+        Log.d(TAG, "[START - Screen] --------------------------------------------");
+
+        Background = new WpadImageView(context, TOUCH_KIND.NONE, 990, 680, R.drawable.popup_bg_a, 0, ID.PopupMobileNotUseConfirm.image.BACKGROUND);
+        ViewRegistration(layout, Background, Common.PopupNomalMarginLEFT(145), Common.PopupNomalMarginTOP(60));
+
+        TitleText = new WpadTextView(context, false, 981, 90, Gravity.CENTER, Color.WHITE, Common.fontsize._46, true, ID.PopupMobileNotUseConfirm.text.TITLE);
+        ViewRegistration(layout, TitleText, Common.PopupNomalMarginLEFT(145), Common.PopupNomalMarginTOP(60));
+        TitleText.setText("모바일기기 등록");
+
+        OkBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 360, 80, R.drawable.popup_but_ok, R.drawable.popup_but_ok_p, ID.PopupMobileNotUseConfirm.button.OK);
+        ViewRegistration(layout, OkBtn, Common.PopupNomalMarginLEFT(445), Common.PopupNomalMarginTOP(637));
+        CloseBtn = new WpadImageView(context, TOUCH_KIND.BUTTON, 80, 80, R.drawable.topbar_icon_close_normal, R.drawable.topbar_icon_close_pressed, ID.PopupMobileNotUseConfirm.button.CLOSE);
+        ViewRegistration(layout, CloseBtn, Common.PopupNomalMarginLEFT(1048), Common.PopupNomalMarginTOP(67));
+
+        Text1 = new WpadTextView(context, false, 990, 260, Gravity.CENTER, Color.WHITE, Common.fontsize._46, true, ID.PopupMobileNotUseConfirm.text.TEXT1);
+        ViewRegistration(layout, Text1, Common.PopupAlarmMarginLEFT(147), Common.PopupNomalMarginTOP(250));
+        Text1.setText("모바일 기기 정보 관리는\n1층 월패드에서만 가능합니다.");
+    }
+
+    @Override
+    protected void onClose() {
+        super.onClose();
+        Log.d(TAG, "[END   - Screen] ********************************************");
+    }
+
+    @Override
+    protected void onTouchEvent(View v, MotionEvent event) {
+        super.onTouchEvent(v, event);
+
+        int TargetId = v.getId();
+        int MoveEvent = event.getAction();
+
+        if (MoveEvent == MotionEvent.ACTION_UP) {
+            if (TargetId == ID.PopupMobileNotUseConfirm.button.OK || TargetId == ID.PopupMobileNotUseConfirm.button.CLOSE) {
+                Sound().Play(SND.effect.TOUCH_LATCHED);
+                ((PopupActivity) (super.getContext())).finish();
+            }
+        }
+    }
+}

+ 1 - 1
WallPadConfig/src/main/java/kr/co/icontrols/wallpadconfig/screen/PopupMobileSync.java

@@ -29,7 +29,7 @@ import kr.co.icontrols.wallpadsupport.WpadTextView;
 
 @SuppressLint("ViewConstructor")
 public class PopupMobileSync extends WpadScreen {
-    String TAG = "PopupAsCall";
+    String TAG = "PopupMobileSync";
 
     // [Image]
     WpadImageView Background, popupIcon, test;

+ 1 - 1
WallPadMultiControlService/src/main/AndroidManifest.xml

@@ -2,7 +2,7 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="kr.co.icontrols.wallpadmulticontrolservice"
     android:versionCode="17"
-    android:versionName="2022.05.23.01">
+    android:versionName="2022.05.24.01">
 
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

+ 1 - 1
WallPadMultiControlService/src/main/java/kr/co/icontrols/wallpadmulticontrolservice/DataSenderService.java

@@ -1977,7 +1977,7 @@ public class DataSenderService extends Service {
                 MobileSyncData reqData = gson.fromJson(requestData.toString(), MobileSyncData.class);
                 for(int i = 0; i<reqData.getArrayData().size() ; i++){
                     String[] mobileData = reqData.getArrayData().get(i).split("\\|");
-                    wallpadMobileDeviceData.Register(mobileData[1], mobileData[0]+"@");
+                    wallpadMobileDeviceData.Register(mobileData[1], mobileData[0]);
                 }
             }
             wallpadMobileDeviceData.closeDB();