Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit 4d1ed9e

Browse files
committed
Prepare 2.0.2 release
1 parent 19863f7 commit 4d1ed9e

32 files changed

Lines changed: 73 additions & 47 deletions

docs/changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## Version 2.0.2 (2020-10-19)
4+
- Bug Fix: Notifications not showing on API 25 and below [12abbf7](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/commit/12abbf7faec781cb2c9b0a9babf3fe0e3d6cb352)
5+
- Deprecates `ServiceNotification.Builder.setContentIntentData` in favor of
6+
`ServiceNotification.Builder.setContentIntent` via Library implementer providing the needed PendingIntent
7+
- Removes Notification Action icons
8+
39
## Version 2.0.1 (2020-10-18)
410
- Deprecates the `ServiceNotification.Builder.setActivityToBeOpenedOnTap` method in favor of using
511
the new `ServiceNotification.Builder.setContentIntentData` to mitigate multiple activities from

docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/enable-tor-restart-button.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# enableTorRestartButton
44

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)
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#L338)
66

77
Disabled by Default
88

docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/enable-tor-stop-button.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# enableTorStopButton
44

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)
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#L355)
66

77
Disabled by Default
88

docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/index.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Builder
44

5-
`class Builder` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L146)
5+
`class Builder` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L148)
66

77
Where you get to customize how your notification will look and function.
88

@@ -60,8 +60,9 @@ in order to properly shut down Tor and clean up w/o being killed by the OS.
6060
|---|---|
6161
| [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` |
6262
| [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` |
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` |
63+
| [setActivityToBeOpenedOnTap](set-activity-to-be-opened-on-tap.md) | Do not use this method.`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+
| [setContentIntent](set-content-intent.md) | Allows for full control over the [PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html) used when the user taps the [ServiceNotification](../index.md).`fun setContentIntent(pendingIntent: `[`PendingIntent`](https://developer.android.com/reference/android/app/PendingIntent.html)`?): Builder` |
65+
| [setContentIntentData](set-content-intent-data.md) | Do not use this method.`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` |
6566
| [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` |
6667
| [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` |
6768
| [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` |

docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/set-activity-to-be-opened-on-tap.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22

33
# setActivityToBeOpenedOnTap
44

5-
`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` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L182)
6-
**Deprecated:** Default behavior of user tapping notification now uses your application's launcher intent from package manager to mitigate launching of multiple activities.
5+
`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` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L183)
6+
**Deprecated:** This method will be removed in a future release
77

8-
Define the Activity to be opened when your user taps TorService's notification.
9-
10-
See [Builder](index.md) for code samples.
8+
Do not use this method.
119

1210
### Parameters
1311

@@ -17,4 +15,9 @@ See [Builder](index.md) for code samples.
1715

1816
`intentExtras` - ? The extras that will be sent in the PendingIntent.
1917

20-
`intentRequestCode` - ? The request code - Defaults to 0 if not set.
18+
`intentRequestCode` - ? The request code - Defaults to 0 if not set.
19+
20+
**See Also**
21+
22+
[setContentIntent](set-content-intent.md)
23+

docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/set-content-intent-data.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,20 @@
22

33
# setContentIntentData
44

5-
`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` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L211)
5+
`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` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L211)
6+
**Deprecated:** This method will be removed in a future release
67

7-
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.
8+
Do not use this method.
109

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.
10+
A non-null, non-0 number must be supplied for requestCode.
1711

1812
### Parameters
1913

2014
`bundle` - Bundle to be sent to the Launch Activity
2115

22-
`requestCode` - Request Code to be used when launching the Activity
16+
`requestCode` - Request Code to be used when launching the Activity
17+
18+
**See Also**
19+
20+
[setContentIntent](set-content-intent.md)
21+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[topl-service](../../../index.md) / [io.matthewnelson.topl_service.notification](../../index.md) / [ServiceNotification](../index.md) / [Builder](index.md) / [setContentIntent](./set-content-intent.md)
2+
3+
# setContentIntent
4+
5+
`fun setContentIntent(pendingIntent: `[`PendingIntent`](https://developer.android.com/reference/android/app/PendingIntent.html)`?): Builder` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L226)
6+
7+
Allows for full control over the [PendingIntent](https://developer.android.com/reference/android/app/PendingIntent.html) used when the user taps the
8+
[ServiceNotification](../index.md).
9+
10+
**NOTE**: use applicationContext when building your pending intent.
11+

docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/set-custom-color.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# setCustomColor
44

5-
`fun setCustomColor(@ColorRes colorRes: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): Builder` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L293)
5+
`fun setCustomColor(@ColorRes colorRes: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): Builder` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L304)
66

77
Defaults to [R.color.tor_service_white](#)
88

docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/set-image-tor-data-transfer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# setImageTorDataTransfer
44

5-
`fun setImageTorDataTransfer(@DrawableRes drawableRes: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): Builder` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L262)
5+
`fun setImageTorDataTransfer(@DrawableRes drawableRes: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): Builder` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L273)
66

77
Defaults to Orbot/TorBrowser's icon [R.drawable.tor_stat_network_dataxfer](#).
88

docs/topl-service/io.matthewnelson.topl_service.notification/-service-notification/-builder/set-image-tor-errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# setImageTorErrors
44

5-
`fun setImageTorErrors(@DrawableRes drawableRes: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): Builder` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L277)
5+
`fun setImageTorErrors(@DrawableRes drawableRes: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): Builder` [(source)](https://github.com/05nelsonm/TorOnionProxyLibrary-Android/blob/master/topl-service/src/main/java/io/matthewnelson/topl_service/notification/ServiceNotification.kt#L288)
66

77
Defaults to Orbot/TorBrowser's icon [R.drawable.tor_stat_notifyerr](#).
88

0 commit comments

Comments
 (0)