* Enables and shows the oauth view if there is login via social accounts enabled by the server settings.
* Enables and shows the oauth view if there is login via social accounts enabled by the server settings.
*
*
* REMARK: We must show at maximum *three* social accounts views ([enableLoginByFacebook], [enableLoginByGithub], [enableLoginByGoogle],
* REMARK: We must show at maximum *three* social accounts views ([enableLoginByFacebook], [enableLoginByGithub], [enableLoginByGoogle],
* [enableLoginByLinkedin], [enableLoginByMeteor], [enableLoginByTwitter] or [enableLoginByGitlab]) for the oauth view.
* [enableLoginByLinkedin], [enableLoginByMeteor], [enableLoginByTwitter], [enableLoginByGitlab] or [addCustomOauthServiceButton]) for the oauth view.
* If the possibility of login via social accounts exceeds 3 different ways we should set up the FAB ([setupFabListener]) to show the remaining view(s).
* If the possibility of login via social accounts exceeds 3 different ways we should set up the FAB ([setupFabListener]) to show the remaining view(s).
@@ -78,6 +78,7 @@ class OauthWebViewActivity : AppCompatActivity() {
...
@@ -78,6 +78,7 @@ class OauthWebViewActivity : AppCompatActivity() {
privatefunsetupWebView(){
privatefunsetupWebView(){
with(web_view.settings){
with(web_view.settings){
javaScriptEnabled=true
javaScriptEnabled=true
domStorageEnabled=true
// TODO Remove this workaround that is required to make Google OAuth to work. We should use Custom Tabs instead. See https://github.com/RocketChat/Rocket.Chat.Android/issues/968
// TODO Remove this workaround that is required to make Google OAuth to work. We should use Custom Tabs instead. See https://github.com/RocketChat/Rocket.Chat.Android/issues/968
if(webPageUrl.contains("google")){
if(webPageUrl.contains("google")){
userAgentString="Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/43.0.2357.65 Mobile Safari/535.19"
userAgentString="Mozilla/5.0 (Linux; Android 4.1.1; Galaxy Nexus Build/JRO03C) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/43.0.2357.65 Mobile Safari/535.19"
<stringname="msg_no_messages_yet">Aún no hay mensajes</string>
<stringname="msg_version">Version %1$s</string>
<stringname="msg_version">Versión %1$s</string>
<stringname="msg_build">Build %1$d</string>
<stringname="msg_build">Build %1$d</string>
<stringname="msg_ok">OK</string>
<stringname="msg_ok">OK</string>
<stringname="msg_ver_not_recommended">
<stringname="msg_ver_not_recommended">
Looks like your server version is below the recommended version %1$s.\nYou can still login but you may experience unexpected behaviors.</string>
Parece que la versión de tu servidor está por debajo de la versión recomendada %1$s.\nAún puede iniciar sesión, pero puede experimentar comportamientos inesperados.</string>
<stringname="msg_ver_not_minimum">
<stringname="msg_ver_not_minimum">
Looks like your server version is below the minimum required version %1$s.\nPlease upgrade your server to login!
Parece que la versión del servidor está por debajo de la versión mínima requerida %1$s.\nActualice su servidor para iniciar sesión!
</string>
</string>
<stringname="msg_proceed">PROCEED</string>
<stringname="msg_proceed">PROCEDER</string>
<stringname="msg_cancel">CANCEL</string>
<stringname="msg_cancel">CANCELAR</string>
<stringname="msg_warning">WARNING</string>
<stringname="msg_warning">ADVERTENCIA</string>
<stringname="msg_http_insecure">When using HTTP, you\'re connecting to an insecure server. We don\'t recommend you doing that.</string>
<stringname="msg_http_insecure">Al usar HTTP, te estás conectando a un servidor inseguro. No te recomendamos que hagas eso.</string>
<stringname="msg_error_checking_server_version">An error has occurred while checking your server version, please try again</string>
<stringname="msg_error_checking_server_version">Se ha producido un error al verificar la versión de su servidor, intente de nuevo</string>
<stringname="msg_invalid_server_protocol">The selected protocol is not accepted by this server, try using HTTPS</string>
<stringname="msg_invalid_server_protocol">El protocolo seleccionado no es aceptado por este servidor, intente usar HTTPS</string>
<!-- System messages -->
<!-- System messages -->
<stringname="message_room_name_changed">Room name changed to: %1$s by %2$s</string>
<stringname="message_room_name_changed">Nombre de la sala cambiado para: %1$s por %2$s</string>
<stringname="message_user_added_by">User %1$s added by %2$s</string>
<stringname="message_user_added_by">Usuario %1$s añadido por %2$s</string>
<stringname="message_user_removed_by">User %1$s removed by %2$s</string>
<stringname="message_user_removed_by">Usuario %1$s eliminado por %2$s</string>
<stringname="message_user_left">Has left the channel.</string>
<stringname="message_user_left">Ha salido del canal.</string>
<stringname="message_user_joined_channel">Has joined the channel.</string>
<stringname="message_user_joined_channel">Se ha unido al canal.</string>
<stringname="msg_no_messages_yet">Aucun message pour le moment</string>
<stringname="msg_version">Version %1$s</string>
<stringname="msg_version">Version %1$s</string>
<stringname="msg_build">Build %1$d</string>
<stringname="msg_build">Build %1$d</string>
<stringname="msg_ok">OK</string>
<stringname="msg_ok">OK</string>
<stringname="msg_ver_not_recommended">
<stringname="msg_ver_not_recommended">
Looks like your server version is below the recommended version %1$s.\nYou can still login but you may experience unexpected behaviors.</string>
On dirait que la version de votre serveur est en dessous de la version recommandée %1$s.\nVous pouvez toujours vous connecter mais vous pouvez rencontrer des comportements inattendus.</string>
<stringname="msg_ver_not_minimum">
<stringname="msg_ver_not_minimum">
Looks like your server version is below the minimum required version %1$s.\nPlease upgrade your server to login!
On dirait que la version de votre serveur est inférieure à la version minimale requise %1$s.\nVeuillez mettre à jour votre serveur pour vous connecter!
</string>
</string>
<stringname="msg_proceed">PROCEED</string>
<stringname="msg_proceed">PROCÉDER</string>
<stringname="msg_cancel">CANCEL</string>
<stringname="msg_cancel">ANNULER</string>
<stringname="msg_warning">WARNING</string>
<stringname="msg_warning">ATTENTION</string>
<stringname="msg_http_insecure">When using HTTP, you\'re connecting to an insecure server. We don\'t recommend you doing that.</string>
<stringname="msg_http_insecure">Lorsque vous utilisez HTTP, vous vous connectez à un serveur non sécurisé. Nous ne vous recommandons pas de le faire.</string>
<stringname="msg_error_checking_server_version">An error has occurred while checking your server version, please try again</string>
<stringname="msg_error_checking_server_version">Une erreur est survenue lors de la vérification de la version de votre serveur, veuillez réessayer</string>
<stringname="msg_invalid_server_protocol">The selected protocol is not accepted by this server, try using HTTPS</string>
<stringname="msg_invalid_server_protocol">Le protocole sélectionné n\'est pas accepté par ce serveur, essayez d\'utiliser HTTPS</string>
<!-- System messages -->
<!-- System messages -->
<stringname="message_room_name_changed">Room name changed to: %1$s by %2$s</string>
<stringname="message_room_name_changed">Le nom de le salle a changé à: %1$s par %2$s</string>
<stringname="message_user_added_by">User %1$s added by %2$s</string>
<stringname="message_user_added_by">Utilisateur %1$s ajouté par %2$s</string>
<stringname="message_user_removed_by">User %1$s removed by %2$s</string>
<stringname="message_user_removed_by">Utilisateur %1$s enlevé par %2$s</string>
<stringname="message_user_left">Has left the channel.</string>
<stringname="message_user_left">A quitté de la salle.</string>
<stringname="message_user_joined_channel">Has joined the channel.</string>
<stringname="message_user_joined_channel">A rejoint la salle.</string>