Office Hours — Today, September 5

Yesterday, September 4

Mark M.
has entered the room
Mark M.
turned on guest access
Gabriele
has entered the room
Mark M.
hello, Gabriele
how can I help you today?
Gabriele
hi :) today I'm here just to observe :P
all right? :)
Mark M.
sure, though, at the moment, there is nothing really to observe
Gabriele
ahah, I've noticed
Mark M.
if you come up with a question, let me know
Gabriele
sure, thank you :)
right now I'm reading about the navigation drawer, for my irc client
Sep 5
4:00 PM
Ken K.
has entered the room
Ken K.
Hello
Mark M.
hello, Ken!
Ken: Gabriele is just hanging out here at the moment, so... do you have a question?
Ken K.
Sorry I'm a bit late. I was directed to a Google hangout instead. Sigh.
Mark M.
huh?
4:05 PM
Ken K.
Yes.
Sorry. Quick explanation
I added the event to my Google calendar
that directed me to the Google Hangout for some odd reason
I closed it and came here. No prob.
Mark M.
considering that I don't use Google Hangouts, that is definitely odd
but, you're here now! :-)
Ken K.
Yes, but I think it was a function of the event being on my Google calendar.
Mark M.
so... how can I help you today?
Gabriele
hi Ken
Ken K.
Hi Gabriele
Mark, I've been wanting to meet you for some time
I'm a speaker on the No Fluff, Just Stuff conference tour (http://nofluffjuststuff.com)
and I regularly give talks on Android development
I always mention your book as the only one worth getting :)
Mark M.
yup, I spoke at the NFJS Web Experience one back in 2010 or so
thanks for the book shout-out! :-)
Ken K.
Rich Web Experience, you mean?
Mark M.
yeah, that's it
Ken K.
That's in December in Ft. Lauderdale every year
Mark M.
maybe it was 2009
yes
Ken K.
Very easy to get speakers to go there :)
Mark M.
it was early enough that mobile didn't warrant its own event yet :-)
Ken K.
Anyway, it turns out I'm also working on a book
It's for O'Reilly, as part of their Gradle series
Mark M.
ah, OK
Ken K.
Those are short (roughly 100 page) books on topics in Gradle
Mine is going to be the "Gradle for Android" book
So I've been spending lots of time on that.
Mark M.
you working with Gradleware on it, or is this indepenent of them?
Ken K.
I'm independent, but I know a lot of people at Gradleware and they're going to own it in the end
They'll pay me royalties, but own the copyright
Not nearly the cool situation you have
I've also been talking to Xav Ducrohet about it as well
4:10 PM
Mark M.
hey, if you can get Xav's time, that's worth more than gold, or even ink-jet ink
4:10 PM
Ken K.
Next week at the SpringOne2GX conference (http://springone2gx.com) I'm giving a Gradle for Android talk
absolutely
But you can imagine how happy I was to see your version 6 come out this week
Mark M.
you and me both
Gabriele
(me too)
Mark M.
I described is "the literary equivalent of passing a kidney stone"
Ken K.
I have more background in Groovy and associated technologies than in Android
hah
My day job is teaching technical training classes in areas related to Java and open source
Mark M.
very cool
Ken K.
mostly that's been Groovy, Grails, Spring, and Hibernate/JPA
but lately I've been getting more Android stuff
I still have a lot to learn, though I'm making progress
Again, your book is the best for that
Mark M.
glad you like it!
Ken K.
Yup, and I'm really glad you've finished the pivot away from ActionBarSherlock
Mark M.
yeah, well, 2800 page books steer like battleships
Ken K.
The joke I tell in class about your book is
I can't imagine how long the "not busy" coder's guide would be
Gabriele
ahah
Ken K.
I can't even imagine maintaining a monster like that
Mark M.
let's just say that the choice of title didn't quite line up with how things played out
Ken K.
so it would seem
FYI, my published book is "Making Java Groovy", http://manning.com/kousen
It's about adding Groovy to existing Java development to make life easier
Mark M.
sounds good
Ken K.
Of course, that also means I'm quite interested in Cedric Champeau's efforts to implement Groovy on Android
Mark M.
and I seem to recall some tweets going out that Groovy now runs well on Android
Ken K.
Which he's also talking about next week
I'd say it runs, but it's not even really beta yet
Mark M.
ah, OK
Ken K.
But it will only get better
4:15 PM
Ken K.
Anyway, I'd love to be able to talk to you about issue in the book as they arise
with full credit, of course
You already know Hans, I'm sure
Hans Dockter
Mark M.
yes, we've met a couple of times
Ken K.
Sorry I'm going on and on like this, but I've been meaning to talk to you for months :)
Apparently you don't do email, or at least you don't make an email address easy to find on your web site
Mark M.
spammers seem to have no problem with it :-)
Ken K.
Wow. That's annoying.
But I understand if you don't want to give it away
Mark M.
partly, I don't publicize it because I used to get a lot of emails from random people asking questions, rather than using Stack Overflow, etc.
Ken K.
I figured as much
Mark M.
and one-on-one support by email isn't scaleable
but pretty much anything @commonsware.com will get to me
Ken K.
I just want to be able to potentially use you as a reviewer, or whatever involvement you feel is worth your time
Mark M.
officially, I am mmurphy@commonsware.com
Ken K.
much appreciated, thanks
I won't give that out without your permission
My last name is pronounced like the relative (Cousin)
So my company (Kousen IT, Inc) sounds like it's from the Addams Family
Mark M.
that's funny
Ken K.
It was my wife's idea
Now on to some technical stuff, unless Gabriele would like to get a word in edgewise
Mark M.
normally I rotate between attendees
but Gabriele had indicated when entering the room that she was just here to monitor
4:20 PM
Ken K.
Ah. Feel free to interrupt if necessary.
Mark M.
Gabriele: again, if you come up with a question, just chime in
Ken K.
I've been an Eclipse user since about 2001
Gabriele
sure, thank you :)
Ken K.
and I still think that Eclipse ADT is a better Eclipse than Eclipse
i.e., more stable, better performing, etc
but clearly Android Studio is the future
Gabriele
ah, so there is some difference, I always hated eclipse TT
Ken K.
This, therefore, is the year I've been switching over to IntelliJ IDEA
Mark M.
yes, Xav's non-answer in the Fireside Chat made it clear that official Eclipse support is waning
Ken K.
and Android Studio specifially
specifically
Yes, I asked Xav about it at the Gradle summit and he wouldn't commit himself, but I think it's obvious
Gabriele
me too, I've first switched to IntelliJ and then to Android Studio
Ken K.
Eclipse ADT hasn't been updated in quite a while and still doesn't really understand Gradle
though it can generate Gradle build files
Since AS can import Eclipse projects directly, my guess is that
Mark M.
there are rumblings that ADT development might be taken up by more of a community effort
Ken K.
the generated gradle build (by Eclipse) is only there so you can have some team members using each tool
Mark M.
or use Gradle for CI servers, etc.
Ken K.
Importing a project as a whole into AS appears to be a one-way process
Mark M.
if you let AS move the files around, yes
Ken K.
That's what happens when you import an existing Eclipse projet
Mark M.
I have no idea how you'd teach Eclipse where resources are inside of src/main, for example
Ken K.
It looks like you can't go back
Mark M.
it makes a copy of the project, so your original is untouched
Ken K.
That sounds like a disaster waiting to happen
what do you check into source control?
I guess if you imported as a Gradle build (i.e., point to the build.gradle file) rather than the whole project, you could still work on both
Mark M.
right
and that's what I did in the book, in general
Ken K.
Ah
4:25 PM
Mark M.
most of the projects have a build.gradle, based off of an Eclipse export, so that both IDEs can use the same project files
Ken K.
Also, of course ADT doesn't know anything about flavors
Mark M.
more importantly, it doesn't know anything about sourcesets
Ken K.
and it makes so much more sense for the tests to be inside the project
Mark M.
it does simplify matters
Ken K.
Actually, with the gradle build you can customize the source sets, but not for build types and flavors
in ADT, I mean
One issue I have with AS, though
If you want to make a new flavor, it seems you have to build the whole directory structure yourself
both src subdirectories, res folders, etc
Mark M.
I imagine they'll have a wizard for that eventually
Ken K.
that should be generated from the gradle build, I would think
Mark M.
I haven't run into one just yet
Ken K.
okay, so I'm not missing anything
I didn't realize until very recently
that if you open the "terminal" window in AS
you can run gradlew right from there
Mark M.
yeah, I had heard that, but I haven't played with it
Ken K.
I always went out to the shell myself and changed directories to my projet
Mark M.
and I have no idea what that might behave like on Windows
Ken K.
it's much easier than I thought it would be
that I don't know.
I'm on a MBP
Gabriele
(sorry; I have my MyPagerAdapter extending FragmentPagerAdapter, inside getPageTitle I'd like to use getString, one way is to pass the adapter the context, is there a better way avoiding this?)
Mark M.
and I'm a Linux guy
Gabriele: not really
getString() needs a Context
you'll see in my ViewPager examples that I pass a Context to the PagerAdapter for this very reason
Gabriele
thank you, Mark
yes
Mark M.
since the PagerAdapter is more or less "owned" by the activity, you shouldn't run into any leaks or anything
Ken K.
Mark, do you always use fragments even if you only need a single activity?
Mark M.
Ken: not in the real world
Ken K.
really? that's very interesting
4:30 PM
Ken K.
I think I get them, but they feel way too complicated
Mark M.
which is why you use them where needed
Ken K.
especially if you want each to define an interface that the activity needs to implement
Mark M.
I've been moving more into the event bus model for that particular aspect
and the book uses fragments in places where I wouldn't normally use them, mostly for repetition
Ken K.
but that's not built into Android, right? You need a third party library for it?
the event bus, I mean
Mark M.
LocalBroadcastManager is in the Android Support package
though I use greenrobot's EventBus usually
more flexible, less code
Ken K.
greenrobot has that ORM tool, too, right?
Mark M.
yes, though their event bus implementation is separate
like Square's Otto, greenrobot's EventBus is a port of Guava's EventBus to be more Android-y
such as knowing about the main application thread
Ken K.
I was thinking of using the ORM tool as a library project, just to demonstrate library projects
Mark M.
that seems a bit like swatting a fly with a Buick
I'd pick a smaller library
Ken K.
I like how they're multi-project builds in gradle, but haven't used on yet
Yes, you're probably right
Mark M.
I mean, if you wanted to demonstrate an ORM, greenrobot'
er, greenrobot's is probably a fine choice
Ken K.
that's the one I was thinking of
Mark M.
but it's probably a bit involved for just demonstrating how to consume an AAR from a repo
Ken K.
Yeah, you're right
I need something simpler for that
Do you do any unit testing?
Mark M.
if I were in your shoes, I'd grab a library that implements a widget from the Android Arsenal
Ken K.
wait, what's that?
Mark M.
some, yes
top catalog of Android libraries out there at the moment
Ken K.
Sweet. I'll check that out
4:35 PM
Ken K.
For unit testing, I've been using robotium, with the Solo class
it's really functional testing, but it works
they say from the gradle build all the tests run in parallel
but when I do it, you can watch them one after the other
I haven't played with Robolectric, though it's pretty popular
Mark M.
last I checked, Roboelectric and Gradle were two great tastes that don't taste so great together
leastways, they were having some problems
Ken K.
I've heard that too
Maybe I'll wait and see on it
Mark M.
this is based on recollections from adt-dev discussions
Ken K.
Ironically, I don't think Xav sees the lack of true unit testing as a problem
Coming from server side Java, that seems strange to me
especially because what do you do on a CI server?
Mark M.
run tests in a headless emulator
Ken K.
I assume you don't have an emulator running on the server the whole time, right?
headless emulator -- sounds familiar, but I haven't looked at that
is it a command line option?
Mark M.
yes, though I forget what it is
Ken K.
I can look it up
I just needed to know to look for it :)
Mark M.
if your CI server doesn't have a GUI (e.g., console Linux box), you can still use the emulator
it just won't actually render anything, though it behaves like it does
Ken K.
good enough for the tests
Are you a genymotion person?
Mark M.
no
Ken K.
I just started using it
Mark M.
in part because I have a fairly kick-ass notebook
and a wall full of hardware
(well, OK, technically a door full of hardware)
Ken K.
I've found that if I need to use the GPU on my machine
4:40 PM
Ken K.
which I always need to do in the newer emulators
then I can only run one or at most two at once
and I've got 16 GB of RAM :(
but with genymotion, it works
a door full of hardware sounds like a great name for a band
I think I ran out of questions at the moment
Mark M.
OK
Ken K.
Maybe I'll send you my slides after the conference, if you're interested
Mark M.
if they're publicly published somewhere, shoot me a link
Ken K.
All the talks are going to be recorded, so I can let you know about that
Gabriele
I'm using x86 emulator, it seems a lot better
Ken K.
Anyway, I hope to contact you periodically, or show up here on occasion
absolutely. HAXM rules
Mark M.
I must warn you...
while these office hours are held in a "chat room"...
the normal flow is focused on questions and answers
where I rotate among attendees to try to cover everyone's questions
today was more of a free-form chat
Ken K.
that's fine. How many people do you normally get?
Mark M.
I'd say the average is about two
4:45 PM
Mark M.
sometimes more, sometimes less
Ken K.
Oh, one last question. If I want an app to load on startup, how do I do that?
Mark M.
that depends on what you really mean
are you trying to display a UI on startup?
Ken K.
For example, my wife has a phone that starts the camera when she rotates it a certain way
I figure I could do that with a broadcast receiver, right?
But I don't want to have to start it, or otherwise why not just start the camera?
Mark M.
maybe, but I doubt it
it's possible that ACTION_CONFIGURATION_CHANGED broadcasts would cover your needs
and I forget off the top of my head if you can register for that in the manifest or not
Ken K.
So just use an implicit intent and go from there?
Mark M.
well, more using an <intent-filter> and listening for the implicit Intent
Ken K.
yes, that's what I thought
Mark M.
but it is possible that ACTION_CONFIGURATION_CHANGED, like ACTION_BATTERY_CHANGED, cannot be registered for in the manifest
because it might get broadcast too frequently
Ken K.
hmm
Mark M.
and, ACTION_CONFIGURATION_CHANGED is only for configuration changes, not arbitrary movement
Ken K.
I didn't see any intent strings about the accelerometer
Mark M.
there aren't any
you have to use SensorManager and register a listener
so, it's entirely possible that the only SDK-level solution would be to have an everlasting service
which I am not a fan of
Ken K.
probably not what the user wants, either
well, it was just a thought
Mark M.
now, if your wife's phone shipped with this capability, they probably implemented special hooks for it at a lower level
where they can do it much more efficiently
Ken K.
makes sense
what do you think L will eventually stand for?
Licorice? Lollipop? Lemon (hopefully not)?
Mark M.
I think Vegas still has Lollipop in the lead
4:50 PM
Mark M.
Lemon Meringue Pie is coming on strong
Ken K.
hah
any idea when they'll announce that?
Mark M.
in time for the holiday season
which, in Google's case, means anytime before Thanksgiving
and often times not a lot before Thanksgiving
Ken K.
sounds good
How long do your chats go?
Mark M.
unlike Apple, Google is big on the surprise announcement approach for SDK releases
an hour
Ken K.
Are you impressed by Wear yet?
Mark M.
um, it's OK
Ken K.
yeah, that's my impression too
still waiting for a compelling use case
Mark M.
it'll take another two generations of hardware before it's svelte enough IMHO
and, I agree, I'm short on use cases
Ken K.
I guess we'll find out what Apple thinks next week
Mark M.
yeah, if they release an iWatch, it's likely to push the design envelope ahead more rapidly
Ken K.
Plus they're supposedly doing something with payments
Where are you based, btw?
Mark M.
my Secret Mountain Lair is in Pennsylvania
Ken K.
My family lives in York (I live in Connecticut)
4:55 PM
Ken K.
My sister is in the Philadelphia area
Mark M.
I'm about 90 minutes from York, in the Allentown area
Ken K.
Been there several times :)
I think I'm all set
One joke for you
You may laugh at Google glass now
but in the end, it's step 1 on the way to an Iron Man suit :)
Mark M.
I'm holding out for repulsors
Ken K.
that would be seriously cool
Especially now that Star Trek communicators are so disappointingly limited
Mark M.
BTW, the chat transcripts are archived at http://commonsware.com/office-hours/
I will scrub out your email address, if you like
Ken K.
ah, that's helpful, thanks
no, it's already all over the web
but thanks for the offer
5:00 PM
Mark M.
and that's a wrap for today's chat
Gabriele
thank you Mark
Ken K.
yes, thanks
Mark M.
next one is Tuesday at 7:30pm US Easter Time
er, US Eastern Time
Gabriele
have a nice weekend! :)
Mark M.
you too!
Ken K.
you too
Gabriele
has left the room
Ken K.
has left the room
Mark M.
turned off guest access

Yesterday, September 4

 

Office Hours

People in this transcript

  • Gabriele
  • Ken Kousen
  • Mark Murphy