diff --git a/android/app/src/main/java/app/eduroam/geteduroam/models/Profile.kt b/android/app/src/main/java/app/eduroam/geteduroam/models/Profile.kt index ad03300..a495c77 100644 --- a/android/app/src/main/java/app/eduroam/geteduroam/models/Profile.kt +++ b/android/app/src/main/java/app/eduroam/geteduroam/models/Profile.kt @@ -22,7 +22,9 @@ data class Profile( val redirect: String? = null, val type: Type = Profile.Type.unknown, @SerialName("letswifi_endpoint") - val letswifiEndpoint: String? = null + val letswifiEndpoint: String? = null, + @SerialName("webview_endpoint") + val webviewEndpoint: String? = null ) : Parcelable { @Serializable @@ -31,6 +33,8 @@ data class Profile( letswifi, @SerialName("eap-config") eapConfig, + @SerialName("webview") + webview, unknown } diff --git a/android/app/src/main/java/app/eduroam/geteduroam/profile/SelectProfileViewModel.kt b/android/app/src/main/java/app/eduroam/geteduroam/profile/SelectProfileViewModel.kt index 151dc26..4097ce8 100644 --- a/android/app/src/main/java/app/eduroam/geteduroam/profile/SelectProfileViewModel.kt +++ b/android/app/src/main/java/app/eduroam/geteduroam/profile/SelectProfileViewModel.kt @@ -245,6 +245,11 @@ class SelectProfileViewModel @Inject constructor( inProgress = false, openUrlInBrowser = profile.redirect ) + } else if (profile.type == Profile.Type.webview && !profile.webviewEndpoint.isNullOrEmpty()) { + uiState = uiState.copy( + inProgress = false, + openUrlInBrowser = profile.webviewEndpoint + ) } else { Timber.w("Missing EAP endpoint in profile configuration. Cannot continue with selected profile.") uiState = uiState.copy(