Skip to content

Commit

Permalink
ADST-221 (#315)
Browse files Browse the repository at this point in the history
* added hyperlink ammendments

* added default and custom outcomes

* added string resources

* added string resources
  • Loading branch information
aman-alfresco authored Mar 5, 2024
1 parent d3a6090 commit ce31d09
Show file tree
Hide file tree
Showing 38 changed files with 1,195 additions and 828 deletions.
1 change: 1 addition & 0 deletions auth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dependencies {
implementation project(':base-ui')
implementation project(':theme')
implementation project(':data')
implementation project(':common')

implementation libs.kotlin.stdlib

Expand Down
45 changes: 10 additions & 35 deletions auth/src/main/kotlin/com/alfresco/ui/SplashActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ import android.os.Handler
import android.os.Looper
import androidx.appcompat.app.AppCompatActivity
import com.alfresco.android.aims.R
import com.alfresco.content.common.SharedURLParser
import com.alfresco.content.common.SharedURLParser.Companion.ID_KEY
import com.alfresco.content.common.SharedURLParser.Companion.KEY_FOLDER
import com.alfresco.content.common.SharedURLParser.Companion.MODE_KEY
import com.alfresco.content.common.SharedURLParser.Companion.VALUE_REMOTE
import com.alfresco.content.common.SharedURLParser.Companion.VALUE_SHARE
import com.alfresco.content.data.rooted.CheckForRootWorker
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import java.net.URLDecoder

abstract class SplashActivity : AppCompatActivity() {

Expand All @@ -22,7 +27,10 @@ abstract class SplashActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
if (intent.data != null && intent.flags and Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY == 0) {
// Handle the url passed through the intent
entryId = getEntryIdFromShareURL()
val urlData = SharedURLParser().getEntryIdFromShareURL(intent.data.toString())
isRemoteFolder = urlData.third
entryId = urlData.second
isPreview = urlData.first
}
setContentView(R.layout.activity_alfresco_splash)
}
Expand All @@ -34,28 +42,6 @@ abstract class SplashActivity : AppCompatActivity() {
handler.removeCallbacksAndMessages(null)
}

private fun getEntryIdFromShareURL(): String {
isPreview = false
isRemoteFolder = false
val extData = URLDecoder.decode(intent.data.toString(), "UTF-8")

if (!extData.contains(SCHEME)) return ""

if (extData.contains(IDENTIFIER_PREVIEW)) {
isPreview = true
return extData.substringAfter(SCHEME)
}

if (!extData.contains(IDENTIFIER_PERSONAL_FILES)) return ""

return if (extData.contains(IDENTIFIER_VIEWER)) {
extData.substringAfter(IDENTIFIER_VIEWER).substringBefore(DELIMITER_BRACKET)
} else {
isRemoteFolder = true
extData.substringAfter(IDENTIFIER_PERSONAL_FILES).substringBefore(DELIMITER_FORWARD_SLASH)
}
}

override fun onResume() {
super.onResume()

Expand Down Expand Up @@ -90,16 +76,5 @@ abstract class SplashActivity : AppCompatActivity() {

companion object {
private const val DISPLAY_TIMEOUT = 100L
private const val ID_KEY = "id"
private const val MODE_KEY = "mode"
private const val VALUE_REMOTE = "remote"
private const val VALUE_SHARE = "share"
const val KEY_FOLDER = "folder"
const val SCHEME = "androidamw:///"
const val IDENTIFIER_PREVIEW = "/preview"
const val IDENTIFIER_VIEWER = "viewer:view/"
const val IDENTIFIER_PERSONAL_FILES = "/personal-files/"
const val DELIMITER_BRACKET = ")"
const val DELIMITER_FORWARD_SLASH = "/"
}
}
64 changes: 32 additions & 32 deletions capture/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="close_button_alt">Schließen</string>
<string name="capture_button_alt">Aufnehmen</string>
<string name="switch_camera_button_alt">Kamera wechseln</string>
<string name="gallery_button_alt">Gallerie</string>
<string name="flash_button_alt">Blitzlicht-Modus</string>

<string name="capture_mode_photo">Foto</string>
<string name="capture_mode_video">Video</string>

<string name="capture_photo_preview_alt">Fotovorschau</string>
<string name="capture_file_name_hint">Dateiname</string>
<string name="capture_description_hint">Beschreibung</string>
<string name="capture_delete_photo_alt">Foto löschen</string>
<string name="capture_save_button">Speichern</string>
<string name="capture_file_name_invalid_chars">Der Dateiname darf keines der folgenden Zeichen enthalten: ?:\"*|/\&lt;></string>
<string name="capture_file_name_empty">Der Dateiname darf nicht leer sein.</string>

<string name="capture_nav_save_title">Vorschau</string>

<string name="camera_flash_auto">Audio</string>
<string name="camera_flash_on">An</string>
<string name="camera_flash_off">Aus</string>

<string name="capture_permissions_rationale">@string/capture_failure_permissions</string>
<string name="capture_failure_permissions">Für Medienaufnahmen müssen die Berechtigungen zur Nutzung von Kamera und Mikrofon erteilt werden.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">Die ausgewählte Dateigröße darf beim Hochladen 100 MB nicht überschreiten.</string>

</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="close_button_alt">Schließen</string>
<string name="capture_button_alt">Aufnehmen</string>
<string name="switch_camera_button_alt">Kamera wechseln</string>
<string name="gallery_button_alt">Gallerie</string>
<string name="flash_button_alt">Blitzlicht-Modus</string>

<string name="capture_mode_photo">Foto</string>
<string name="capture_mode_video">Video</string>

<string name="capture_photo_preview_alt">Fotovorschau</string>
<string name="capture_file_name_hint">Dateiname</string>
<string name="capture_description_hint">Beschreibung</string>
<string name="capture_delete_photo_alt">Foto löschen</string>
<string name="capture_save_button">Speichern</string>
<string name="capture_file_name_invalid_chars">Der Dateiname darf keines der folgenden Zeichen enthalten: ?:\"*|/\&lt;></string>
<string name="capture_file_name_empty">Der Dateiname darf nicht leer sein.</string>

<string name="capture_nav_save_title">Vorschau</string>

<string name="camera_flash_auto">Audio</string>
<string name="camera_flash_on">An</string>
<string name="camera_flash_off">Aus</string>

<string name="capture_permissions_rationale">@string/capture_failure_permissions</string>
<string name="capture_failure_permissions">Für Medienaufnahmen müssen die Berechtigungen zur Nutzung von Kamera und Mikrofon erteilt werden.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">Die ausgewählte Dateigröße darf beim Hochladen 100 MB nicht überschreiten.</string>

</resources>
64 changes: 32 additions & 32 deletions capture/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="close_button_alt">Cerrar</string>
<string name="capture_button_alt">Tomar foto</string>
<string name="switch_camera_button_alt">Cambiar de cámara</string>
<string name="gallery_button_alt">Galería</string>
<string name="flash_button_alt">Modo con flash</string>

<string name="capture_mode_photo">Foto</string>
<string name="capture_mode_video">Vídeo</string>

<string name="capture_photo_preview_alt">Vista previa de foto</string>
<string name="capture_file_name_hint">Nombre de fichero</string>
<string name="capture_description_hint">Añadir descripción</string>
<string name="capture_delete_photo_alt">Eliminar foto</string>
<string name="capture_save_button">Guardar</string>
<string name="capture_file_name_invalid_chars">El nombre del fichero no puede contener ninguno de los siguientes caracteres: ?: \"*|/\&lt;></string>
<string name="capture_file_name_empty">El nombre del fichero no puede estar vacío.</string>

<string name="capture_nav_save_title">Vista previa</string>

<string name="camera_flash_auto">Automático</string>
<string name="camera_flash_on">Encendido</string>
<string name="camera_flash_off">Apagado</string>

<string name="capture_permissions_rationale">@string/capture_failure_permissions</string>
<string name="capture_failure_permissions">Para tomar fotos o grabar vídeos, active los permisos de Cámara y Micrófono.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">El tamaño del fichero seleccionado no puede superar los 100 MB para cargarlo.</string>

</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="close_button_alt">Cerrar</string>
<string name="capture_button_alt">Tomar foto</string>
<string name="switch_camera_button_alt">Cambiar de cámara</string>
<string name="gallery_button_alt">Galería</string>
<string name="flash_button_alt">Modo con flash</string>

<string name="capture_mode_photo">Foto</string>
<string name="capture_mode_video">Vídeo</string>

<string name="capture_photo_preview_alt">Vista previa de foto</string>
<string name="capture_file_name_hint">Nombre de fichero</string>
<string name="capture_description_hint">Añadir descripción</string>
<string name="capture_delete_photo_alt">Eliminar foto</string>
<string name="capture_save_button">Guardar</string>
<string name="capture_file_name_invalid_chars">El nombre del fichero no puede contener ninguno de los siguientes caracteres: ?: \"*|/\&lt;></string>
<string name="capture_file_name_empty">El nombre del fichero no puede estar vacío.</string>

<string name="capture_nav_save_title">Vista previa</string>

<string name="camera_flash_auto">Automático</string>
<string name="camera_flash_on">Encendido</string>
<string name="camera_flash_off">Apagado</string>

<string name="capture_permissions_rationale">@string/capture_failure_permissions</string>
<string name="capture_failure_permissions">Para tomar fotos o grabar vídeos, active los permisos de Cámara y Micrófono.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">El tamaño del fichero seleccionado no puede superar los 100 MB para cargarlo.</string>

</resources>
64 changes: 32 additions & 32 deletions capture/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="close_button_alt">Fermer</string>
<string name="capture_button_alt">Capture</string>
<string name="switch_camera_button_alt">Changer de caméra</string>
<string name="gallery_button_alt">Galerie</string>
<string name="flash_button_alt">Modèle de flash</string>

<string name="capture_mode_photo">Photo</string>
<string name="capture_mode_video">Vidéo</string>

<string name="capture_photo_preview_alt">Aperçu de la photo</string>
<string name="capture_file_name_hint">Nom de fichier</string>
<string name="capture_description_hint">Ajouter une description</string>
<string name="capture_delete_photo_alt">Supprimer la photo</string>
<string name="capture_save_button">Enregistrer</string>
<string name="capture_file_name_invalid_chars">Le nom de fichier ne peut pas contenir les caractères suivants : ?:\"*|/\&lt;></string>
<string name="capture_file_name_empty">Le nom du fichier ne peut pas être vide.</string>

<string name="capture_nav_save_title">Aperçu</string>

<string name="camera_flash_auto">Auto</string>
<string name="camera_flash_on">Activé</string>
<string name="camera_flash_off">Désactivé</string>

<string name="capture_permissions_rationale">@string/capture_failure_permissions</string>
<string name="capture_failure_permissions">Pour capturer des médias, activez les autorisations de l\'appareil photo et du microphone.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">La taille du fichier sélectionné pour importation ne peut pas dépasser 100 Mo.</string>

</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="close_button_alt">Fermer</string>
<string name="capture_button_alt">Capture</string>
<string name="switch_camera_button_alt">Changer de caméra</string>
<string name="gallery_button_alt">Galerie</string>
<string name="flash_button_alt">Modèle de flash</string>

<string name="capture_mode_photo">Photo</string>
<string name="capture_mode_video">Vidéo</string>

<string name="capture_photo_preview_alt">Aperçu de la photo</string>
<string name="capture_file_name_hint">Nom de fichier</string>
<string name="capture_description_hint">Ajouter une description</string>
<string name="capture_delete_photo_alt">Supprimer la photo</string>
<string name="capture_save_button">Enregistrer</string>
<string name="capture_file_name_invalid_chars">Le nom de fichier ne peut pas contenir les caractères suivants : ?:\"*|/\&lt;></string>
<string name="capture_file_name_empty">Le nom du fichier ne peut pas être vide.</string>

<string name="capture_nav_save_title">Aperçu</string>

<string name="camera_flash_auto">Auto</string>
<string name="camera_flash_on">Activé</string>
<string name="camera_flash_off">Désactivé</string>

<string name="capture_permissions_rationale">@string/capture_failure_permissions</string>
<string name="capture_failure_permissions">Pour capturer des médias, activez les autorisations de l\'appareil photo et du microphone.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">La taille du fichier sélectionné pour importation ne peut pas dépasser 100 Mo.</string>

</resources>
64 changes: 32 additions & 32 deletions capture/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="close_button_alt">Chiudi</string>
<string name="capture_button_alt">Acquisisci</string>
<string name="switch_camera_button_alt">Passa dalla fotocamera anteriore a quella posteriore</string>
<string name="gallery_button_alt">Galleria</string>
<string name="flash_button_alt">Modalità flash</string>

<string name="capture_mode_photo">Foto</string>
<string name="capture_mode_video">Video</string>

<string name="capture_photo_preview_alt">Anteprima foto</string>
<string name="capture_file_name_hint">Nome file</string>
<string name="capture_description_hint">Aggiungi descrizione</string>
<string name="capture_delete_photo_alt">Elimina foto</string>
<string name="capture_save_button">Salva</string>
<string name="capture_file_name_invalid_chars">Il nome del file non può contenere i caratteri seguenti: ?:\"*|/\&lt;></string>
<string name="capture_file_name_empty">Il nome file non può essere vuoto.</string>

<string name="capture_nav_save_title">Anteprima</string>

<string name="camera_flash_auto">Automatico</string>
<string name="camera_flash_on">Attiva</string>
<string name="camera_flash_off">Disattiva</string>

<string name="capture_permissions_rationale">@string/capture_failure_permissions</string>
<string name="capture_failure_permissions">Per acquisire i contenuti multimediali, abilitare le autorizzazioni per la fotocamera e il microfono.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">Le dimensioni del file selezionato per il caricamento non possono superare 100 MB.</string>

</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="close_button_alt">Chiudi</string>
<string name="capture_button_alt">Acquisisci</string>
<string name="switch_camera_button_alt">Passa dalla fotocamera anteriore a quella posteriore</string>
<string name="gallery_button_alt">Galleria</string>
<string name="flash_button_alt">Modalità flash</string>

<string name="capture_mode_photo">Foto</string>
<string name="capture_mode_video">Video</string>

<string name="capture_photo_preview_alt">Anteprima foto</string>
<string name="capture_file_name_hint">Nome file</string>
<string name="capture_description_hint">Aggiungi descrizione</string>
<string name="capture_delete_photo_alt">Elimina foto</string>
<string name="capture_save_button">Salva</string>
<string name="capture_file_name_invalid_chars">Il nome del file non può contenere i caratteri seguenti: ?:\"*|/\&lt;></string>
<string name="capture_file_name_empty">Il nome file non può essere vuoto.</string>

<string name="capture_nav_save_title">Anteprima</string>

<string name="camera_flash_auto">Automatico</string>
<string name="camera_flash_on">Attiva</string>
<string name="camera_flash_off">Disattiva</string>

<string name="capture_permissions_rationale">@string/capture_failure_permissions</string>
<string name="capture_failure_permissions">Per acquisire i contenuti multimediali, abilitare le autorizzazioni per la fotocamera e il microfono.</string>
<string name="format_video_duration_hour" translatable="false">%02d:%02d:%02d</string>
<string name="format_video_duration_minute" translatable="false">%02d:%02d</string>
<string name="error_file_size_exceed">Le dimensioni del file selezionato per il caricamento non possono superare 100 MB.</string>

</resources>
Loading

0 comments on commit ce31d09

Please sign in to comment.