-
Notifications
You must be signed in to change notification settings - Fork 1
Camera.js
CameraPage.js
After logging in, the user is redirected to the Camera page where they can take a photo.
Once mounted, the user is asked to give permissions to access
- Camera Permission to take photos
- Location Permission to capture their current location when taking a photo
- Gallery Permission to select photos from their gallery
When the user takes a photo, we capture their current location and save it with the image metadata.
Currently, the photos.js
action and reducer are responsible for capturing and storing the camera_photos data
id - int, increments
date - date, yyyy/mm/dd
filename - string, img_0001.jpg
lat - float
lon - float
picked_up - bool
selected - bool
tags - null or object
type - string "camera"
uri - string (filepath)
When a photo is taken, it has a null tags
object.
When a photo is selected for tagging on LeftPage.js - LeftPageImages.js @ cameraPhotoPressed ()
, we fire this event:
this.props.photoSelectedForTagging
passing along the index of the photo, the type "camera", "gallery", or "web", and the image this.props.photos[index]
This shared function is controlled by a common litter.js
which is responsible for filling the tags
property on each of the photo types.
-
Init
-
Navigation Stacks