-
Notifications
You must be signed in to change notification settings - Fork 2
/
AutoSwitch-GPS.txt
61 lines (31 loc) · 1.62 KB
/
AutoSwitch-GPS.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
[
{
"name": "自动开关GPS进阶版",
"description": "变量组件或变量应用自动开GPS,直到最近任务没有需要gps的应用(小程序或固定组件)才会关闭。",
"priority": 1,
"condition": "int c = 0 ;int i = 0 ;int qtime = 0 ;if(activityResumed == true){for(act : globalVarOf$GPSact){if(act == componentNameAsString){i++ ;} ;} ;} ;if((frontPkgChanged == true && globalVarOf$GPSapp.contains(to)) || i!=0 ;){ui.showShortToast((hw.enableLocation() ? \"GPS打开成功\" : \"GPS打开失败\")) ;}else if(pkgKilled == true || activityResumed == true){foreach (pkn : globalVarOf$GPSapp){if(task.hasTaskFromPackage(pkn) == true) {c++ ;break ;} ;}if(c != 0){ ;}else{hw.disableLocation() ;} ;}}",
"actions": [
""
]
}
]
全局变量GPSapp填包名
[
"com.miui.weather2",
"com.autonavi.minimap"
]
全局变量GPSact填组件名
[
"com.tencent.mm/com.tencent.mm.plugin.appbrand.ui.AppBrandUI",
"com.tencent.mm/com.tencent.mm.plugin.appbrand.ui.AppBrandUI1",
"com.tencent.mm/com.tencent.mm.plugin.appbrand.ui.AppBrandUI2",
"com.tencent.mm/com.tencent.mm.plugin.appbrand.ui.AppBrandUI3",
"com.tencent.mm/com.tencent.mm.plugin.appbrand.ui.AppBrandUI4",
"com.tencent.mm/com.tencent.mm.plugin.appbrand.ui.AppBrandUI5",
"com.tencent.mm/com.tencent.mm.plugin.appbrand.ui.AppBrandUI6",
"com.tencent.mm/com.tencent.mm.plugin.location_soso.SoSoProxyUI",
"com.tencent.mm/com.tencent.mm.plugin.nearlife.ui.CheckInLifeUI",
"com.tencent.mm/com.tencent.mm.plugin.webview.ui.tools.WebviewMpUI",
"com.tencent.mm/com.tencent.mm.plugin.webview.ui.tools.WebViewUI",
"com.tencent.mm/com.tencent.mm.plugin.webview.ui.tools.MMWebViewUI"
]