Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

for #365 reduce camera resolution and remove one unneeded bitmap #366

Merged
merged 5 commits into from
Feb 10, 2019

Conversation

n8fr8
Copy link
Member

@n8fr8 n8fr8 commented Feb 7, 2019

No description provided.

@n8fr8 n8fr8 requested a review from archie94 February 7, 2019 20:09
@archie94
Copy link
Collaborator

archie94 commented Feb 7, 2019

With the default motion detection sensitivity threshold performance is better on this branch. However reducing the threshold to something around 948 I am still running into ANRs. :/

@n8fr8
Copy link
Member Author

n8fr8 commented Feb 7, 2019 via email

@archie94
Copy link
Collaborator

archie94 commented Feb 8, 2019

Faced OOMs too! Will provide the crashlog in some time.

- we are creating too many in memory bitmaps just for fancy UI that isn't that usable
- this now displays a simple "motion detected" string instead of the change detection overlay
@n8fr8 n8fr8 self-assigned this Feb 8, 2019
@n8fr8 n8fr8 added this to the Current Sprint milestone Feb 8, 2019
@n8fr8
Copy link
Member Author

n8fr8 commented Feb 8, 2019

This latest commit should vastly simplify the processing going on during motion detection. The problem was really in the whole overlay bitmap UI generation. That UI is fun, but not that usable. I am now just displaying a simple string "motion detection" to indicate a match.

This is part of new work on showing more of an interactive display for all sensor matches, like "Sound Detected" or "Device Moved" etc, so that you can see in one view all of the various sensor states.

@archie94
Copy link
Collaborator

archie94 commented Feb 8, 2019

Can confirm! No more ANRs or OOM errors 👍 !

However the number of Triggers of type Motion(Camera) is significantly reduced. Is this intended?

@archie94
Copy link
Collaborator

archie94 commented Feb 8, 2019

However the number of Triggers of type Motion(Camera) is significantly reduced. Is this intended?

Preliminary testing. Would be great if someone can cross-verify.

- this is a replacement for the removal of the bitmap overall, which was causing OOMs and ANRs
- this is much more functional, useful, though not quite as sexy :(
@lukeswitz
Copy link
Collaborator

lukeswitz commented Feb 8, 2019

Notes: Getting a crash using camera on nexus 4 & 5 (AOS 5&6), with the monitor continuing in the background. Less frames could benefit the load on notifications. Without the overlay it's very hard to use sensitivity config.

Edit: after latest commit, feedback for when sound and motion is detected works well and is intuitive. Makes much more sense moving forward. Thank you both.


  --------- beginning of crash
02-08 17:46:10.367 26412-26412/org.havenapp.main E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.havenapp.main, PID: 26412
    java.lang.IllegalStateException: Fragment CameraFragment{258a9de5} not attached to a context.
        at androidx.fragment.app.Fragment.requireContext(Fragment.java:696)
        at androidx.fragment.app.Fragment.getResources(Fragment.java:760)
        at androidx.fragment.app.Fragment.getString(Fragment.java:782)
        at org.havenapp.main.ui.CameraFragment$1.handleMessage(CameraFragment.java:56)

@n8fr8
Copy link
Member Author

n8fr8 commented Feb 10, 2019

@lukeswitz I found and fixed that crash.

Otherwise, going to finish this up, and then work on improving tuning and feedback UI in another PR.

@n8fr8 n8fr8 merged commit cea9d51 into master Feb 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants