-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapps.py
More file actions
227 lines (215 loc) · 8.57 KB
/
Copy pathapps.py
File metadata and controls
227 lines (215 loc) · 8.57 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
"""App name to package name mapping for supported applications."""
APP_PACKAGES: dict[str, str] = {
# Social & Messaging
"微信": "com.tencent.mm",
"QQ": "com.tencent.mobileqq",
"微博": "com.sina.weibo",
# E-commerce
"淘宝": "com.taobao.taobao",
"京东": "com.jingdong.app.mall",
"拼多多": "com.xunmeng.pinduoduo",
"淘宝闪购": "com.taobao.taobao",
"京东秒送": "com.jingdong.app.mall",
# Lifestyle & Social
"小红书": "com.xingin.xhs",
"豆瓣": "com.douban.frodo",
"知乎": "com.zhihu.android",
# Maps & Navigation
"高德地图": "com.autonavi.minimap",
"百度地图": "com.baidu.BaiduMap",
# Food & Services
"美团": "com.sankuai.meituan",
"大众点评": "com.dianping.v1",
"饿了么": "me.ele",
"肯德基": "com.yek.android.kfc.activitys",
# Travel
"携程": "ctrip.android.view",
"铁路12306": "com.MobileTicket",
"12306": "com.MobileTicket",
"去哪儿": "com.Qunar",
"去哪儿旅行": "com.Qunar",
"滴滴出行": "com.sdu.didi.psnger",
# Video & Entertainment
"bilibili": "tv.danmaku.bili",
"抖音": "com.ss.android.ugc.aweme",
"快手": "com.smile.gifmaker",
"腾讯视频": "com.tencent.qqlive",
"爱奇艺": "com.qiyi.video",
"优酷视频": "com.youku.phone",
"芒果TV": "com.hunantv.imgo.activity",
"红果短剧": "com.phoenix.read",
# Music & Audio
"网易云音乐": "com.netease.cloudmusic",
"QQ音乐": "com.tencent.qqmusic",
"汽水音乐": "com.luna.music",
"喜马拉雅": "com.ximalaya.ting.android",
# Reading
"番茄小说": "com.dragon.read",
"番茄免费小说": "com.dragon.read",
"七猫免费小说": "com.kmxs.reader",
# Productivity
"飞书": "com.ss.android.lark",
"QQ邮箱": "com.tencent.androidqqmail",
# AI & Tools
"豆包": "com.larus.nova",
# Health & Fitness
"keep": "com.gotokeep.keep",
"美柚": "com.lingan.seeyou",
# News & Information
"腾讯新闻": "com.tencent.news",
"今日头条": "com.ss.android.article.news",
# Real Estate
"贝壳找房": "com.lianjia.beike",
"安居客": "com.anjuke.android.app",
# Finance
"同花顺": "com.hexin.plat.android",
# Games
"星穹铁道": "com.miHoYo.hkrpg",
"崩坏:星穹铁道": "com.miHoYo.hkrpg",
"恋与深空": "com.papegames.lysk.cn",
"AndroidSystemSettings": "com.android.settings",
"Android System Settings": "com.android.settings",
"Android System Settings": "com.android.settings",
"Android-System-Settings": "com.android.settings",
"Settings": "com.android.settings",
"AudioRecorder": "com.android.soundrecorder",
"audiorecorder": "com.android.soundrecorder",
"Bluecoins": "com.rammigsoftware.bluecoins",
"bluecoins": "com.rammigsoftware.bluecoins",
"Broccoli": "com.flauschcode.broccoli",
"broccoli": "com.flauschcode.broccoli",
"Booking.com": "com.booking",
"Booking": "com.booking",
"booking.com": "com.booking",
"booking": "com.booking",
"BOOKING.COM": "com.booking",
"Chrome": "com.android.chrome",
"chrome": "com.android.chrome",
"Google Chrome": "com.android.chrome",
"Clock": "com.android.deskclock",
"clock": "com.android.deskclock",
"Contacts": "com.android.contacts",
"contacts": "com.android.contacts",
"Duolingo": "com.duolingo",
"duolingo": "com.duolingo",
"Expedia": "com.expedia.bookings",
"expedia": "com.expedia.bookings",
"Files": "com.android.fileexplorer",
"files": "com.android.fileexplorer",
"File Manager": "com.android.fileexplorer",
"file manager": "com.android.fileexplorer",
"gmail": "com.google.android.gm",
"Gmail": "com.google.android.gm",
"GoogleMail": "com.google.android.gm",
"Google Mail": "com.google.android.gm",
"GoogleFiles": "com.google.android.apps.nbu.files",
"googlefiles": "com.google.android.apps.nbu.files",
"FilesbyGoogle": "com.google.android.apps.nbu.files",
"GoogleCalendar": "com.google.android.calendar",
"Google-Calendar": "com.google.android.calendar",
"Google Calendar": "com.google.android.calendar",
"google-calendar": "com.google.android.calendar",
"google calendar": "com.google.android.calendar",
"GoogleChat": "com.google.android.apps.dynamite",
"Google Chat": "com.google.android.apps.dynamite",
"Google-Chat": "com.google.android.apps.dynamite",
"GoogleClock": "com.google.android.deskclock",
"Google Clock": "com.google.android.deskclock",
"Google-Clock": "com.google.android.deskclock",
"GoogleContacts": "com.google.android.contacts",
"Google-Contacts": "com.google.android.contacts",
"Google Contacts": "com.google.android.contacts",
"google-contacts": "com.google.android.contacts",
"google contacts": "com.google.android.contacts",
"GoogleDocs": "com.google.android.apps.docs.editors.docs",
"Google Docs": "com.google.android.apps.docs.editors.docs",
"googledocs": "com.google.android.apps.docs.editors.docs",
"google docs": "com.google.android.apps.docs.editors.docs",
"Google Drive": "com.google.android.apps.docs",
"Google-Drive": "com.google.android.apps.docs",
"google drive": "com.google.android.apps.docs",
"google-drive": "com.google.android.apps.docs",
"GoogleDrive": "com.google.android.apps.docs",
"Googledrive": "com.google.android.apps.docs",
"googledrive": "com.google.android.apps.docs",
"GoogleFit": "com.google.android.apps.fitness",
"googlefit": "com.google.android.apps.fitness",
"GoogleKeep": "com.google.android.keep",
"googlekeep": "com.google.android.keep",
"GoogleMaps": "com.google.android.apps.maps",
"Google Maps": "com.google.android.apps.maps",
"googlemaps": "com.google.android.apps.maps",
"google maps": "com.google.android.apps.maps",
"Google Play Books": "com.google.android.apps.books",
"Google-Play-Books": "com.google.android.apps.books",
"google play books": "com.google.android.apps.books",
"google-play-books": "com.google.android.apps.books",
"GooglePlayBooks": "com.google.android.apps.books",
"googleplaybooks": "com.google.android.apps.books",
"GooglePlayStore": "com.android.vending",
"Google Play Store": "com.android.vending",
"Google-Play-Store": "com.android.vending",
"GoogleSlides": "com.google.android.apps.docs.editors.slides",
"Google Slides": "com.google.android.apps.docs.editors.slides",
"Google-Slides": "com.google.android.apps.docs.editors.slides",
"GoogleTasks": "com.google.android.apps.tasks",
"Google Tasks": "com.google.android.apps.tasks",
"Google-Tasks": "com.google.android.apps.tasks",
"Joplin": "net.cozic.joplin",
"joplin": "net.cozic.joplin",
"McDonald": "com.mcdonalds.app",
"mcdonald": "com.mcdonalds.app",
"Osmand": "net.osmand",
"osmand": "net.osmand",
"PiMusicPlayer": "com.Project100Pi.themusicplayer",
"pimusicplayer": "com.Project100Pi.themusicplayer",
"Quora": "com.quora.android",
"quora": "com.quora.android",
"Reddit": "com.reddit.frontpage",
"reddit": "com.reddit.frontpage",
"RetroMusic": "code.name.monkey.retromusic",
"retromusic": "code.name.monkey.retromusic",
"SimpleCalendarPro": "com.scientificcalculatorplus.simplecalculator.basiccalculator.mathcalc",
"SimpleSMSMessenger": "com.simplemobiletools.smsmessenger",
"Telegram": "org.telegram.messenger",
"temu": "com.einnovation.temu",
"Temu": "com.einnovation.temu",
"Tiktok": "com.zhiliaoapp.musically",
"tiktok": "com.zhiliaoapp.musically",
"Twitter": "com.twitter.android",
"twitter": "com.twitter.android",
"X": "com.twitter.android",
"VLC": "org.videolan.vlc",
"WeChat": "com.tencent.mm",
"wechat": "com.tencent.mm",
"Whatsapp": "com.whatsapp",
"WhatsApp": "com.whatsapp",
}
def get_package_name(app_name: str) -> str | None:
"""
Get the package name for an app.
Args:
app_name: The display name of the app.
Returns:
The Android package name, or None if not found.
"""
return APP_PACKAGES.get(app_name)
def get_app_name(package_name: str) -> str | None:
"""
Get the app name from a package name.
Args:
package_name: The Android package name.
Returns:
The display name of the app, or None if not found.
"""
for name, package in APP_PACKAGES.items():
if package == package_name:
return name
return None
def list_supported_apps() -> list[str]:
"""
Get a list of all supported app names.
Returns:
List of app names.
"""
return list(APP_PACKAGES.keys())