Mark M. | has entered the room |
Mark M. | turned on guest access |
Gabriele | has entered the room |
Mark M. |
hello, Gabriele
|
Mark M. |
how can I help you today?
|
Gabriele |
hi :) today I'm here just to observe :P
|
Gabriele |
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 :)
|
Gabriele |
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!
|
Mark M. |
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?
|
Sep 5 | 4:05 PM |
Ken K. |
Yes.
|
Ken K. |
Sorry. Quick explanation
|
Ken K. |
I added the event to my Google calendar
|
Ken K. |
that directed me to the Google Hangout for some odd reason
|
Ken K. |
I closed it and came here. No prob.
|
Mark M. |
considering that I don't use Google Hangouts, that is definitely odd
|
Mark M. |
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
|
Ken K. |
Mark, I've been wanting to meet you for some time
|
Ken K. |
I'm a speaker on the No Fluff, Just Stuff conference tour (http://nofluffjuststuff.com)
|
Ken K. |
and I regularly give talks on Android development
|
Ken K. |
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
|
Mark M. |
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
|
Mark M. |
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
|
Ken K. |
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
|
Ken K. |
Mine is going to be the "Gradle for Android" book
|
Ken K. |
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
|
Ken K. |
They'll pay me royalties, but own the copyright
|
Ken K. |
Not nearly the cool situation you have
|
Ken K. |
I've also been talking to Xav Ducrohet about it as well
|
Sep 5 | 4:10 PM |
Mark M. |
hey, if you can get Xav's time, that's worth more than gold, or even ink-jet ink
|
Sep 5 | 4:10 PM |
Ken K. |
Next week at the SpringOne2GX conference (http://springone2gx.com) I'm giving a Gradle for Android talk
|
Ken K. |
absolutely
|
Ken K. |
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
|
Ken K. |
hah
|
Ken K. |
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
|
Ken K. |
but lately I've been getting more Android stuff
|
Ken K. |
I still have a lot to learn, though I'm making progress
|
Ken K. |
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
|
Ken K. |
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
|
Ken K. |
FYI, my published book is "Making Java Groovy", http://manning.com/kousen
|
Ken K. |
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
|
Ken K. |
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
|
Sep 5 | 4:15 PM |
Ken K. |
Anyway, I'd love to be able to talk to you about issue in the book as they arise
|
Ken K. |
with full credit, of course
|
Ken K. |
You already know Hans, I'm sure
|
Ken K. |
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 :)
|
Ken K. |
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.
|
Ken K. |
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
|
Mark M. |
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
|
Ken K. |
I won't give that out without your permission
|
Ken K. |
I'm at ken.kousen@kousenit.com
|
Ken K. |
My last name is pronounced like the relative (Cousin)
|
Ken K. |
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
|
Ken K. |
Now on to some technical stuff, unless Gabriele would like to get a word in edgewise
|
Mark M. |
normally I rotate between attendees
|
Mark M. |
but Gabriele had indicated when entering the room that she was just here to monitor
|
Sep 5 | 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
|
Ken K. |
i.e., more stable, better performing, etc
|
Ken K. |
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
|
Ken K. |
specifically
|
Ken K. |
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
|
Ken K. |
though it can generate Gradle build files
|
Ken K. |
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
|
Ken K. |
what do you check into source control?
|
Ken K. |
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
|
Mark M. |
and that's what I did in the book, in general
|
Ken K. |
Ah
|
Sep 5 | 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
|
Ken K. |
in ADT, I mean
|
Ken K. |
One issue I have with AS, though
|
Ken K. |
If you want to make a new flavor, it seems you have to build the whole directory structure yourself
|
Ken K. |
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
|
Ken K. |
I didn't realize until very recently
|
Ken K. |
that if you open the "terminal" window in AS
|
Ken K. |
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
|
Ken K. |
that I don't know.
|
Ken K. |
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
|
Mark M. |
Gabriele: not really
|
Mark M. |
getString() needs a Context
|
Mark M. |
you'll see in my ViewPager examples that I pass a Context to the PagerAdapter for this very reason
|
Gabriele |
thank you, Mark
|
Gabriele |
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
|
Sep 5 | 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
|
Mark M. |
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?
|
Ken K. |
the event bus, I mean
|
Mark M. |
LocalBroadcastManager is in the Android Support package
|
Mark M. |
though I use greenrobot's EventBus usually
|
Mark M. |
more flexible, less code
|
Ken K. |
greenrobot has that ORM tool, too, right?
|
Mark M. |
yes, though their event bus implementation is separate
|
Mark M. |
like Square's Otto, greenrobot's EventBus is a port of Guava's EventBus to be more Android-y
|
Mark M. |
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
|
Mark M. |
I'd pick a smaller library
|
Ken K. |
I like how they're multi-project builds in gradle, but haven't used on yet
|
Ken K. |
Yes, you're probably right
|
Mark M. |
I mean, if you wanted to demonstrate an ORM, greenrobot'
|
Mark M. |
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
|
Ken K. |
I need something simpler for that
|
Ken K. |
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
|
Mark M. | |
Mark M. |
top catalog of Android libraries out there at the moment
|
Ken K. |
Sweet. I'll check that out
|
Sep 5 | 4:35 PM |
Ken K. |
For unit testing, I've been using robotium, with the Solo class
|
Ken K. |
it's really functional testing, but it works
|
Ken K. |
they say from the gradle build all the tests run in parallel
|
Ken K. |
but when I do it, you can watch them one after the other
|
Ken K. |
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
|
Mark M. |
leastways, they were having some problems
|
Ken K. |
I've heard that too
|
Ken K. |
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
|
Ken K. |
Coming from server side Java, that seems strange to me
|
Ken K. |
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?
|
Ken K. |
headless emulator -- sounds familiar, but I haven't looked at that
|
Ken K. |
is it a command line option?
|
Mark M. |
yes, though I forget what it is
|
Ken K. |
I can look it up
|
Ken K. |
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
|
Mark M. |
it just won't actually render anything, though it behaves like it does
|
Ken K. |
good enough for the tests
|
Ken K. |
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
|
Mark M. |
and a wall full of hardware
|
Mark M. |
(well, OK, technically a door full of hardware)
|
Ken K. |
I've found that if I need to use the GPU on my machine
|
Sep 5 | 4:40 PM |
Ken K. |
which I always need to do in the newer emulators
|
Ken K. |
then I can only run one or at most two at once
|
Ken K. |
and I've got 16 GB of RAM :(
|
Ken K. |
but with genymotion, it works
|
Ken K. |
a door full of hardware sounds like a great name for a band
|
Ken K. |
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
|
Ken K. |
absolutely. HAXM rules
|
Mark M. |
I must warn you...
|
Mark M. |
while these office hours are held in a "chat room"...
|
Mark M. |
the normal flow is focused on questions and answers
|
Mark M. |
where I rotate among attendees to try to cover everyone's questions
|
Mark M. |
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
|
Sep 5 | 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
|
Mark M. |
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
|
Ken K. |
I figure I could do that with a broadcast receiver, right?
|
Ken K. |
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
|
Mark M. |
it's possible that ACTION_CONFIGURATION_CHANGED broadcasts would cover your needs
|
Mark M. |
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
|
Mark M. |
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
|
Mark M. |
you have to use SensorManager and register a listener
|
Mark M. |
so, it's entirely possible that the only SDK-level solution would be to have an everlasting service
|
Mark M. |
which I am not a fan of
|
Ken K. |
probably not what the user wants, either
|
Ken K. |
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
|
Mark M. |
where they can do it much more efficiently
|
Ken K. |
makes sense
|
Ken K. |
what do you think L will eventually stand for?
|
Ken K. |
Licorice? Lollipop? Lemon (hopefully not)?
|
Mark M. |
I think Vegas still has Lollipop in the lead
|
Sep 5 | 4:50 PM |
Mark M. |
Lemon Meringue Pie is coming on strong
|
Ken K. |
hah
|
Ken K. |
any idea when they'll announce that?
|
Mark M. |
in time for the holiday season
|
Mark M. |
which, in Google's case, means anytime before Thanksgiving
|
Mark M. |
and often times not a lot before Thanksgiving
|
Ken K. |
sounds good
|
Ken K. |
How long do your chats go?
|
Mark M. |
unlike Apple, Google is big on the surprise announcement approach for SDK releases
|
Mark M. |
an hour
|
Ken K. |
Are you impressed by Wear yet?
|
Mark M. |
um, it's OK
|
Ken K. |
yeah, that's my impression too
|
Ken K. |
still waiting for a compelling use case
|
Mark M. |
it'll take another two generations of hardware before it's svelte enough IMHO
|
Mark M. |
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
|
Ken K. |
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)
|
Sep 5 | 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 :)
|
Ken K. |
I think I'm all set
|
Ken K. |
One joke for you
|
Ken K. |
You may laugh at Google glass now
|
Ken K. |
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
|
Ken K. |
Especially now that Star Trek communicators are so disappointingly limited
|
Mark M. |
BTW, the chat transcripts are archived at http://commonsware.com/office-hours/
|
Mark M. |
I will scrub out your email address, if you like
|
Ken K. |
ah, that's helpful, thanks
|
Ken K. |
no, it's already all over the web
|
Ken K. |
but thanks for the offer
|
Sep 5 | 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
|
Mark M. |
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 |