Skip to content

Commit cffe1f6

Browse files
authored
Push clean up (#71)
* add api client with grpc kotlin * remove googleservices * update some push stuff
1 parent 6b2ef32 commit cffe1f6

File tree

5 files changed

+7
-52
lines changed

5 files changed

+7
-52
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,5 @@ lint/generated/
9090
lint/outputs/
9191
lint/tmp/
9292
# lint/reports/
93+
94+
*google-services.json

example/google-services.json

-49
This file was deleted.

example/src/main/java/org/xmtp/android/example/ClientManager.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import org.xmtp.android.library.messages.PrivateKeyBundleV1Builder
1313

1414
object ClientManager {
1515

16-
val CLIENT_OPTIONS = ClientOptions(api = ClientOptions.Api(XMTPEnvironment.PRODUCTION))
16+
val CLIENT_OPTIONS = ClientOptions(api = ClientOptions.Api(XMTPEnvironment.DEV))
1717

1818
private val _clientState = MutableStateFlow<ClientState>(ClientState.Unknown)
1919
val clientState: StateFlow<ClientState> = _clientState

example/src/main/java/org/xmtp/android/example/pushnotifications/PushNotificationTokenManager.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ object PushNotificationTokenManager {
5757

5858
internal fun syncPushNotificationsToken(token: String) {
5959
if (xmtpPushState.value is XMTPPushState.Ready) {
60-
runBlocking { xmtpPush.register(token) }
60+
runBlocking {
61+
xmtpPush.register(token)
62+
}
6163
}
6264
}
6365

library/src/main/java/org/xmtp/android/library/push/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ This example branch can serve as the basis for what you might want to provide fo
4646

4747
## Update the example app to send push notifications
4848

49-
1. Copy the contents of `google-services.json` into the example app's `google-services.json` file, if you haven't already done it as a part of the FCM project creation process.
49+
1. Add your `google-services.json` file to the `example` folder, if you haven't already done it as a part of the FCM project creation process.
5050
5151
2. Uncomment `id 'com.google.gms.google-services'` in the example app's `build.gradle` file.
5252

0 commit comments

Comments
 (0)