From a3d2a22f5ba20b72eeb9d34b7323da93bfb1c503 Mon Sep 17 00:00:00 2001 From: Emin Date: Tue, 11 Feb 2025 15:28:35 +0500 Subject: [PATCH] android: make images offline --- android/app/src/main/AndroidManifest.xml | 7 + .../java/app/tourism/ImagesDownloadService.kt | 172 ++++++++++++++++++ .../main/java/app/tourism/data/db/Database.kt | 6 +- .../data/db/dao/ImagesToDownloadDao.kt | 22 +++ .../data/db/entities/ImageToDownloadEntity.kt | 11 ++ .../data/repositories/PlacesRepository.kt | 121 +++++++++++- .../models/resource/DownloadProgress.kt | 36 ++++ .../ui/screens/main/home/HomeScreen.kt | 22 +++ .../ui/screens/main/home/HomeViewModel.kt | 28 ++- .../app/src/main/res/values-ru/strings.xml | 8 + android/app/src/main/res/values/strings.xml | 8 + 11 files changed, 432 insertions(+), 9 deletions(-) create mode 100644 android/app/src/main/java/app/tourism/ImagesDownloadService.kt create mode 100644 android/app/src/main/java/app/tourism/data/db/dao/ImagesToDownloadDao.kt create mode 100644 android/app/src/main/java/app/tourism/data/db/entities/ImageToDownloadEntity.kt create mode 100644 android/app/src/main/java/app/tourism/domain/models/resource/DownloadProgress.kt diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 6e5c9a0c1a..c54cada790 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -38,6 +38,7 @@ +