You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 18, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/enable-tor-restart-button.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
# enableTorRestartButton
4
4
5
-
`@JvmOverloads fun enableTorRestartButton(enable: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true): Builder`[(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L300)
5
+
`@JvmOverloads fun enableTorRestartButton(enable: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true): Builder`[(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L327)
Copy file name to clipboardExpand all lines: docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/enable-tor-stop-button.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
# enableTorStopButton
4
4
5
-
`@JvmOverloads fun enableTorStopButton(enable: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true): Builder`[(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L317)
5
+
`@JvmOverloads fun enableTorStopButton(enable: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true): Builder`[(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L344)
@@ -63,7 +60,8 @@ in order to properly shut down Tor and clean up w/o being killed by the OS.
63
60
|---|---|
64
61
|[enableTorRestartButton](enable-tor-restart-button.md)| Disabled by Default`fun enableTorRestartButton(enable: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true): Builder`|
65
62
|[enableTorStopButton](enable-tor-stop-button.md)| Disabled by Default`fun enableTorStopButton(enable: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` = true): Builder`|
66
-
|[setActivityToBeOpenedOnTap](set-activity-to-be-opened-on-tap.md)| Define the Activity to be opened when your user taps TorService's notification.`fun setActivityToBeOpenedOnTap(clazz: `[`Class`](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html)`<*>, intentExtrasKey: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, intentExtras: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, intentRequestCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?): Builder`|
63
+
|[setActivityToBeOpenedOnTap](set-activity-to-be-opened-on-tap.md)| Define the Activity to be opened when your user taps TorService's notification.`fun ~~setActivityToBeOpenedOnTap~~(clazz: `[`Class`](https://docs.oracle.com/javase/6/docs/api/java/lang/Class.html)`<*>, intentExtrasKey: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, intentExtras: `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`?, intentRequestCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?): Builder`|
64
+
|[setContentIntentData](set-content-intent-data.md)| Default notification behaviour is to use the launch intent for your application from Package Manager when a user taps the notification. Electing this method allows for adding a request code and bundle to the PendingIntent.`fun setContentIntentData(bundle: `[`Bundle`](https://developer.android.com/reference/android/os/Bundle.html)`?, requestCode: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`?): Builder`|
67
65
|[setCustomColor](set-custom-color.md)| Defaults to [R.color.tor_service_white](#)`fun setCustomColor(colorRes: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): Builder`|
68
66
|[setImageTorDataTransfer](set-image-tor-data-transfer.md)| Defaults to Orbot/TorBrowser's icon [R.drawable.tor_stat_network_dataxfer](#).`fun setImageTorDataTransfer(drawableRes: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): Builder`|
69
67
|[setImageTorErrors](set-image-tor-errors.md)| Defaults to Orbot/TorBrowser's icon [R.drawable.tor_stat_notifyerr](#).`fun setImageTorErrors(drawableRes: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): Builder`|
Copy file name to clipboardExpand all lines: docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/set-activity-to-be-opened-on-tap.md
**Deprecated:** Default behavior of user tapping notification now uses your application's launcher intent from package manager to mitigate launching of multiple activities.
6
7
7
8
Define the Activity to be opened when your user taps TorService's notification.
8
9
@@ -16,15 +17,4 @@ See [Builder](index.md) for code samples.
16
17
17
18
`intentExtras` - ? The extras that will be sent in the PendingIntent.
18
19
19
-
`intentRequestCode` -
20
-
21
-
? The request code - Defaults to 0 if not set.
22
-
23
-
24
-
25
-
TODO:
26
-
27
-
28
-
* Include an optional Bundle? to be set for creating the pending intent.
29
-
* Think about overriding and providing another option to rotate the ContentIntent
30
-
to open up/resume current activity?
20
+
`intentRequestCode` - ? The request code - Defaults to 0 if not set.
Default notification behaviour is to use the launch intent for your application
8
+
from Package Manager when a user taps the notification. Electing this method allows
9
+
for adding a request code and bundle to the PendingIntent.
10
+
11
+
**NOTE:** electing [setActivityToBeOpenedOnTap](set-activity-to-be-opened-on-tap.md) method behaviour takes precedent until
12
+
it is removed in a future release.
13
+
14
+
**NOTE:** If you do not elect this method or [setActivityToBeOpenedOnTap](set-activity-to-be-opened-on-tap.md) in your
15
+
[Builder](index.md), the notification's content intent is still set with a default [requestCode](set-content-intent-data.md#io.matthewnelson.topl_service.notification.ServiceNotification.Builder$setContentIntentData(android.os.Bundle, kotlin.Int)/requestCode)
16
+
value of 0 and null bundle.
17
+
18
+
### Parameters
19
+
20
+
`bundle` - Bundle to be sent to the Launch Activity
21
+
22
+
`requestCode` - Request Code to be used when launching the Activity
Copy file name to clipboardExpand all lines: docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/set-custom-color.md
Copy file name to clipboardExpand all lines: docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/set-image-tor-data-transfer.md
Copy file name to clipboardExpand all lines: docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/set-image-tor-errors.md
0 commit comments