Office Hours — Today, August 13

Thursday, August 8

Aug 13
3:50 PM
Mark M.
has entered the room
Mark M.
turned on guest access
4:10 PM
Jeff
has entered the room
Mark M.
hello, Jeff!
Jeff
Hi Mark
Mark M.
how can I help you today?
Jeff
First, I find your book very helpful and am excited to see you updated the camera section
Mark M.
thanks for the kind words!
4:15 PM
Jeff
I was also vindicated when you wrote that the camera is ridiculously hard to work with
Mark M.
yeah, it's pretty unpleasant
hence, CWAC-Camera
Jeff
anyways, my camera code is pretty typical and works well EXCEPT that the surfaceChanged() and surfaceCreated() call backs are not called onResume(). Do you have any ideas why that might be?
I posted it to StackOverflow but got nothing
Mark M.
off the top of my head, I have no idea
give me a moment to poke through my code...
Jeff
so if I let the app "sleep" onResume, the screen is blank
Mark M.
I'm not sure what you mean by that last one
Jeff
I am clear that office hours are not to debug my code but I would appreciate any high level ideas
Mark M.
well, what I'm doing is getting rid of the SurfaceView/TextureView entirely in onPause(), and creating a fresh one in onResume()\
not sure where I picked that up from
but, it's been working OK for me
Jeff
so you destroy the preview on pause()?
Mark M.
yes
Jeff
I'll try it
Mark M.
specifically, the guts of CWAC-Camera are in CameraView
Jeff
Thanks
Mark M.
which is a ViewGroup
in onResume(), I call addView() and add the SurfaceView/TextureView
in onPause(), I call removeView() to get rid of the same
4:20 PM
Jeff
I was tempted to swap to your cameraFragment but my code works except for this pause problem. If I swap to your Fragment, can I distribute in my app free of charge? No license issue?
Mark M.
CWAC-Camera is licensed Apache License 2.0
which is generally amenable to most developers, proprietary and open source
Jeff
excellent - I'll try it tonight and let you know
Mark M.
that being said, IANALNDIPOOTV
(I am not a lawyer, nor do I play one on TV)
Jeff
I was about to google it
Mark M.
and so for advice on licensing, please seek qualified legal counsel
or, y'know, a Magic 8-Ball
:-)
Gaurav B.
has entered the room
Mark M.
hello, Guarav!
Jeff
hey since i have you, what are you thoughts on how to scroll to a selected entry in a listFragment? I like you check example
Mark M.
Jeff: let me take a question from Guarav, and I'll be back with you shortly
Guarav: do you have a question?
Gaurav B.
Hi Mark
Jeff
no problem
Gaurav B.
I wanted to ask that while Using HTTPS from the client side do we need to install the certificate on the client side too
Mark M.
well, that depends
if the SSL certificate's root certificate is one recognized by Android, you should not need to do anything
if you are using something else, like a self-signed certificate, you will want to set up your own custom trust store that handles this
4:25 PM
Gaurav B.
currently i am not using a self signed certificate
i was trying to find more on the net about the same.. that which certificates are generally by default recognized by Android
but does it changes.. when the app gets installed on different phones
Mark M.
in that case, creating your own TrustManager is probably the right answer
in my book, I point to this blog post by Nikolay Elenkov: http://nelenkov.blogspot.ie/2011/12/using-custo...
Gaurav B.
thanks Mark
Mark M.
eventually, I will be experimenting with this more myself, but Nikolay's post is the generally recommended material on the subject
Gaurav B.
i will look into this blog and do some examples..
regarding the same so that I can use the same in my application
Mark M.
OK
back to Jeff...
Gaurav B.
thanks.. for your help Mark
Mark M.
there's a trick to scrolling to a given position in a ListView -- give me a moment to try to track it down...
ah: smoothScrollToPosition()
Jeff
sure
thanks!
Mark M.
that should work
4:30 PM
Jeff
you rock! have a good day
Mark M.
you too!
Guarav: do you have another question?
Gaurav B.
I just wanted to ask just one more that do u recommend to use.. Android studio
as compared to eclipse
Mark M.
well, this is what I blogged back in May: http://commonsware.com/blog/2013/05/16/android-...
simply put, if you are good with Android, and you want to play with Android Studio now, go right ahead
however, Android Studio has enough broken pieces that newcomers to Android may get frustrated
Gaurav B.
i have been working in android since last two years
Mark M.
then you should be in OK shape for understanding what represents an Android Studio bug versus something in Android itself
Gaurav B.
yes i suppose
Mark M.
personally, I am not touching Android Studio until November or so
Gaurav B.
yes i have not found any thing about studio in your new edition also
Mark M.
here's my blog post on that subject: http://commonsware.com/blog/2013/05/15/android-...
I expect to start covering Android Studio in Version 5.3 of my book, late this year
Gaurav B.
ohh ok thanks.. for your views
Mark M.
sure, no problem
Jeff: do you have another question?
4:35 PM
Gaurav B.
apart from that just wanted to ask your views about Windriver..
Mark M.
I have never worked with embedded Linux, sorry
assuming you mean Wind River, the company
Gaurav B.
they have their own platform
i was really.. getting frustrated with eclipse.. so i was trying some alternatives.. for the same
Mark M.
Wind River does not make an IDE, as far as I know
they help firms use embedded Linux, including embedded Android, on their own hardware
Gaurav B.
yes you are right about that
android studio is the current alternative for me right now :)
thanks for your suggestions mark.. i don't have any other question.. currently
4:40 PM
Mark M.
if either of you come up with a question, chime in
Gaurav B.
i have been a warescription member since last september
and i have seen that you take courses for Advanced Android Application development so is there any way.. that people outside US can attend the same
i would really happy to be enrolled for your courses
as i want to learn Open GL and NDK application development
Mark M.
well, I definitely cannot help you on OpenGL, and my NDK knowledge is pretty much limited to what I have in the book
I rarely teach outside of the US, for various reasons (immigration hassles, tax issues, etc.)
however, I am looking to start offering some Web-based seminars for subscribers in the coming months
I will announce them in my blog, in the newsletter, on Twitter, and on G+ when they start up
Gaurav B.
that will be really cool
I have recommended your books to lot of my friends in India
Mark M.
thanks!
4:45 PM
Gaurav B.
have a good day Mark
Mark M.
you too!
Gaurav B.
thanks for your time and highly appreciate all your suggestions . Will eagerly wait for your webinars
Gaurav B.
has left the room
Gaurav B.
has entered the room
Gaurav B.
has left the room
4:50 PM
Jeff
has left the room
5:00 PM
Mark M.
turned off guest access

Thursday, August 8

 

Office Hours

People in this transcript

  • Gaurav Bhatnagar
  • Jeff
  • Mark Murphy