Office Hours — Today, January 6

Yesterday, January 5

Jan 6
3:50 PM
Mark M.
has entered the room
Mark M.
turned on guest access
4:05 PM
Aaron M.
has entered the room
Aaron M.
Hello Mark
Mark M.
hello, Aaron!
how can I help you today?
Aaron M.
:) I am using your cwac Camera and noticed you had it slated for rewrite
Mark M.
yes
a long and arduous process
which I am looking forward to with all of the thrill of a root canal
Aaron M.
This rewrite will only work for 21 and up though right due to camera 2 api?
Mark M.
no
Aaron M.
lol
Mark M.
it will use Camera2 on API Level 21+, falling back to Camera on older devices
4:10 PM
Aaron M.
Ahh ok
good to know
In the mean time i wanted to ask you same questions on the current implementation
Mark M.
go right ahead!
if you're lucky, I might even be able to give you answers!
:-)
Aaron M.
I am using the CameraView and was not pleased with the speed for it to take a picture and show it to me for review.
Mark M.
that is probably due to image normalization, such as rotating it if the EXIF headers call for it
Aaron M.
I decided to trick my user and instead of showing the user the picture that was taken and saved I am taking the picture and changing the UI to look like a review state and leaving the frozen preview up
this did not speed up the time to take and save the picture but it provides feedback to the user and lets the review the image that was taken
lets them review
4:15 PM
Aaron M.
In most cases this works
But on some devices the preview either never freezes or is freezing and restarting
Is there a way to freeze it manually?
Mark M.
no
Aaron M.
can you think of a reason why this is happening?
Mark M.
well, the preview is supposed to restart
Aaron M.
when the activity resumes right?
Mark M.
no, when the picture is taken, unless you are using single-shot mode
Aaron M.
I am using single shot mode but I am never switching to a new activity in the savePicture callback
Mark M.
it's entirely possible there is a bug somewhere in there
I have only tested single-shot mode when launching another activity
in principle, it should remain frozen
Aaron M.
ok cool.
4:20 PM
Bill M.
has entered the room
Mark M.
if you ever come up with a reproducible test case, file an issue
Aaron M.
I have a follow up for that but take his please
OK I will
Mark M.
soon, I will return to bug-fixing on the library for things that don't break the public API
in parallel with implementing a new library
and with that...
howdy, Bill!
Aaron M.
:)
Mark M.
Bill: your turn! do you have a question?
Bill M.
Aaron: you can post your follow up. I'm mostly kibitzing.
Love the site redesign. No Android question(s) at the moment, but I've still got 39 min. ;)
Mark M.
Bill: thanks! Bootstrap 3 FTW!
Aaron M.
Nice
Thankyou Bill
Ok when taking a picture with the Camera API directly the Image is supposed to always freeze correct?
Mark M.
Aaron: so, if you have more questions, go ahead (Bill: chime in if you come up with a question)
Aaron M.
the preview image that is
Mark M.
the takePicture() call freezes the preview until you restart the preview, yes
Aaron M.
Ok Thankyou. I am going to look through and see if the cwac camera restarts it anywhere depending on current device and my implementation. I think ill also try to set up a test case with your sample code.
4:25 PM
Mark M.
yeah, you might fork my sample and change my single-shot behavior to do something more akin to what you're seeking, rather than start up thew photo-viewing activity, and see if you get similar results
Aaron M.
Ill do a simple control app that proves my sanity by freezing the preview on both devices using just the camera api first
Thankyou Mark
Again
Mark M.
if either of you have another question, go right ahead
Aaron M.
I do not thank you Bye Mark and Bill have a good day
see you next time :)
Aaron M.
has left the room
4:40 PM
Bill M.
What's shakin'?
Mark M.
ummm... well... I live in PA, so we have fairly geologically stable ground here, unlike in the Bay Area...
:-)
Bill M.
I live in Cincinnati. One of the larger, though less active, faults :)
I am going to the North American GDG Summit at the end of Feb. Any shot you'll be around the Google HQ at that time?
Mark M.
I haven't been to the Googleplex in a few years
Bill M.
When you start looking at testing ...
4:45 PM
Bill M.
Vogella and Google's own developer site both site "testPreConditions()" is a suggested way to test any pre-conditions that the rest of your tests rely on, however, they state that they do not guarantee that testPreConditions() will be run first. Seems odd. I get that if pre-conditions fails that you can likely suspect other tests will fail, but why suggest that as a best practice?
Just philosophically speaking.
Mark M.
agreed
which is one of the reasons I haven't ever mentioned that method :-)
in fact, I see a SO comment from you about this that you posted a few hours ago... :-)
Bill M.
I do have a condition that I need to be true before other tests run. I created a method to hold the test, however, it is not prefixed with 'test' and gets called by all other tests that would depend on it. I use a flag to tell me if it has already run and simply return a pass/fail.
hahahaha
#creeper
Mark M.
sorry, happened to come up in a Google search on testPreConditions()
that question comes up #1 in my search
Bill M.
Nice :)
Mark M.
I'll need to see if JUnit4 came up with anything specific for this
Bill M.
The solution I came up with works well and is relatively unhacky :)
4:50 PM
Mark M.
Bill M.
Interesting!
Thanks Mark. Until next time, cheers.
4:55 PM
Mark M.
next chat is Thursday, 7:30pm US Eastern
Bill M.
I have all the ones you've listed on my calendar.
Mark M.
cool!
Bill M.
has left the room
5:00 PM
Mark M.
turned off guest access

Yesterday, January 5

 

Office Hours

People in this transcript

  • Aaron McI
  • Bill Mote
  • Mark Murphy