diff --git a/app.json b/app.json index 7d2a7e9..7b9b7e4 100644 --- a/app.json +++ b/app.json @@ -2,7 +2,7 @@ "expo": { "name": "Security Application", "slug": "security-app", - "version": "1.3.3", + "version": "1.3.4", "orientation": "portrait", "icon": "./assets/images/icon.png", "scheme": "securityapp", @@ -38,6 +38,13 @@ "usesCleartextTraffic": true } } + ], + [ + "expo-media-library", + { + "granularPermissions": ["photo"], + "isAccessMediaLocationEnabled": false + } ] ], "experiments": { diff --git a/app/(tabs)/live.tsx b/app/(tabs)/live.tsx index 484c125..adee354 100644 --- a/app/(tabs)/live.tsx +++ b/app/(tabs)/live.tsx @@ -20,7 +20,7 @@ import { ContextError } from '@/context/ContextError' import { ContextImageRotation } from '@/context/ContextImageRotation' import { ContextUser } from '@/context/ContextUser' import { useThemeColor } from '@/hooks/use-theme-color' -import { downloadImage } from '@/utils/downloadImage' +import { saveImage, shareImage } from '@/utils/downloadImage' const errorImageSource = require('./../../assets/images/error.webp') @@ -91,9 +91,12 @@ const LiveScreen = () => { } const handlePress = () => { - downloadImage({ imageName, imageSource, imageRotation }) + shareImage({ imageName, imageSource, imageRotation }) } + const handleSave = () => + saveImage({ imageName, imageSource, imageRotation }) + const handleFetchLive = useCallback( (setIsLoading: React.Dispatch>) => { handleApiFetchLive({ @@ -152,6 +155,10 @@ const LiveScreen = () => { ) const styles = StyleSheet.create({ + actions: { + flexDirection: 'row', + justifyContent: 'space-between', + }, activityLoader: { alignItems: 'center', aspectRatio: 16 / 9, @@ -269,11 +276,18 @@ const LiveScreen = () => { )} -