reuse the shared openFile way of opening last media file
This commit is contained in:
parent
7320798931
commit
3d38b071d2
|
@ -93,5 +93,15 @@
|
|||
<action android:name="android.intent.action.CAMERA_BUTTON"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<provider
|
||||
android:name="android.support.v4.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/provider_paths"/>
|
||||
</provider>
|
||||
</application>
|
||||
</manifest>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.simplemobiletools.camera.activities
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.ActivityNotFoundException
|
||||
import android.content.Intent
|
||||
import android.content.res.Resources
|
||||
import android.hardware.Camera
|
||||
|
@ -198,20 +197,8 @@ class MainActivity : SimpleActivity(), PreviewListener, PhotoProcessor.MediaSave
|
|||
}
|
||||
|
||||
private fun showLastMediaPreview() {
|
||||
if (mPreviewUri == null)
|
||||
return
|
||||
|
||||
try {
|
||||
val REVIEW_ACTION = "com.android.camera.action.REVIEW"
|
||||
val intent = Intent(REVIEW_ACTION, mPreviewUri)
|
||||
startActivity(intent)
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
val intent = Intent(Intent.ACTION_VIEW, mPreviewUri)
|
||||
if (intent.resolveActivity(packageManager) != null) {
|
||||
startActivity(intent)
|
||||
} else {
|
||||
toast(R.string.no_gallery_app_available)
|
||||
}
|
||||
if (mPreviewUri != null) {
|
||||
openFile(mPreviewUri!!, false, BuildConfig.APPLICATION_ID)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Kamerawechsel fehlgeschlagen</string>
|
||||
<string name="no_permissions">Ohne Zugriff auf Kamera und Speicher ist hier nicht viel zu tun</string>
|
||||
<string name="no_audio_permissions">Wir benötigen Zugriff auf das Mikrofon um Videos aufnehmen zu können</string>
|
||||
<string name="no_gallery_app_available">Keine Galerie-App verfügbar</string>
|
||||
<string name="click_to_resume_preview">Klicke auf das Bild, um bei der Vorschau zu bleiben</string>
|
||||
<string name="photo_not_saved">Das Foto konnte nicht gespeichert werden</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Ha fallado el cambio de cámara</string>
|
||||
<string name="no_permissions">No hay mucho que hacer sin los permisos para acceder a la cámara y al almacenamiento</string>
|
||||
<string name="no_audio_permissions">Se necesita el permiso de micrófono para grabar vídeos</string>
|
||||
<string name="no_gallery_app_available">No hay disponible una aplicación de galería</string>
|
||||
<string name="click_to_resume_preview">Haga clic en la imagen para reanudar la vista previa</string>
|
||||
<string name="photo_not_saved">The photo could not be saved</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">La permutation de caméra a échouée</string>
|
||||
<string name="no_permissions">Peu de choses à faire sans accès à la caméra et à la mémoire</string>
|
||||
<string name="no_audio_permissions">Nous avons besoin de l\'autorisation sur l\'audio pour enregistrer des vidéos</string>
|
||||
<string name="no_gallery_app_available">Pas d\'application galerie disponible</string>
|
||||
<string name="click_to_resume_preview">Cliquer sur l\'image pour resume preview</string>
|
||||
<string name="photo_not_saved">La photo ne peut pas être sauvegardée</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Cambio fotocamera fallito</string>
|
||||
<string name="no_permissions">Non c\'è molto da fare senza l\'accesso alla fotocamera e all\'archiviazione</string>
|
||||
<string name="no_audio_permissions">È necessario l\'accesso al microfono per registrare i video</string>
|
||||
<string name="no_gallery_app_available">Nessuna app galleria disponibile</string>
|
||||
<string name="click_to_resume_preview">Click on the image to resume preview</string>
|
||||
<string name="photo_not_saved">The photo could not be saved</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">カメラの切り替えに失敗しました</string>
|
||||
<string name="no_permissions">お使いのカメラやストレージにアクセスしないと、ほとんど行うことはありません</string>
|
||||
<string name="no_audio_permissions">ビデオを記録するためにオーディオのアクセス許可が必要です</string>
|
||||
<string name="no_gallery_app_available">利用可能なギャラリーアプリがありません</string>
|
||||
<string name="click_to_resume_preview">Click on the image to resume preview</string>
|
||||
<string name="photo_not_saved">The photo could not be saved</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Kameros perjungimas nepavyko</string>
|
||||
<string name="no_permissions">Nėra ką daryti kai kamera ir saugykla neprieinama</string>
|
||||
<string name="no_audio_permissions">Mums reikia audio leidimo, kad įrašyti vaizdo bylas</string>
|
||||
<string name="no_gallery_app_available">Nėra galerijos programėlės</string>
|
||||
<string name="click_to_resume_preview">Click on the image to resume preview</string>
|
||||
<string name="photo_not_saved">The photo could not be saved</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Schakelen camera is mislukt</string>
|
||||
<string name="no_permissions">Kan niets doen zonder toegang tot uw camera en opslag</string>
|
||||
<string name="no_audio_permissions">Toestemming voor audio nodig is voor het opnemen van video\'s</string>
|
||||
<string name="no_gallery_app_available">Geen gallery app beschikbaar</string>
|
||||
<string name="click_to_resume_preview">Click on the image to resume preview</string>
|
||||
<string name="photo_not_saved">The photo could not be saved</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Przełączenie kamery nie powiodło się</string>
|
||||
<string name="no_permissions">Za wiele nie zrobię, gdy nie będę mieć dostępu do kamery i pamięci.</string>
|
||||
<string name="no_audio_permissions">Potrzebuję ustawienia \"Mikrofon\", aby móc nagrywać filmy</string>
|
||||
<string name="no_gallery_app_available">Brak aplikacji galerii</string>
|
||||
<string name="click_to_resume_preview">Kliknij obraz, aby wznowić podgląd</string>
|
||||
<string name="photo_not_saved">Zdjęcie nie mogło zostać zapisane</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Falha ao mudar de câmera</string>
|
||||
<string name="no_permissions">É necessária a permissão para acessar a câmera e o armazenamento</string>
|
||||
<string name="no_audio_permissions">Necessitamos da permissão de áudio para gravar os vídeos</string>
|
||||
<string name="no_gallery_app_available">Nenhum aplicativo de galeria disponível</string>
|
||||
<string name="click_to_resume_preview">Clique na imagem para resumir a pré-visualização</string>
|
||||
<string name="photo_not_saved">A foto não pôde ser salva</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Falha ao mudar de câmara</string>
|
||||
<string name="no_permissions">É necessária a permissão para aceder à câmara e ao armazenamento</string>
|
||||
<string name="no_audio_permissions">Necessitamos da permissão de áudio para gravar os vídeos</string>
|
||||
<string name="no_gallery_app_available">Nenhuma aplicação de galeria disponível</string>
|
||||
<string name="click_to_resume_preview">Clique na imagem para continuar com a pré-visualização</string>
|
||||
<string name="photo_not_saved">Não foi possível guardar a foto</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Не удалось переключить камеру</string>
|
||||
<string name="no_permissions">Не так много можно сделать без доступа к камере и хранилищу</string>
|
||||
<string name="no_audio_permissions">Нам нужно разрешение на запись аудио для записи видео</string>
|
||||
<string name="no_gallery_app_available">Нет доступного приложения-галереи</string>
|
||||
<string name="click_to_resume_preview">Чтобы возобновить предпросмотр, нажмите на изображение</string>
|
||||
<string name="photo_not_saved">Не удалось сохранить фото</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Prepnutie fotoaparátu zlyhalo</string>
|
||||
<string name="no_permissions">Bez prístupu ku kamere a úložiska nevieme urobiť nič</string>
|
||||
<string name="no_audio_permissions">Na tvorbu videí potrebujeme prístup k nahrávaniu zvuku</string>
|
||||
<string name="no_gallery_app_available">Nebola nájdená žiadna aplikácia galérie</string>
|
||||
<string name="click_to_resume_preview">Pre pokračovanie prehliadania kliknite na obrázok</string>
|
||||
<string name="photo_not_saved">Fotografiu sa nepodarilo uložiť</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Byte av kamera misslyckades</string>
|
||||
<string name="no_permissions">Inte mycket att göra utan tillgång till din kamera och lagring</string>
|
||||
<string name="no_audio_permissions">För att spela in video krävs ljudrättigheter</string>
|
||||
<string name="no_gallery_app_available">Ingen galleri-app finns tillgänglig</string>
|
||||
<string name="click_to_resume_preview">Klicka på bilden för att återuppta förhandsgranskningen</string>
|
||||
<string name="photo_not_saved">Fotot kunde inte sparas</string>
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<string name="camera_switch_error">Switching camera failed</string>
|
||||
<string name="no_permissions">We can\'t do much without accessing your camera and storage</string>
|
||||
<string name="no_audio_permissions">We need audio permission for recording videos</string>
|
||||
<string name="no_gallery_app_available">No gallery app available</string>
|
||||
<string name="click_to_resume_preview">Click on the image to resume preview</string>
|
||||
<string name="photo_not_saved">The photo could not be saved</string>
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths>
|
||||
<external-path name="external_files" path="."/>
|
||||
<root-path name="external_files" path="/storage/" />
|
||||
</paths>
|
Loading…
Reference in New Issue