Closed amazingproducer closed 4 years ago
It's ugly, but there's rudimentary camera access and real time display of the camera's feed for the user.
Apparently, I can just use <input type="file" accept="image/*" capture="camera" />
and access the camera.
Getting location data is a little different, but comparatively easier than making push notifications.
Though my users can now use the PWA to take snapshots and save them locally, they cannot focus the camera or inject the EXIF location data that we need.
Since we apparently can't easily make a decent camera app in a web browser (or expose the native camera app with flash/geotagging/focus (or can we?)), let's make the user shoot their own geotagged images and work with those.
I removed some of the unused code and tried working on the geolocation stuff. Managed to get the permission query up, but my GPS device isn't getting a lock. I'll have to learn how to give the browser false location information in the morning.
Location spoofing is a lot easier than standing outside waiting for multi-sat lock:
Next, I'd like to try client-side EXIF data extraction again.
edit: I failed and couldn't figure out a way to use the console to debug my problems.
After some struggle, I managed to confirm that I can read EXIF location data if it exists. Since this is an important field for the application, I'd like to account for any case in EXIF data which would invalidate the image as evidence.
I'd also like to ask the client device for its current location at the right time during this process.
Additionally, I would like to display the image loaded by the input element for use in a future confirmation dialog.
The user can now submit the image captured by the camera!
id
created_at
requested_location
- target coordinatesdevice_location
- coordinates of device at time of submissionexif_location
- coordinates embedded in imageimage_filename
1|2019-10-30 15:39:55.130296||21.3069444,-157.8583333|44,33,26,170,29,23|20191022_224418.jpg
2|2019-10-30 15:44:51.351544||19.759,-154.9845|44,33,26,170,29,23|20191022_224418.jpg
Judging from the original goals, enough study of these technologies has been conducted to begin developing the real project.
Research the camera and location functions required for the upcoming accountability app and refine the plan to build it.