Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsubscribe Push #100

Merged
merged 54 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
d1704eb
add api client with grpc kotlin
nplasterer Dec 26, 2022
6f3175a
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Jan 17, 2023
df53a9a
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 10, 2023
fc9233c
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 13, 2023
1fedba1
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 13, 2023
035f820
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 14, 2023
ca09a38
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 14, 2023
49609c0
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 15, 2023
3ac6056
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 16, 2023
0c08c3b
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 21, 2023
0c4c32c
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 23, 2023
0d2c9bc
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 23, 2023
0e27676
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Feb 28, 2023
b5832bb
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 2, 2023
70f437b
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 2, 2023
518e4fe
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 2, 2023
2f22170
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 2, 2023
6b32100
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 3, 2023
1dcaad2
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 7, 2023
2da365a
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 8, 2023
204b05a
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 10, 2023
c535299
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 14, 2023
92157a7
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 14, 2023
babe99f
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 14, 2023
682d89c
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 14, 2023
d2584f3
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 14, 2023
f5f77ae
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 21, 2023
0f8a264
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 27, 2023
b248fea
Merge branch 'main' of github.com:xmtp/xmtp-android
nplasterer Mar 28, 2023
7d83110
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Mar 30, 2023
ed21f1d
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Apr 11, 2023
a45a49b
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Apr 17, 2023
b4307a6
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Apr 24, 2023
3ed0bfc
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Apr 25, 2023
7e9ec53
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Apr 26, 2023
a20d298
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer May 5, 2023
44960a1
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer May 10, 2023
c7d08df
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer May 10, 2023
4710fe4
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer May 19, 2023
a5388dc
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer May 31, 2023
d95c2dd
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer May 31, 2023
9bb811d
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Jun 2, 2023
3c2736d
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Jun 8, 2023
4724e83
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Jun 14, 2023
4d169eb
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Jun 21, 2023
de7a8be
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Jun 23, 2023
65f23d8
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Jul 6, 2023
08eae91
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Jul 7, 2023
f1017aa
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Jul 17, 2023
36f28cf
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Jul 18, 2023
82c5d93
Merge branch 'main' of https://github.com/xmtp/xmtp-android
nplasterer Jul 27, 2023
f90b9ee
add unsubscribe ability
nplasterer Aug 2, 2023
5111c90
update docs
nplasterer Aug 2, 2023
3c3f55e
Merge branch 'main' into np/unsubscribe-push
nplasterer Aug 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,7 @@ This example branch can serve as the basis for what you might want to provide fo
```kotlin
XMTPPush(context, "10.0.2.2:8080").subscribe(conversations.map { it.topic })
```

```kotlin
XMTPPush(context, "10.0.2.2:8080").unsubscribe(conversations.map { it.topic })
```
11 changes: 11 additions & 0 deletions library/src/main/java/org/xmtp/android/library/push/XMTPPush.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@ class XMTPPush() {
client.subscribe(request)
}

fun unsubscribe(topics: List<String>) {
if (pushServer == "") {
throw XMTPException("No push server")
}
val request = Service.UnsubscribeRequest.newBuilder().also { request ->
request.installationId = installationId
request.addAllTopics(topics)
}.build()
client.unsubscribe(request)
}

val client: NotificationsGrpc.NotificationsFutureStub
get() {
val protocolClient: ManagedChannel =
Expand Down
Loading