Provide global proxy to the SDK
This commit is contained in:
parent
57f99a9090
commit
ec007a2b21
7 changed files with 108 additions and 1 deletions
|
|
@ -43,6 +43,7 @@ class MainActivity : ComponentActivity() {
|
|||
val userAgentProvider = SimpleUserAgentProvider("MinimalSample")
|
||||
val sessionStore = InMemorySessionStore()
|
||||
val userCertificatesProvider = NoOpUserCertificatesProvider()
|
||||
val proxyProvider = NoOpProxyProvider()
|
||||
RustMatrixAuthenticationService(
|
||||
baseDirectory = baseDirectory,
|
||||
coroutineDispatchers = Singleton.coroutineDispatchers,
|
||||
|
|
@ -56,11 +57,13 @@ class MainActivity : ComponentActivity() {
|
|||
sessionStore = sessionStore,
|
||||
userAgentProvider = userAgentProvider,
|
||||
userCertificatesProvider = userCertificatesProvider,
|
||||
proxyProvider = proxyProvider,
|
||||
clock = DefaultSystemClock(),
|
||||
),
|
||||
passphraseGenerator = NullPassphraseGenerator(),
|
||||
buildMeta = Singleton.buildMeta,
|
||||
userCertificatesProvider = userCertificatesProvider,
|
||||
proxyProvider = proxyProvider,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Copyright (c) 2024 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.element.android.samples.minimal
|
||||
|
||||
import io.element.android.libraries.matrix.impl.proxy.ProxyProvider
|
||||
|
||||
class NoOpProxyProvider : ProxyProvider {
|
||||
override fun provides(): String? = null
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue