Your Rocket.Chat.Android version: (make sure you are running the latest)
<!-- Version can be found by opening the side menu and then clicking on the chevron alongside username -->
## Description
<!-- Please, describe what's the issue here. -->
## Devices and Versions
<!-- Version can be found by opening the side menu and then clicking on "Settings" and then "About" -->
Your Rocket.Chat.Android version: (e.g. 2.1.0)
Your Rocket.Chat Server version: (e.g. 0.63.1-develop)
<!-- Found a bug? List all devices that reproduced it and all that doesn't -->
Mobile device model and OS version: (e.g. "Nexus 7 - Android 6.0.1")
<!-- Don't forget to list the steps to reproduce. Stack traces may help too :) -->
## Steps to reproduce
<!-- In case it is a bug, can you describe the steps to reproduce it please? -->
## Logs
<!-- Do you have any logs? It can help the developers indentifying the cause in case it's a bug. -->
<!-- To get the logs, you can use [Logcat](https://developer.android.com/studio/debug/am-logcat.html) in Android Studio or you can use [Pidcat](https://github.com/JakeWharton/pidcat) -->
Currently, the app is maintained in two branches, namely `v1+` and `v2+`. The `v1+` is maintained in the `develop` branch and the `v2+` is maintained in the `develop-2.x` branch. The older version is written partially in `java` and `kotlin`, but we intend to write the latest version completely in `kotlin`.
Clone the repository by running `git clone https://github.com/RocketChat/Rocket.Chat.Android.git` in your terminal. To build the v1.0+ of the app, run `git checkout develop` and to build the v2.0+, run `git checkout develop-2.x`.
Since both the versions use `kotlin` for some or all of their classes, following are the common prerequisites for both versions:
This repository contains all the code related to the Android native application of [Rocket.Chat](https://github.com/RocketChat/Rocket.Chat/#about-rocketchat). To send new pull-requests, always use the branch `develop` as base and open an issue with the description of what you want/need to accomplish, if the issue wasn't created yet.
## How to build
- Android Studio 3.0+ comes with built in kotlin support, so install the latest version (3.0+) of Android Studio (recommended). For older versions, you need to manually install kotlin plugin. Go to `File > Settings > Plugins` and search for `kotlin` and install it. You'll need to restart the IDE in order to see the changes.
- Make sure that you have the latest **gradle** and the **android plugin** versions installed. Go to `File > Project Structure > Project` and make sure that you have the latest versions installed. Refer [this](https://developer.android.com/studio/releases/gradle-plugin.html#updating-gradle) to see the compatible versions.
- Kotlin is already configured in the project. To check, go to `Tools > Kotlin > Configure Kotlin in project`. A message saying kotlin is already configured in the project pops up. You can update kotlin to the latest version by going to `Tools > Kotlin > Configure Kotlin updates` and download the latest version of kotlin.
### Instructions specific to version
#### v1.0+
- After checking out to `develop` branch as mentioned above, simply import the project in Android Studio.
### SDK Instructions
#### v2+
- This version requires the [Kotlin SDK](https://github.com/RocketChat/Rocket.Chat.Kotlin.SDK) for Rocket.Chat. Clone the Kotlin SDK in by running `git clone https://github.com/RocketChat/Rocket.Chat.Kotlin.SDK.git`.
- First, a build is required for the SDK, so that required jar files are generated. Make sure that the android repository and the kotlin sdk have the same immediate parent directory. Change the current directory to `Rocket.Chat.Android/app` and run the `build-sdk.sh` which will result in creating of the required jar file `core*.jar` and `common*.jar` in `Rocket.Chat.Android/app/libs`,by the following steps in your terminal window:
```
cd Rocket.Chat.Android/app
./build-sdk.sh
```
## How to run
### Command Line
- Connect your physical device to your pc via USB or start an emulator. Run `adb devices` in terminal. You should see your device in the list of devices.
- In order to build the debug apk, run `./gradlew assembleDebug`. This would generate a debug apk which can be found under `Rocket.Chat.Android/app/build/outputs/apk/debug` folder with the name `app-debug.apk`.
- In order to build and install the apk directly to the connected device, run `./gradlew installDebug`.
### Android Studio
- After importing the project in android studio, go to `Run > Run app` and then select your device, or create a new virtual device by following the wizard.
* 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],
* [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).
// Shows a WebView to the user authenticate with your Gitlab credentials.
// Shows a WebView to the user authenticate with its OAuth credential.
classOauthWebViewActivity:AppCompatActivity(){
privatelateinitvarwebPageUrl:String
privatelateinitvarstate:String
...
...
@@ -78,6 +78,7 @@ class OauthWebViewActivity : AppCompatActivity() {
privatefunsetupWebView(){
with(web_view.settings){
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
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"
<stringname="msg_new_password">Introduzca nueva contraseña</string>
<stringname="msg_confirm_password">Confirmar nueva contraseña</string>
<stringname="msg_unread_messages">Mensajes no leídos</string>
<stringname="msg_preview_video">Vídeo</string>
<stringname="msg_preview_audio">Audio</string>
<stringname="msg_preview_photo">Foto</string>
<stringname="msg_preview_file">Fichero</string>
<stringname="msg_no_messages_yet">Aún no hay mensajes</string>
<stringname="msg_version">Versión %1$s</string>
<stringname="msg_build">Build %1$d</string>
<stringname="msg_ok">OK</string>
// TODO: Add proper translation.
<stringname="msg_update_app_version_in_order_to_continue">Out to date server version. Please contact the server admin to update the server version in order to continue.</string>
<stringname="msg_ver_not_recommended">
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">
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>
<stringname="msg_proceed">PROCEDER</string>
<stringname="msg_cancel">CANCELAR</string>
<stringname="msg_warning">ADVERTENCIA</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">Se ha producido un error al verificar la versión de su servidor, intente de nuevo</string>
<stringname="msg_invalid_server_protocol">El protocolo seleccionado no es aceptado por este servidor, intente usar HTTPS</string>
<stringname="msg_image_saved_successfully">La imagen se ha guardado en la galería</string>
<stringname="msg_image_saved_failed">Error al guardar la imagen</string>
<stringname="msg_no_chat_title">Sin mensajes de chat</string>
<stringname="msg_no_chat_description">Comience a conversar para ver\nsus mensajes aquí.</string>
<!-- System messages -->
<stringname="message_room_name_changed">Nombre de la sala cambiado para: %1$s por %2$s</string>
<stringname="message_user_added_by">Usuario %1$s añadido por %2$s</string>
<stringname="message_user_removed_by">Usuario %1$s eliminado por %2$s</string>
<stringname="message_user_left">Ha salido del canal.</string>
<stringname="message_user_joined_channel">Se ha unido al canal.</string>
<stringname="msg_new_password">Entrez un nouveau mot de passe</string>
<stringname="msg_confirm_password">Confirmer le nouveau mot de passe</string>
<stringname="msg_unread_messages">Messages non lus</string>
<stringname="msg_preview_video">Vidéo</string>
<stringname="msg_preview_audio">Audio</string>
<stringname="msg_preview_photo">Photo</string>
<stringname="msg_preview_file">File</string>
<stringname="msg_no_messages_yet">Aucun message pour le moment</string>
<stringname="msg_version">Version %1$s</string>
<stringname="msg_build">Build %1$d</string>
<stringname="msg_ok">OK</string>
// TODO: Add proper translation.
<stringname="msg_update_app_version_in_order_to_continue">Out to date server version. Please contact the server admin to update the server version in order to continue.</string>
<stringname="msg_ver_not_recommended">
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">
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>
<stringname="msg_proceed">PROCÉDER</string>
<stringname="msg_cancel">ANNULER</string>
<stringname="msg_warning">ATTENTION</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">Une erreur est survenue lors de la vérification de la version de votre serveur, veuillez réessayer</string>
<stringname="msg_invalid_server_protocol">Le protocole sélectionné n\'est pas accepté par ce serveur, essayez d\'utiliser HTTPS</string>
<stringname="msg_image_saved_successfully">L\'image a été enregistrée dans la galerie</string>
<stringname="msg_image_saved_failed">Échec de l\'enregistrement de l\'image</string>
<stringname="msg_no_chat_title">Aucun message de discussion</string>
<stringname="msg_no_chat_description">Commencez à converser pour voir\nvos messages ici.</string>
<!-- System messages -->
<stringname="message_room_name_changed">Le nom de le salle a changé à: %1$s par %2$s</string>
<stringname="message_user_added_by">Utilisateur %1$s ajouté par %2$s</string>
<stringname="message_user_removed_by">Utilisateur %1$s enlevé par %2$s</string>
<stringname="message_user_left">A quitté de la salle.</string>
<stringname="message_user_joined_channel">A rejoint la salle.</string>
<stringname="msg_no_messages_yet">अभी तक कोई पोस्ट नहीं</string>
<stringname="msg_version">वर्शन %1$s</string>
<stringname="msg_build">बिल्ड %1$d</string>
// TODO: Add proper translation.
<stringname="msg_update_app_version_in_order_to_continue">Out to date server version. Please contact the server admin to update the server version in order to continue.</string>
<stringname="msg_ok">OK</string>
<stringname="msg_ver_not_recommended">
ऐसा लगता है कि आपका सर्वर संस्करण अनुशंसित संस्करण %1$s के नीचे है।\nआप अभी भी लॉगिन कर सकते हैं लेकिन आप अप्रत्याशित व्यवहार का अनुभव कर सकते हैं
...
...
@@ -87,8 +102,16 @@
<stringname="msg_ver_not_minimum">
ऐसा लगता है कि आपका सर्वर संस्करण न्यूनतम आवश्यक संस्करण %1$s से कम है।\nकृपया लॉगिन करने के लिए अपने सर्वर को अपग्रेड करें!
</string>
<stringname="msg_version">वर्शन</string>
<stringname="msg_build">बिल्ड</string>
<stringname="msg_proceed">आगे बढ़ें</string>
<stringname="msg_cancel">रद्द करना</string>
<stringname="msg_warning">चेतावनी</string>
<stringname="msg_http_insecure">HTTP का उपयोग करते समय, आप एक असुरक्षित सर्वर से कनेक्ट हो रहे हैं। हम आपको ऐसा करने की सलाह नहीं देते हैं।</string>
<stringname="msg_error_checking_server_version">आपके सर्वर संस्करण की जांच करते समय एक त्रुटि आई है, कृपया पुनः प्रयास करें</string>
<stringname="msg_invalid_server_protocol">चयनित प्रोटोकॉल इस सर्वर द्वारा स्वीकार नहीं किया गया है, HTTPS का उपयोग करने का प्रयास करें</string>
<stringname="msg_image_saved_successfully">छवि गैलरी में सहेजा गया है</string>
<stringname="msg_image_saved_failed">छवि को सहेजने में विफल</string>
<stringname="msg_no_chat_title">कोई चैट संदेश नहीं</string>
<stringname="msg_no_chat_description">यहां अपने संदेश देखने के लिए\nबातचीत शुरू करें।</string>
<!-- System messages -->
<stringname="message_room_name_changed">%2$s ने रूम का नाम बदलकर %1$s किया</string>
<stringname="msg_update_app_version_in_order_to_continue">Versão do servidor desatualizada. Por favor, entre em contato com o administrador do sistema para continuar.</string>
<stringname="msg_ver_not_recommended">
Parece que a versão do seu servidor está abaixo da recomendada %1$s.\nVocê ainda assim pode logar e continuar mas podem ocorrer alguns problemas inesperados.
</string>
<stringname="msg_ver_not_minimum">
Parece que a versão do seu servidor está abaixo da mínima requerida %1$s.\nPor favor, atualize seus servidores antes de continuar!
</string>
<stringname="msg_no_chat_title">Nenhuma mensagem de chat</string>
<stringname="msg_no_chat_description">Comece a conversar para ver suas\nmensagens aqui.</string>
<stringname="msg_proceed">CONTINUAR</string>
<stringname="msg_cancel">CANCELAR</string>
<stringname="msg_warning">AVISO</string>
<stringname="msg_http_insecure">Usando HTTP, você estará conectando a um servidor não seguro, não recomendamos sua utilização.</string>
<stringname="msg_error_checking_server_version">Ocorreu um erro verificando a versão do servidor, por favor tente novamente</string>
<stringname="msg_invalid_server_protocol">O protocolo selecionado não é suportado pelo servidor, por favor utilize HTTPS e tente novamente</string>
<stringname="msg_image_saved_successfully">Imagem salva na galeria</string>
<stringname="msg_image_saved_failed">Falha ao salvar a imagem</string>
<!-- System messages -->
<stringname="message_room_name_changed">Nome da sala alterado para: %1$s por %2$s</string>
<stringname="message_user_added_by">Usuário %1$s adicionado por %2$s</string>
<stringname="message_user_removed_by">Usuário %1$s removido por %2$s</string>
<stringname="message_user_left">Saiu da sala.</string>
<stringname="message_user_joined_channel">Entrou no sala.</string>
<stringname="message_user_joined_channel">Entrou na sala.</string>
<stringname="msg_update_app_version_in_order_to_continue">Out to date server version. Please contact the server admin to update the server version in order to continue.</string>
<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>
<stringname="msg_ver_not_minimum">
Looks like your server version is below the minimum required version %1$s.\nPlease upgrade your server to login!