Commit 165f2b2 1 parent 1180190 commit 165f2b2 Copy full SHA for 165f2b2
File tree 6 files changed +14
-9
lines changed
example/src/main/java/org/xmtp/android/example
library/src/main/java/org/xmtp/android/library
6 files changed +14
-9
lines changed Original file line number Diff line number Diff line change 13
13
uses : actions/checkout@v4
14
14
with :
15
15
fetch-depth : 0
16
+ - name : Configure JDK
17
+ uses : actions/setup-java@v4
18
+ with :
19
+ distribution : ' adopt'
20
+ java-version : ' 17'
16
21
- name : Setup Gradle
17
22
uses : gradle/actions/setup-gradle@v3
18
23
- name : Run build with Gradle Wrapper
Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ object ClientManager {
18
18
fun clientOptions (appContext : Context ? ): ClientOptions {
19
19
return ClientOptions (
20
20
api = ClientOptions .Api (
21
- XMTPEnvironment .LOCAL ,
21
+ XMTPEnvironment .DEV ,
22
22
appVersion = " XMTPAndroidExample/v1.0.0" ,
23
- isSecure = false
23
+ isSecure = true
24
24
),
25
25
enableAlphaMls = true ,
26
26
appContext = appContext
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ data class GRPCApiClient(
91
91
private val channel: ManagedChannel =
92
92
Grpc .newChannelBuilderForAddress(
93
93
environment.getValue(),
94
- 5556 ,
94
+ if (environment == XMTPEnvironment . LOCAL ) 5556 else 443 ,
95
95
if (secure) {
96
96
TlsChannelCredentials .create()
97
97
} else {
Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ class Client() {
279
279
}
280
280
281
281
private fun isAlphaMlsEnabled (options : ClientOptions ? ): Boolean {
282
- return (options != null && options.enableAlphaMls && options.api.env == XMTPEnvironment .LOCAL && options.appContext != null )
282
+ return (options != null && options.enableAlphaMls && options.api.env != XMTPEnvironment .PRODUCTION && options.appContext != null )
283
283
}
284
284
285
285
private suspend fun ffiXmtpClient (
@@ -324,8 +324,8 @@ class Client() {
324
324
325
325
createClient(
326
326
logger = logger,
327
- host = " http://${options.api.env.getValue()} :5556" ,
328
- isSecure = false ,
327
+ host = if (options.api.env == XMTPEnvironment . LOCAL ) " http://${options.api.env.getValue()} :5556" else " https:// ${options.api.env.getValue()} :443 " ,
328
+ isSecure = options.api.isSecure ,
329
329
db = dbPath,
330
330
encryptionKey = retrievedKey.encoded,
331
331
accountAddress = accountAddress,
Original file line number Diff line number Diff line change 1
1
package org.xmtp.android.library
2
2
3
3
enum class XMTPEnvironment (val rawValue : String ) {
4
- DEV (" dev.xmtp.network" ),
5
- PRODUCTION (" production.xmtp.network" ),
4
+ DEV (" grpc. dev.xmtp.network" ),
5
+ PRODUCTION (" grpc. production.xmtp.network" ),
6
6
LOCAL (" 10.0.2.2" ) {
7
7
override fun withValue (value : String ): XMTPEnvironment {
8
8
return LOCAL .apply { customValue = value }
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ This example branch can serve as the basis for what you might want to provide fo
35
35
--xmtp-listener-tls \
36
36
--xmtp-listener \
37
37
--api \
38
- -x " production.xmtp.network:5556" \
38
+ -x " grpc. production.xmtp.network:443 :5556" \
39
39
-d " postgres://postgres:xmtp@localhost:25432/postgres?sslmode=disable" \
40
40
--fcm-enabled \
41
41
--fcm-credentials-json=YOURFCMJSON \
You can’t perform that action at this time.
0 commit comments