guardianproject / haven

Haven is for people who need a way to protect their personal spaces and possessions without compromising their own privacy, through an Android app and on-device sensors
https://guardianproject.github.io/haven/
GNU General Public License v3.0
6.61k stars 726 forks source link

Galaxy, Nexus & fringe device support #297

Closed lukeswitz closed 6 years ago

lukeswitz commented 6 years ago

Issue Recap: Nexus, Galaxy & Fringe Device Issues

Description: Camera errors and trouble determining facing or angle using Nexus handsets. Caused by its use of facing and rotation to form what would normally be a 0 or 1. Throws error code -38 when starting the MediaRecorder. This bug renders the app useless as stated in previous issues.

Reproducing: Using Haven and attempting to switch cameras when not actively previewing from the MonitorActivity would cause the Camera.open()call to return a null camera instance.

Buggy Workarounds: Avoid setting the audio source and format in MediaRecorderActivity. Alternatively, encode using h.263 instead of .264. Remove extraneous file separator from the videoFile path if necessary. This will give you a video file but the dependency used to play it back is old. You have to then export it to view, could be a data limit thing.

Conclusions: Setting the cameraFacing variable isn’t possible using a device that doesn’t provide a simple 0,1 camera configuration. Once lost, the app will crash when called a second time. For instance, when visiting MonitorView -> Settings -> Camera Sensitivity the parameters are attempting to be set on a null object after the Camera.open()call fails due to lack of a provided variable corresponding to the camera of the device.

lukeswitz commented 6 years ago

e0ecdc69a3a2bb40478a9d36baf78c1269e9e3ea fixes most all of this 👍 thank you! Issues above regarding video recording and bind handlers are mentioned eleewhere: #313, #295. Closing it up

lukeswitz commented 6 years ago

Current mp4 encoding not working on nexus 4 & 5 causing no playback. BMP encoding seems to intensive for older devices.