-
Notifications
You must be signed in to change notification settings - Fork 5
/
AndroidManifest.xml
131 lines (117 loc) · 5.66 KB
/
AndroidManifest.xml
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
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright 2021 Matthew Nelson
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!--
Required for API 28+ if enabling foreground service
-->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<!--
Required for usage of NetworkObserver to automatically toggle Tor's
`DisableNetwork` config setting upon device connectivity loss/gain.
-->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!--
Required for connecting to the Tor network.
-->
<uses-permission android:name="android.permission.INTERNET" />
<!--
Required when targeting API 33+ and are using foreground service.
-->
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<application
android:name=".SampleApp"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.SampleAndroid"
tools:ignore="AllowBackup"
android:extractNativeLibs="true"
tools:targetApi="m">
<!-- ^^^^^ needed to ensure binaries are extracted -->
<!--
TorService configuration to run in the Foreground.
** See also the above permissions needed **
For additional information and explanations, see HERE:
- https://github.com/05nelsonm/kmp-tor/blob/master/samples/kotlin/android/src/main/res/values/attrs.xml
-->
<meta-data
android:name="io.matthewnelson.kmp.tor.enable_foreground"
android:value="@bool/tor_service_enable_foreground" />
<meta-data
android:name="io.matthewnelson.kmp.tor.stop_service_on_task_removed"
android:value="@bool/tor_service_stop_service_on_task_removed" />
<meta-data
android:name="io.matthewnelson.kmp.tor.if_foreground_exit_process_on_destroy_when_task_removed"
android:value="@bool/tor_service_if_foreground_exit_process_on_destroy_when_task_removed" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_id"
android:value="@integer/tor_service_notification_id" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_channel_id"
android:value="@string/tor_service_notification_channel_id" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_channel_name"
android:value="@string/tor_service_notification_channel_name" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_channel_description"
android:value="@string/tor_service_notification_channel_description" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_channel_show_badge"
android:value="@bool/tor_service_notification_channel_show_badge" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_icon_network_enabled"
android:resource="@drawable/tor_service_notification_icon_network_enabled" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_icon_network_disabled"
android:resource="@drawable/tor_service_notification_icon_network_disabled" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_icon_data_xfer"
android:resource="@drawable/tor_service_notification_icon_data_xfer" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_icon_error"
android:resource="@drawable/tor_service_notification_icon_error" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_color_when_bootstrapped_true"
android:resource="@color/tor_service_notification_color_when_bootstrapped_true" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_color_when_bootstrapped_false"
android:resource="@color/tor_service_notification_color_when_bootstrapped_false" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_visibility"
android:value="@string/tor_service_notification_visibility" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_action_enable_restart"
android:value="@bool/tor_service_notification_action_enable_restart" />
<meta-data
android:name="io.matthewnelson.kmp.tor.notification_action_enable_stop"
android:value="@bool/tor_service_notification_action_enable_stop" />
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>