“Thanox Profile”的版本间差异

来自Silica Library | 間奏時光
跳到导航 跳到搜索
第6行: 第6行:
   一般情况下请使用 <code>Background</code>,<code>Foreground</code> 主要用在一些仅启动进程不足以正常运行的 APP,如 <code>小米健康运动</code> (只开进程手表无法收到任何通知)。另不建议移除 <code>Thread.sleep(3000);</code>。密集地执行 <code>activity.launchProcessForPackage</code> 会导致需要启动多个应用的时候部分不成功。
   一般情况下请使用 <code>Background</code>,<code>Foreground</code> 主要用在一些仅启动进程不足以正常运行的 APP,如 <code>小米健康运动</code> (只开进程手表无法收到任何通知)。另不建议移除 <code>Thread.sleep(3000);</code>。密集地执行 <code>activity.launchProcessForPackage</code> 会导致需要启动多个应用的时候部分不成功。
<pre>
<pre>
[{
[
"name": "System Boot Ready Running",
   {
"description": "Global Variant: Foreground, Background",
     "name": "System Boot Ready Running",
"priority": 1,
     "description": "Global Variant: Foreground, Background",
"condition": "systemReady == true",
     "priority": 1,
"delay": 10000,
     "condition": "systemReady == true",
"actions": 
     "delay": 10000,
[
     "actions": [
  "foreach (fore : globalVarOf$Background) {activity.launchProcessForPackage(fore); Thread.sleep(6000);}",
       "foreach (fore : globalVarOf$Background) {activity.launchProcessForPackage(fore); Thread.sleep(6000);}",
  "foreach (back : globalVarOf$Foreground) {activity.launchMainActivityForPackage(back); Thread.sleep(6000);}"
       "foreach (back : globalVarOf$Foreground) {activity.launchMainActivityForPackage(back); Thread.sleep(6000);}"
]
     ]
}]
   }
]
</pre>
</pre>



2022年8月11日 (四) 09:07的版本

Thanox Pro 情景模式

开机自启动

  变量名:ForegroundBackground
  一般情况下请使用 BackgroundForeground 主要用在一些仅启动进程不足以正常运行的 APP,如 小米健康运动 (只开进程手表无法收到任何通知)。另不建议移除 Thread.sleep(3000);。密集地执行 activity.launchProcessForPackage 会导致需要启动多个应用的时候部分不成功。

[
    {
        "name": "System Boot Ready Running",
        "description": "Global Variant: Foreground, Background",
        "priority": 1,
        "condition": "systemReady == true",
        "delay": 10000,
        "actions": [
            "foreach (fore : globalVarOf$Background) {activity.launchProcessForPackage(fore); Thread.sleep(6000);}",
            "foreach (back : globalVarOf$Foreground) {activity.launchMainActivityForPackage(back); Thread.sleep(6000);}"
        ]
    }
]

进程守护 (启动应用进程)

  变量名:Background

[{
 "name": "Keep Background Running",
 "description": "Global Variant: Background",
 "priority": 1,
 "condition": "pkgKilled == true && globalVarOf$Background.contains(pkgName)",
 "actions": ["activity.launchProcessForPackage(pkgName)"]
}]

进程守护 (打开应用主界面)

  变量名:Foreground
  主要用在一些仅启动进程不足以正常运行的 APP,如 小米健康运动 (只开进程手表无法收到任何通知)。

[{
 "name": "Keep Foreground Running",
 "description": "Global Variant: Foreground",
 "priority": 1,
 "condition": "pkgKilled == true && globalVarOf$Foreground.contains(pkgName)",
 "actions": ["activity.launchMainActivityForPackage(pkgName)"]
}]