-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapplication_manager.repy
65 lines (45 loc) · 1.58 KB
/
application_manager.repy
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
"""
<Program>
application_manager.repy
Variables are mostly from:
http://www.mithril.com.au/android/doc/ApplicationManagerFacade.html
<Date Started>
December 19th, 2013
<Author>
Yanyan Zhuang
<Purpose>
Trying to use the SL4A JSON bridge to read Application Manager info
"""
dy_import_module_symbols("sensorutil")
def application_manager_get_launchable_applications(sl4a_socket):
"""
<Purpose>
Get a list of all launchable application class names
<Arguments>
sl4a_socket - the socket that has been established for
RPC communication
<Return>
Data returned:
{"error":null,"id":0,"result":{"Voice Dialer":"
com.android.voicedialer.VoiceDialerActivity",
"Phone":"com.android.contacts.activities.DialtactsActivity",
"Search":"com.google.android.googlequicksearchbox.SearchActivity",...}}
"""
result = json_rpc(sl4a_socket, "getLaunchableApplications")
return result
def application_manager_get_running_packages(sl4a_socket):
"""
<Purpose>
Get a list of packages running activities or services.
<Arguments>
sl4a_socket - the socket that has been established for
RPC communication
<Return>
Data returned:
{"error":null,"id":0,"result":["com.google.android.location",
"at.univie.sensorium","android","com.android.providers.contacts",
"com.android.settings","com.android.providers.applications",...
"com.android.calendar","com.android.browser",]}
"""
result = json_rpc(sl4a_socket, "getRunningPackages")
return result