This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun getClient(): WebViewClient { | |
return object : WebViewClient() { | |
override fun shouldInterceptRequest( | |
view: WebView?, | |
request: WebResourceRequest? | |
): WebResourceResponse? { | |
return super.shouldInterceptRequest(view, request) | |
} | |
override fun shouldInterceptRequest(view: WebView?, url: String?): WebResourceResponse? { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NetworkHelper @Inject constructor( | |
private val wifiManager: WifiManager | |
) { | |
fun connectToWifi(ssid: String, key: String) { | |
when { | |
Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q -> { | |
// Remove possible conflicting network suggestions as we're not allowed to edit them | |
wifiManager.removeNetworkSuggestions( | |
listOf( | |
WifiNetworkSuggestion.Builder() |