B2BÍøÂçÈí¼þ

 ÕÒ»ØÃÜÂë
 Á¢¼´×¢²á ÉóºËÍøÕ¾ºÅ:QQ:896757558
ËÑË÷
²é¿´: 12|»Ø¸´: 0
´òÓ¡ ÉÏÒ»Ö÷Ìâ ÏÂÒ»Ö÷Ìâ

Ô­ÉúUIAIWROKÈí¼þʼþ¼àÌýʾÀý

[¸´ÖÆÁ´½Ó]

1110

Ö÷Ìâ

1115

Ìû×Ó

7717

»ý·Ö

abc

Rank: 9Rank: 9Rank: 9

»ý·Ö
7717
Ìø×ªµ½Ö¸¶¨Â¥²ã
Â¥Ö÷


Ô­ÉúUIAIWROKÈí¼þʼþ¼àÌýʾÀý

Ô­ÉúUIAIWROKÈí¼þʼþ¼àÌýʾÀý B2BÍøÂçÈí¼þ

  1. /**
  2. * AIWROK ʼþ¼àÌýʾÀý
  3. * ÑÝʾ¸÷ÖÖϵͳʼþ¼àÌý¹¦ÄÜ£º¹ã²¥¡¢Í¨Öª¡¢°´Å¥Ê¼þ¡¢ToastµÈ
  4. */

  5. var ac = new activity();
  6. ac.loadSXML(`
  7. <ScrollView
  8.     android:layout_width="match_parent"
  9.     android:layout_height="match_parent">

  10.     <LinearLayout
  11.         android:layout_width="match_parent"
  12.         android:layout_height="wrap_content"
  13.         android:orientation="vertical"
  14.         android:padding="16dp"
  15.         android:background="#f5f5f5">

  16.     <TextView
  17.         android:layout_width="match_parent"
  18.         android:layout_height="wrap_content"
  19.         android:text="AIWROK ʼþ¼àÌýʾÀý"
  20.         android:textSize="24sp"
  21.         android:textStyle="bold"
  22.         android:textColor="#333333"
  23.         android:gravity="center"
  24.         android:layout_marginBottom="10dp"/>

  25.     <!-- QQȺÐÅÏ¢ -->
  26.     <LinearLayout
  27.         android:layout_width="match_parent"
  28.         android:layout_height="wrap_content"
  29.         android:orientation="vertical"
  30.         android:background="#FFF3E0"
  31.         android:padding="10dp"
  32.         android:layout_marginBottom="15dp">

  33.         <TextView
  34.             android:layout_width="match_parent"
  35.             android:layout_height="wrap_content"
  36.             android:text="&#127822;&#127822;£º711841924"
  37.             android:textSize="14sp"
  38.             android:textColor="#E65100"
  39.             android:gravity="center"
  40.             android:layout_marginBottom="5dp"/>

  41.         <TextView
  42.             android:layout_width="match_parent"
  43.             android:layout_height="wrap_content"
  44.             android:text="&#127822;&#127822;2£º528816639"
  45.             android:textSize="14sp"
  46.             android:textColor="#E65100"
  47.             android:gravity="center"/>
  48.     </LinearLayout>

  49.     <!-- ¼àÌý״̬ÏÔʾ -->
  50.     <TextView
  51.         android:id="@+id/tvListenerStatus"
  52.         android:layout_width="match_parent"
  53.         android:layout_height="wrap_content"
  54.         android:text="¼àÌý״̬: δÆô¶¯"
  55.         android:textSize="16sp"
  56.         android:textColor="#666666"
  57.         android:gravity="center"
  58.         android:padding="10dp"
  59.         android:background="#ffffff"
  60.         android:layout_marginBottom="15dp"/>

  61.     <!-- ¹ã²¥Ê¼þ¼àÌý -->
  62.     <TextView
  63.         android:layout_width="match_parent"
  64.         android:layout_height="wrap_content"
  65.         android:text="&#128225; ¹ã²¥Ê¼þ¼àÌý"
  66.         android:textSize="16sp"
  67.         android:textStyle="bold"
  68.         android:textColor="#333333"
  69.         android:layout_marginBottom="10dp"/>

  70.     <Button
  71.         android:id="@+id/btnBroadcast"
  72.         android:layout_width="match_parent"
  73.         android:layout_height="wrap_content"
  74.         android:text="·¢ËͲâÊԹ㲥"
  75.         android:background="#2196F3"
  76.         android:textColor="#ffffff"
  77.         android:layout_marginBottom="10dp"/>

  78.     <TextView
  79.         android:id="@+id/tvBroadcastLog"
  80.         android:layout_width="match_parent"
  81.         android:layout_height="wrap_content"
  82.         android:text="¹ã²¥ÈÕÖ¾½«ÏÔʾÔÚÕâÀï..."
  83.         android:textSize="14sp"
  84.         android:textColor="#666666"
  85.         android:padding="10dp"
  86.         android:background="#ffffff"
  87.         android:layout_marginBottom="20dp"/>

  88.     <!-- ֪ͨʼþ¼àÌý -->
  89.     <TextView
  90.         android:layout_width="match_parent"
  91.         android:layout_height="wrap_content"
  92.         android:text="&#128276; ֪ͨʼþ¼àÌý"
  93.         android:textSize="16sp"
  94.         android:textStyle="bold"
  95.         android:textColor="#333333"
  96.         android:layout_marginBottom="10dp"/>

  97.     <TextView
  98.         android:layout_width="match_parent"
  99.         android:layout_height="wrap_content"
  100.         android:text="¿ªÆôºó½«¼àÌýϵͳ֪ͨ£¬°´Å¥´¥·¢Ä£Äâ֪ͨ"
  101.         android:textSize="14sp"
  102.         android:textColor="#999999"
  103.         android:layout_marginBottom="10dp"/>

  104.     <LinearLayout
  105.         android:layout_width="match_parent"
  106.         android:layout_height="wrap_content"
  107.         android:orientation="horizontal"
  108.         android:layout_marginBottom="10dp">

  109.         <Button
  110.             android:id="@+id/btnStartNotificationListener"
  111.             android:layout_width="0dp"
  112.             android:layout_height="wrap_content"
  113.             android:layout_weight="1"
  114.             android:text="¿ªÆô¼àÌý"
  115.             android:background="#4CAF50"
  116.             android:textColor="#ffffff"
  117.             android:layout_marginRight="5dp"/>

  118.         <Button
  119.             android:id="@+id/btnStopNotificationListener"
  120.             android:layout_width="0dp"
  121.             android:layout_height="wrap_content"
  122.             android:layout_weight="1"
  123.             android:text="¹Ø±Õ¼àÌý"
  124.             android:background="#F44336"
  125.             android:textColor="#ffffff"
  126.             android:layout_marginLeft="5dp"/>
  127.     </LinearLayout>

  128.     <Button
  129.         android:id="@+id/btnSimulateNotification"
  130.         android:layout_width="match_parent"
  131.         android:layout_height="wrap_content"
  132.         android:text="Ä£Äâ֪ͨʼþ"
  133.         android:background="#9C27B0"
  134.         android:textColor="#ffffff"
  135.         android:layout_marginBottom="10dp"/>

  136.     <TextView
  137.         android:id="@+id/tvNotificationLog"
  138.         android:layout_width="match_parent"
  139.         android:layout_height="wrap_content"
  140.         android:text="֪ͨÈÕÖ¾½«ÏÔʾÔÚÕâÀï..."
  141.         android:textSize="14sp"
  142.         android:textColor="#666666"
  143.         android:padding="10dp"
  144.         android:background="#ffffff"
  145.         android:layout_marginBottom="20dp"/>

  146.     <!-- °´Å¥Ê¼þ¼àÌý -->
  147.     <TextView
  148.         android:layout_width="match_parent"
  149.         android:layout_height="wrap_content"
  150.         android:text="⏸️ ÔÝÍ£/Í£Ö¹°´Å¥Ê¼þ"
  151.         android:textSize="16sp"
  152.         android:textStyle="bold"
  153.         android:textColor="#333333"
  154.         android:layout_marginBottom="10dp"/>

  155.     <TextView
  156.         android:layout_width="match_parent"
  157.         android:layout_height="wrap_content"
  158.         android:text="¼àÌý½Å±¾ÔËÐÐʱµÄÔÝÍ£ºÍÍ£Ö¹°´Å¥"
  159.         android:textSize="14sp"
  160.         android:textColor="#999999"
  161.         android:layout_marginBottom="10dp"/>

  162.     <Button
  163.         android:id="@+id/btnTestPause"
  164.         android:layout_width="match_parent"
  165.         android:layout_height="wrap_content"
  166.         android:text="Ä£ÄâÔÝÍ£°´Å¥"
  167.         android:background="#FF9800"
  168.         android:textColor="#ffffff"
  169.         android:layout_marginBottom="10dp"/>

  170.     <Button
  171.         android:id="@+id/btnTestStop"
  172.         android:layout_width="match_parent"
  173.         android:layout_height="wrap_content"
  174.         android:text="Ä£ÄâÍ£Ö¹°´Å¥"
  175.         android:background="#F44336"
  176.         android:textColor="#ffffff"
  177.         android:layout_marginBottom="10dp"/>

  178.     <TextView
  179.         android:id="@+id/tvBtnEventLog"
  180.         android:layout_width="match_parent"
  181.         android:layout_height="wrap_content"
  182.         android:text="°´Å¥Ê¼þÈÕÖ¾½«ÏÔʾÔÚÕâÀï..."
  183.         android:textSize="14sp"
  184.         android:textColor="#666666"
  185.         android:padding="10dp"
  186.         android:background="#ffffff"
  187.         android:layout_marginBottom="20dp"/>

  188.     <!-- Toastʼþ¼àÌý -->
  189.     <TextView
  190.         android:layout_width="match_parent"
  191.         android:layout_height="wrap_content"
  192.         android:text="&#127838; Toastʼþ¼àÌý"
  193.         android:textSize="16sp"
  194.         android:textStyle="bold"
  195.         android:textColor="#333333"
  196.         android:layout_marginBottom="10dp"/>

  197.     <TextView
  198.         android:layout_width="match_parent"
  199.         android:layout_height="wrap_content"
  200.         android:text="¼àÌý½Å±¾ÖÐÏÔʾµÄToastÏûÏ¢"
  201.         android:textSize="14sp"
  202.         android:textColor="#999999"
  203.         android:layout_marginBottom="10dp"/>

  204.     <Button
  205.         android:id="@+id/btnShowToast"
  206.         android:layout_width="match_parent"
  207.         android:layout_height="wrap_content"
  208.         android:text="ÏÔʾToastÏûÏ¢"
  209.         android:background="#795548"
  210.         android:textColor="#ffffff"
  211.         android:layout_marginBottom="10dp"/>

  212.     <TextView
  213.         android:id="@+id/tvToastLog"
  214.         android:layout_width="match_parent"
  215.         android:layout_height="wrap_content"
  216.         android:text="ToastÈÕÖ¾½«ÏÔʾÔÚÕâÀï..."
  217.         android:textSize="14sp"
  218.         android:textColor="#666666"
  219.         android:padding="10dp"
  220.         android:background="#ffffff"
  221.         android:layout_marginBottom="20dp"/>

  222.     <!-- ÈÈÐÞ¸´Íê³Éʼþ -->
  223.     <TextView
  224.         android:layout_width="match_parent"
  225.         android:layout_height="wrap_content"
  226.         android:text="&#128295; ÈÈÐÞ¸´Íê³Éʼþ"
  227.         android:textSize="16sp"
  228.         android:textStyle="bold"
  229.         android:textColor="#333333"
  230.         android:layout_marginBottom="10dp"/>

  231.     <Button
  232.         android:id="@+id/btnSimulateHotfix"
  233.         android:layout_width="match_parent"
  234.         android:layout_height="wrap_content"
  235.         android:text="Ä£ÄâÈÈÐÞ¸´Íê³É"
  236.         android:background="#009688"
  237.         android:textColor="#ffffff"
  238.         android:layout_marginBottom="10dp"/>

  239.     <TextView
  240.         android:id="@+id/tvHotfixLog"
  241.         android:layout_width="match_parent"
  242.         android:layout_height="wrap_content"
  243.         android:text="ÈÈÐÞ¸´ÈÕÖ¾½«ÏÔʾÔÚÕâÀï..."
  244.         android:textSize="14sp"
  245.         android:textColor="#666666"
  246.         android:padding="10dp"
  247.         android:background="#ffffff"
  248.         android:layout_marginBottom="20dp"/>

  249.     <!-- ½Å±¾Í£Ö¹Ê¼þ -->
  250.     <TextView
  251.         android:layout_width="match_parent"
  252.         android:layout_height="wrap_content"
  253.         android:text="⏹️ ½Å±¾Í£Ö¹Ê¼þ"
  254.         android:textSize="16sp"
  255.         android:textStyle="bold"
  256.         android:textColor="#333333"
  257.         android:layout_marginBottom="10dp"/>

  258.     <Button
  259.         android:id="@+id/btnSimulateStop"
  260.         android:layout_width="match_parent"
  261.         android:layout_height="wrap_content"
  262.         android:text="Ä£Äâ½Å±¾Í£Ö¹"
  263.         android:background="#607D8B"
  264.         android:textColor="#ffffff"
  265.         android:layout_marginBottom="10dp"/>

  266.     <TextView
  267.         android:id="@+id/tvStopLog"
  268.         android:layout_width="match_parent"
  269.         android:layout_height="wrap_content"
  270.         android:text="ֹͣʼþÈÕÖ¾½«ÏÔʾÔÚÕâÀï..."
  271.         android:textSize="14sp"
  272.         android:textColor="#666666"
  273.         android:padding="10dp"
  274.         android:background="#ffffff"
  275.         android:layout_marginBottom="20dp"/>

  276.     <!-- ÈÕÖ¾ÏÔÊ¾ÇøÓò -->
  277.     <TextView
  278.         android:layout_width="match_parent"
  279.         android:layout_height="wrap_content"
  280.         android:text="&#128203; ×ÛºÏÈÕÖ¾"
  281.         android:textSize="16sp"
  282.         android:textStyle="bold"
  283.         android:textColor="#333333"
  284.         android:layout_marginBottom="10dp"/>

  285.     <TextView
  286.         android:id="@+id/tvLog"
  287.         android:layout_width="match_parent"
  288.         android:layout_height="200dp"
  289.         android:text="×ÛºÏÈÕÖ¾½«ÏÔʾÔÚÕâÀï...\n\nÌáʾ£º\n1. µã»÷ÉÏ·½¸÷ÇøÓò°´Å¥¿ÉÄ£Äâ¶ÔӦʼþ\n2. ʵ¼ÊʹÓÃʱÕâЩʼþÓÉϵͳ×Ô¶¯´¥·¢\n3. ±¾Ê¾Àý°ïÖúÄãÀí½âʼþ¼àÌýµÄʹÓ÷½·¨"
  290.         android:textSize="14sp"
  291.         android:textColor="#666666"
  292.         android:padding="10dp"
  293.         android:background="#ffffff"
  294.         android:scrollbars="vertical"
  295.         android:gravity="top"/>

  296.     </LinearLayout>

  297. </ScrollView>
  298. `);

  299. // ÈÕÖ¾Ðü¸¡´°
  300. var ÈÕÖ¾Ðü¸¡´° = new floatUI();
  301. ÈÕÖ¾Ðü¸¡´°.loadXML(
  302.     '<LinearLayout orientation="vertical" w="8" h="8" gravity="center">' +
  303.     '  <TextView id="rz" textColor="#ff3ee4" background="#000000" layout_width="wrap_content" layout_height="wrap_content" />' +
  304.     '</LinearLayout>'
  305. );
  306. var g_ÈÕÖ¾ = ÈÕÖ¾Ðü¸¡´°.findViewById('rz');
  307. if (g_ÈÕÖ¾) {
  308.     setTimeout(function() {
  309.         ÈÕÖ¾Ðü¸¡´°.setPosition(0, (screen.getScreenHeight() * 0.4));
  310.         g_ÈÕÖ¾.setText("¼àÌýʾÀýÒÑÆô¶¯");
  311.     }, 100);
  312. }

  313. // »ñÈ¡¿Ø¼þ
  314. var tvListenerStatus = ac.findViewById("tvListenerStatus");
  315. var btnBroadcast = ac.findViewById("btnBroadcast");
  316. var tvBroadcastLog = ac.findViewById("tvBroadcastLog");
  317. var btnStartNotificationListener = ac.findViewById("btnStartNotificationListener");
  318. var btnStopNotificationListener = ac.findViewById("btnStopNotificationListener");
  319. var btnSimulateNotification = ac.findViewById("btnSimulateNotification");
  320. var tvNotificationLog = ac.findViewById("tvNotificationLog");
  321. var btnTestPause = ac.findViewById("btnTestPause");
  322. var btnTestStop = ac.findViewById("btnTestStop");
  323. var tvBtnEventLog = ac.findViewById("tvBtnEventLog");
  324. var btnShowToast = ac.findViewById("btnShowToast");
  325. var tvToastLog = ac.findViewById("tvToastLog");
  326. var btnSimulateHotfix = ac.findViewById("btnSimulateHotfix");
  327. var tvHotfixLog = ac.findViewById("tvHotfixLog");
  328. var btnSimulateStop = ac.findViewById("btnSimulateStop");
  329. var tvStopLog = ac.findViewById("tvStopLog");
  330. var tvLog = ac.findViewById("tvLog");

  331. // ±ê¼Ç½Å±¾ÊÇ·ñÕýÔÚÔËÐÐ
  332. var isScriptRunning = true;

  333. // ÈÕÖ¾¼Ç¼º¯Êý
  334. function logToAll(source, message) {
  335.     // Êä³öµ½¿ØÖÆÌ¨£¨×ÜÊÇÖ´ÐУ©
  336.     console.log("[" + source + "] " + message);

  337.     // Èç¹û½Å±¾ÒÑÍ£Ö¹»òUIÒÑÏú»Ù£¬²»ÔÙ¸üнçÃæ
  338.     if (!isScriptRunning || !tvLog) {
  339.         return;
  340.     }

  341.     var timestamp = new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date());
  342.     var logEntry = "[" + timestamp + "] " + message;

  343.     // ¸üÐÂ×ÛºÏÈÕÖ¾
  344.     try {
  345.         var currentLog = tvLog.getText();
  346.         if (!currentLog) {
  347.             currentLog = "";
  348.         }
  349.         currentLog = String(currentLog);
  350.         var lines = currentLog.split("\n");
  351.         // ¹ýÂË¿ÕÐÐ
  352.         while (lines.length > 0 && lines[0] === "") {
  353.             lines.shift();
  354.         }
  355.         if (lines.length > 50) {
  356.             lines = lines.slice(-50);
  357.         }
  358.         lines.push(logEntry);
  359.         tvLog.setText(lines.join("\n"));
  360.     } catch (e) {
  361.         // UI¿ÉÄÜÒÑÏú»Ù£¬ºöÂÔ´íÎó
  362.         console.log("¸üÐÂÈÕ־ʧ°Ü: " + e);
  363.     }

  364.     // ¸üÐÂÐü¸¡´°
  365.     if (g_ÈÕÖ¾) {
  366.         try {
  367.             g_ÈÕÖ¾.setText(source + ": " + message);
  368.         } catch (e) {
  369.             // ºöÂÔ
  370.         }
  371.     }
  372. }

  373. // °²È«ÉèÖÃÎı¾µÄ¸¨Öúº¯Êý
  374. function safeSetText(view, text) {
  375.     if (!isScriptRunning || !view) {
  376.         return;
  377.     }
  378.     try {
  379.         view.setText(text);
  380.     } catch (e) {
  381.         // UI¿ÉÄÜÒÑÏú»Ù£¬ºöÂÔ´íÎó
  382.     }
  383. }

  384. // ¸üмàÌý״̬
  385. function updateStatus(status) {
  386.     console.log("¼àÌý״̬: " + status);
  387.     safeSetText(tvListenerStatus, "¼àÌý״̬: " + status);
  388. }

  389. // ==================== ÉèÖÃʼþ¼àÌýÆ÷ ====================

  390. // 1. ¹ã²¥Ê¼þ¼àÌý
  391. try {
  392.     event.onBroadcastEvent(function(msg) {
  393.         logToAll("¹ã²¥", "ÊÕµ½¹ã²¥: " + msg);
  394.         safeSetText(tvBroadcastLog, "ÊÕµ½¹ã²¥: " + msg);
  395.     });
  396.     logToAll("ϵͳ", "✅ ¹ã²¥Ê¼þ¼àÌýÆ÷ÒÑÉèÖÃ");
  397. } catch (e) {
  398.     logToAll("´íÎó", "ÉèÖù㲥¼àÌýʧ°Ü: " + e);
  399. }

  400. // 2. ֪ͨʼþ¼àÌý
  401. var notificationListenerEnabled = false;

  402. try {
  403.     event.onNotificationEvent(function(notification) {
  404.         try {
  405.             var title = notification.getTitle ? notification.getTitle() : "ÎÞ±êÌâ";
  406.             var text = notification.getText ? notification.getText() : "ÎÞÄÚÈÝ";
  407.             logToAll("֪ͨ", "ÊÕµ½Í¨Öª - ±êÌâ: " + title + ", ÄÚÈÝ: " + text);
  408.             safeSetText(tvNotificationLog, "ÊÕµ½Í¨Öª\n±êÌâ: " + title + "\nÄÚÈÝ: " + text);
  409.         } catch (e) {
  410.             logToAll("֪ͨ", "´¦Àí֪ͨʧ°Ü: " + e);
  411.         }
  412.     });
  413.     logToAll("ϵͳ", "✅ ֪ͨʼþ¼àÌýÆ÷ÒÑÉèÖÃ");
  414. } catch (e) {
  415.     logToAll("´íÎó", "ÉèÖÃ֪ͨ¼àÌýʧ°Ü: " + e);
  416. }

  417. // 3. ÔÝÍ£°´Å¥Ê¼þ¼àÌý
  418. try {
  419.     event.onPauseBtnEvent(function() {
  420.         logToAll("°´Å¥", "ÔÝÍ£°´Å¥±»µã»÷");
  421.         safeSetText(tvBtnEventLog, "ÔÝÍ£°´Å¥±»µã»÷\nʱ¼ä: " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
  422.     });
  423.     logToAll("ϵͳ", "✅ ÔÝÍ£°´Å¥Ê¼þ¼àÌýÆ÷ÒÑÉèÖÃ");
  424. } catch (e) {
  425.     logToAll("´íÎó", "ÉèÖÃÔÝÍ£°´Å¥¼àÌýʧ°Ü: " + e);
  426. }

  427. // 4. Í£Ö¹°´Å¥Ê¼þ¼àÌý
  428. try {
  429.     event.onStopBtnEvent(function() {
  430.         logToAll("°´Å¥", "Í£Ö¹°´Å¥±»µã»÷");
  431.         safeSetText(tvBtnEventLog, "Í£Ö¹°´Å¥±»µã»÷\nʱ¼ä: " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
  432.     });
  433.     logToAll("ϵͳ", "✅ Í£Ö¹°´Å¥Ê¼þ¼àÌýÆ÷ÒÑÉèÖÃ");
  434. } catch (e) {
  435.     logToAll("´íÎó", "ÉèÖÃÍ£Ö¹°´Å¥¼àÌýʧ°Ü: " + e);
  436. }

  437. // 5. ½Å±¾Í£Ö¹Ê¼þ¼àÌý
  438. try {
  439.     event.onStopEvent(function() {
  440.         isScriptRunning = false;
  441.         console.log("½Å±¾Í£Ö¹Ê¼þ´¥·¢£¬Í£Ö¹¸üÐÂUI");
  442.         safeSetText(tvStopLog, "½Å±¾Í£Ö¹Ê¼þ´¥·¢\nʱ¼ä: " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
  443.     });
  444.     logToAll("ϵͳ", "✅ ½Å±¾Í£Ö¹Ê¼þ¼àÌýÆ÷ÒÑÉèÖÃ");
  445. } catch (e) {
  446.     logToAll("´íÎó", "ÉèÖýű¾Í£Ö¹¼àÌýʧ°Ü: " + e);
  447. }

  448. // 6. Toastʼþ¼àÌý
  449. try {
  450.     event.onToastEvent(function(msg) {
  451.         logToAll("Toast", "ÊÕµ½Toast: " + msg);
  452.         safeSetText(tvToastLog, "ÊÕµ½Toast: " + msg);
  453.     });
  454.     logToAll("ϵͳ", "✅ Toastʼþ¼àÌýÆ÷ÒÑÉèÖÃ");
  455. } catch (e) {
  456.     logToAll("´íÎó", "ÉèÖÃToast¼àÌýʧ°Ü: " + e);
  457. }

  458. // 7. ÈÈÐÞ¸´Íê³Éʼþ¼àÌý
  459. try {
  460.     event.onHotfixFinish(function(success) {
  461.         var result = success ? "³É¹¦" : "ʧ°Ü";
  462.         logToAll("ÈÈÐÞ¸´", "ÈÈÐÞ¸´Íê³É£¬½á¹û: " + result);
  463.         safeSetText(tvHotfixLog, "ÈÈÐÞ¸´Íê³É\n½á¹û: " + result + "\nʱ¼ä: " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
  464.     });
  465.     logToAll("ϵͳ", "✅ ÈÈÐÞ¸´Íê³Éʼþ¼àÌýÆ÷ÒÑÉèÖÃ");
  466. } catch (e) {
  467.     logToAll("´íÎó", "ÉèÖÃÈÈÐÞ¸´¼àÌýʧ°Ü: " + e);
  468. }

  469. // ==================== °´Å¥µã»÷ʼþ ====================

  470. // ·¢ËͲâÊԹ㲥
  471. btnBroadcast.setOnClickListener(function() {
  472.     logToAll("²âÊÔ", "·¢ËͲâÊԹ㲥");
  473.     safeSetText(tvBroadcastLog, "ÒÑ·¢ËͲâÊԹ㲥\nʱ¼ä: " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
  474.     // ʵ¼Ê·¢Ë͹㲥
  475.     try {
  476.         if (typeof broadcast !== 'undefined') {
  477.             broadcast.send("test_broadcast");
  478.         }
  479.     } catch (e) {
  480.         logToAll("´íÎó", "·¢Ë͹㲥ʧ°Ü: " + e);
  481.     }
  482. });

  483. // ¿ªÆô֪ͨ¼àÌý
  484. btnStartNotificationListener.setOnClickListener(function() {
  485.     notificationListenerEnabled = true;
  486.     logToAll("²âÊÔ", "֪ͨ¼àÌýÒÑ¿ªÆô");
  487.     safeSetText(tvNotificationLog, "֪ͨ¼àÌýÒÑ¿ªÆô\nµÈ´ýϵͳ֪ͨ...");
  488. });

  489. // ¹Ø±Õ֪ͨ¼àÌý
  490. btnStopNotificationListener.setOnClickListener(function() {
  491.     notificationListenerEnabled = false;
  492.     logToAll("²âÊÔ", "֪ͨ¼àÌýÒѹرÕ");
  493.     safeSetText(tvNotificationLog, "֪ͨ¼àÌýÒѹرÕ");
  494. });

  495. // Ä£Äâ֪ͨʼþ
  496. btnSimulateNotification.setOnClickListener(function() {
  497.     logToAll("²âÊÔ", "Ä£Äâ֪ͨʼþ");
  498.     safeSetText(tvNotificationLog, "Ä£Äâ֪ͨ\n±êÌâ: ²âÊÔ֪ͨ\nÄÚÈÝ: ÕâÊÇÒ»ÌõÄ£ÄâµÄ֪ͨÏûÏ¢\nʱ¼ä: " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
  499. });

  500. // Ä£ÄâÔÝÍ£°´Å¥
  501. btnTestPause.setOnClickListener(function() {
  502.     logToAll("²âÊÔ", "Ä£ÄâÔÝÍ£°´Å¥µã»÷");
  503.     safeSetText(tvBtnEventLog, "Ä£ÄâÔÝÍ£°´Å¥µã»÷\nʱ¼ä: " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
  504. });

  505. // Ä£ÄâÍ£Ö¹°´Å¥
  506. btnTestStop.setOnClickListener(function() {
  507.     logToAll("²âÊÔ", "Ä£ÄâÍ£Ö¹°´Å¥µã»÷");
  508.     safeSetText(tvBtnEventLog, "Ä£ÄâÍ£Ö¹°´Å¥µã»÷\nʱ¼ä: " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
  509. });

  510. // ÏÔʾToast
  511. btnShowToast.setOnClickListener(function() {
  512.     var toastMsg = "²âÊÔToastÏûÏ¢ - " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date());
  513.     logToAll("²âÊÔ", "ÏÔʾToast: " + toastMsg);
  514.     safeSetText(tvToastLog, "ÏÔʾToast: " + toastMsg);
  515.     // ʵ¼ÊÏÔʾToast£¨Ê¹ÓüæÈÝ·½Ê½£©
  516.     try {
  517.         // ³¢ÊÔʹÓÃui.toast·½·¨
  518.         if (typeof ui !== 'undefined' && typeof ui.toast === 'function') {
  519.             ui.toast(toastMsg);
  520.         }
  521.         // ³¢ÊÔʹÓÃtoast.show·½·¨
  522.         else if (typeof toast !== 'undefined' && typeof toast.show === 'function') {
  523.             toast.show(toastMsg);
  524.         }
  525.         // Èç¹ûÒÔÉÏ·½·¨¶¼²»¿ÉÓã¬Ê¹ÓÃprintlÊä³öÏûÏ¢
  526.         else {
  527.             printl("ToastÏûÏ¢: " + toastMsg);
  528.         }
  529.     } catch (e) {
  530.         logToAll("´íÎó", "ÏÔʾToastʧ°Ü: " + e);
  531.         // ³ö´íʱʹÓÃprintl×÷Ϊ±¸Ó÷½°¸
  532.         printl("ToastÏûÏ¢: " + toastMsg);
  533.     }
  534. });

  535. // Ä£ÄâÈÈÐÞ¸´Íê³É
  536. btnSimulateHotfix.setOnClickListener(function() {
  537.     logToAll("²âÊÔ", "Ä£ÄâÈÈÐÞ¸´Íê³Éʼþ");
  538.     safeSetText(tvHotfixLog, "Ä£ÄâÈÈÐÞ¸´Íê³É\n½á¹û: ³É¹¦\nʱ¼ä: " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
  539. });

  540. // Ä£Äâ½Å±¾Í£Ö¹
  541. btnSimulateStop.setOnClickListener(function() {
  542.     logToAll("²âÊÔ", "Ä£Äâ½Å±¾Í£Ö¹Ê¼þ");
  543.     safeSetText(tvStopLog, "Ä£Äâ½Å±¾Í£Ö¹Ê¼þ\nʱ¼ä: " + new java.text.SimpleDateFormat("HH:mm:ss").format(new java.util.Date()));
  544. });

  545. // ³õʼ»¯Íê³É
  546. updateStatus("ÒÑÆô¶¯");
  547. logToAll("ϵͳ", "ʼþ¼àÌýʾÀýÒÑÆô¶¯£¬ËùÓмàÌýÆ÷ÒÑÉèÖÃÍê±Ï");

  548. console.log("✅ AIWROKʼþ¼àÌýʾÀýÒÑÆô¶¯");
¸´ÖÆ´úÂë


»Ø¸´

ʹÓõÀ¾ß ¾Ù±¨

¹Ø±Õ

QQ|»ÓªÏúÈí¼þ×ÛºÏÌÖÂÛ|»ÓªÏúÈí¼þÓÐÎʱشð|»ÓªÏúÈí¼þ½Ì³Ì×¨Çø|»ÓªÏúÈí¼þPOST½Å±¾·ÖÏí|»ÓªÏúÈí¼þÆÕͨ½Å±¾·ÖÏí|»ÓªÏúÈí¼þÈí¼þ×ÊѶ|»ÓªÏúÈí¼þ¾«Æ·Èí¼þ|»ÓªÏúÈí¼þ¸üй«¸æ|ÓªÏúÈí¼þ|B2BÈí¼þ|B2BÍøÂçÈí¼þ ( ¾©ICP±¸09078825ºÅ )±¾ÍøÕ¾¿ª·¢µÄÓªÏúÈí¼þÊÇÒ»¿îеÄÍøÂçÓªÏúÈí¼þ£¬Õâ¿îÓªÏú¿ÉÒÔÈ¥ÍøÕ¾Èí¼þ£¬²©¿ÍÈí¼þ£¬B2BÈí¼þ£¬·ÖÀàÐÅÏ¢Íø·¢Ìù£¬¿ÉÒÔÇÀɳ·¢£¬¿ÉÒÔµ½°Ù¶ÈÎÄ¿âÉÏ´«WORDÎĵµ£¬¿ÉÒÔµ½Ò»Ð©ÊÇÏà²áÍøÕ¾×Ô¶¯ÉÏ´«Í¼Æ¬£¬Õâ¸ö×Ô¶¯·¢ÌûÈí¼þ×Ô´øÔÆÖ©Ö룬¼Ó¿ìÊÕ¼£¬ÓÐ6ÖÖ¶Ô½Ó´òÂë½Ó¿Ú£¬·½±ã£¬Ð§Âʸߣ¬Ëٶȿ죬¶øÇÒ¶ÔÍ϶¯µÄÑéÖ¤ÂëÈ«ÍøµÚÒ»¼Ò¶À¼ÒÖ§³Ö£¬È«²¿Ô­´´¼¼Êõ£¬¶À¼ÒÑз¢£¬Õý°æÔ­´´´ø°æÈ¨Èí¼þ¡£Ñ¡ÔñÍòÄÜÓªÏúÈí¼þ£¬¾ÍÑ¡ÔñÁËÒ»ÖÖ׬ǮµÄЧÂÊ£¬´ÓûÓб»³¬Ô½¹ý£¬Ò»Ö±ÔÚŬÁ¦Ñз¢Ð¼¼Êõ¡£·Å·ÉÃÎÏ룬½â·ÅË«ÊÖ£¬À´µã´´Ò⣬³É¾ÍÄãµÄÃÎÏ룬¾ÍÔÚÍòÄÜÓªÏúÈí¼þ¿ªÊ¼

map2

GMT+8, 2026-6-9 18:17 , Processed in 0.268460 second(s), 35 queries .

¿ìËٻظ´ ·µ»Ø¶¥²¿ ·µ»ØÁбí