Office Hours — Today, January 23

Tuesday, January 21

Jan 23
3:50 PM
Mark M.
has entered the room
Mark M.
turned on guest access
3:55 PM
Jan S.
has entered the room
Jan S.
Hello
Mark M.
hello, Jan!
how can I help you today?
4:00 PM
Jan S.
I'm try using cwac camera. It is amazing peace of stuff, but a have real problem with performance.
Mark M.
can you be more specific?
Jan S.
It takes about 5s to take a picture on quadcore cpu :-(
I have Samsung S3.
Mark M.
what orientation?
Jan S.
portrait
Mark M.
there's your problem
Jan S.
Realy?
Mark M.
Samsung only saves landscape images
Yogesh
has entered the room
Mark M.
they put an EXIF header into the JPEG saying "hey, image viewer, please rotate this"
Jan S.
Is there any workaround?
Mark M.
the default behavior of CWAC-Camera is to rotate the image for you
Jan S.
I only need take a small preview image (400x400) and nothing more.
Mark M.
in your CameraHost, return false from rotateBasedOnExif()
however, it does mean that your photo may be portrait or landscape
rather than always matching the device orientation
now, I need to do some work to speed this up, probably involving the NDK
I'll get to that eventually
Jan S.
Ok, thank you very much.
Mark M.
Yogesh: your turn! do you have a question?
Jan S.
Why there is workingCopy.compress(Bitmap.CompressFormat.JPEG, 100, out); in synchronizeModels it takes another 1 second
4:05 PM
Mark M.
JanL are you using the FFC or the rear-facing camera?
(sorry, that was supposed to be "Jan:", not "JanL")
Jan S.
rear-facing
Mark M.
hmmm...
Jan S.
Now I made a test with landscape test and it took about 3s.
Mark M.
once you have rotateBasedOnExif() return false, I should not need to do workingCopy.compress() anymore
you might also pass in false to the takePicture() call where it asks for whether you want the byte array
(see last paragraph of that section)
Jan S.
Ok, I will try it. Thank you very much for great work! One more question, when I setup FOCUS_MODE_CONTINUOUS_PICTURE in adjustPreviewParameters. The preview after take picture stay freezen (on Galaxy Nexus only)
Is it any known issue?
Mark M.
I have not tried that mode
if you could, file an issue with the details
4:10 PM
Jan S.
Ok, don't worry about. With FOCUS_MODE_CONTINUOUS_VIDEO working without problem.
Mark M.
Yogesh: do you have a question?
Yogesh
I'm new to this and the world of android in general. I just thought I would hangout here and see the kind of discussions that take place. other than that I would just like to thank you for your amazing book, and would greatly appreciate if you have some pointers for newbies.
Mark M.
thanks for the kind words
the office hours chats are mostly for questions and answers
you can see past chat transcripts at http://commonsware.com/office-hours/
and my general "newbie" pointers are mostly in the book
is there particular area that concerns you?
Yogesh
thanks, I'll take a look at them both. i was just starting out and had a few issues with emulators
first of all.. the nexus 10 emulator does not start when I run it. I am running a Ubuntu 13 and 4…3 android version
I do not see any errors, but the simply get a blank screen
Mark M.
emulators for larger screens need to use the x86 emulator images
the ARM emulator images are much too slow
4:15 PM
Mark M.
however, ARM is what you get by default
Yogesh
all other emulators seem to come up fine
also,I'm not sure if this so
Mark M.
did you follow the instructions -- on the Android site, or in the advanced emulators chapter -- to set up x86 emulator support?
Yogesh
yes
Mark M.
I run Ubuntu -- I am trying it now
I just created and started it, without issue
try checking "Use Host GPU", if you do not have that
otherwise, I do not know what may be going wrong -- sorry
Jan: do you have another question?
4:20 PM
Yogesh
If I enable that I get an error - eglMakeCurrent failed
Mark M.
hmmm...
I used to have a problem on Ubuntu with one of the OpenGL libraries that the emulator used
but that was on an older version of Ubuntu
Use Host GPU has worked for me on 13.04 and 13.10
Yogesh
I am on 13.10
Mark M.
how much RAM and what sort of CPU does your development machine have?
Jan S.
I'm testing your hints ;-) I will let you know If I will have more questions. ...maybe small one. When I take picture I see a lot of info from CWAC-Camera﹕ 2048 x 1536 etc. Is it only debug info about available resolutions?
Mark M.
Jan: I probably left a Log.d() call around in the source
make sure you are on the latest version, as I thought I cleaned those up
Yogesh
I have 8GB RAM on i7 intel
4:25 PM
Mark M.
that's what I have, so there's no problems there
your environment pretty much matches mine, so I do not know why you are having the emulator issues that you are
Jan S.
Thanks
Yogesh
Also, I made a very simple hello world app with different layouts for potrait and landscape mode (I just used a different picture for both layouts). I then tried to change the orientation of the emulator. There was no change. But it works fine on my Nexus7. Also it seems to work fine in genymotion emulator. I am not sure if this is a known bug, I will have to look around for this too.
4:30 PM
Mark M.
there's a known bug in the 4.4 emulators, where orientation changes do not work
4:30 PM
Yogesh
Is there a workaround?
Mark M.
use a 4.3 emulator :-)
I know of no workaround for the 4.4 emulator, unfortunately
Yogesh
Ok :) that works for me. am just randomly expereminting.
Mark M.
you can keep tabs on the issue here: http://code.google.com/p/android/issues/detail?...
Yogesh
Thanks.
Mark M.
if either of you have another question, go right ahead
4:40 PM
Yogesh
Could you give some pointers on troubleshooting the emulator issue?
Mark M.
other than asking at StackOverflow, not really
be sure to describe there your environment and all relevant settings from your emulator
perhaps somebody else will have an idea
Yogesh
Regardin that, one stupid questions, How do I copy the device specifications. I mean, when I click on the "details" button in AVD manager, i see some information on the device, but I cant copy it. Is there an alternative place, from where I can get the same information.
4:45 PM
Mark M.
~/.android/avd lists all your defined emulator instances
the various .ini files there and in the per-emulator subdirectories contain all that info, and more
Yogesh
All I see is the following:
View paste
avd.ini.encoding=ISO-8859-1
target=android-19
path=/home/yogesh/.android/avd/Nexus10.avd
path.rel=avd/Nexus10.avd
Mark M.
look in the ~/.android/avd/Nexus10.avd directory
Yogesh
View paste
yes, thank you. I see it in the hardware-qemu.ini file there.
4:50 PM
Yogesh
I shall post this on Stackoverflow. Hope I get a good answer soon. Thank you once again
Mark M.
sorry I could not be of greater assistance
with these chats, you win some, and you lose some :-)
5:00 PM
Mark M.
that's a wrap for today's chat
the transcript will be archived at http://commonsware.com/office-hours/ shortly
the next chat is Tuesday at 7:30pm US Eastern Time
have a pleasant day!
Jan S.
has left the room
Yogesh
has left the room
Mark M.
turned off guest access

Tuesday, January 21

 

Office Hours

People in this transcript

  • Jan Sarson
  • Mark Murphy
  • Yogesh