diff --git a/apks/Schnappix_v23.01.5.aab b/apks/Schnappix_v23.01.5.aab new file mode 100644 index 00000000..8596d3e1 Binary files /dev/null and b/apks/Schnappix_v23.01.5.aab differ diff --git a/apks/Schnappix_v23.01.5.apk b/apks/Schnappix_v23.01.5.apk new file mode 100644 index 00000000..ee219230 --- /dev/null +++ b/apks/Schnappix_v23.01.5.apk @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ced0ec6efcc6d637db0ea9587976a58d062a51eb7f17482e8370856b12c4e517 +size 122756201 diff --git a/src/screens/CameraScreen.tsx b/src/screens/CameraScreen.tsx index f835d0ec..ed0fcc40 100644 --- a/src/screens/CameraScreen.tsx +++ b/src/screens/CameraScreen.tsx @@ -359,9 +359,9 @@ export default function CameraScreen({ // Auto-save the high-res original raw photo to the gallery try { await saveToGallery(capturedUri, 'Raw', eventText); - console.log('Auto-saved high-res raw capture to gallery'); - } catch (e) { - console.error('Failed to auto-save raw capture:', e); + logger.log('Auto-saved high-res raw capture to gallery'); + } catch (e: any) { + logger.error(`Failed to auto-save raw capture: ${e?.message || e}`); } // Downscale for the UI to prevent OutOfMemoryError in React Native Image diff --git a/src/services/storage.ts b/src/services/storage.ts index c5ef057b..3126ed07 100644 --- a/src/services/storage.ts +++ b/src/services/storage.ts @@ -1,5 +1,6 @@ import { getPermissionsAsync, requestPermissionsAsync, createAssetAsync, getAlbumAsync, createAlbumAsync, addAssetsToAlbumAsync } from 'expo-media-library'; import * as FileSystem from 'expo-file-system'; +import { logger } from './logger'; /** * Request necessary media library permissions. @@ -36,8 +37,10 @@ function getFormattedDateTime(): string { * @returns Promise The permanent URI of the saved asset in the gallery. */ export async function saveToGallery(localUri: string, type: 'Raw' | 'Collage', eventName: string): Promise { + logger.log(`Starting saveToGallery for ${localUri}`); const hasPermission = await requestStoragePermission(); if (!hasPermission) { + logger.error('Storage permission not granted. Cannot save photo to gallery.'); throw new Error('Storage permission not granted. Cannot save photo to gallery.'); } @@ -70,16 +73,16 @@ export async function saveToGallery(localUri: string, type: 'Raw' | 'Collage', e if (!album) { // 3. If it doesn't exist, create it with our asset await createAlbumAsync(ALBUM_NAME, asset, false); - console.log(`Created new album "${ALBUM_NAME}" and copied photo.`); + logger.log(`Created new album "${ALBUM_NAME}" and copied photo.`); } else { // 4. If it exists, add our asset to it await addAssetsToAlbumAsync([asset], album, false); - console.log(`Copied photo to existing album "${ALBUM_NAME}".`); + logger.log(`Copied photo to existing album "${ALBUM_NAME}".`); } return asset.uri; } catch (e: any) { - console.error(`Error saving asset to album ${ALBUM_NAME}:`, e); + logger.error(`Error saving asset to album ${ALBUM_NAME}: ${e?.message || e}`); return asset.uri; } finally { // Cleanup our temp renamed file