Office Hours — Today, July 7

Tuesday, July 5

Jul 7
9:50 AM
Mark M.
has entered the room
9:55 AM
Mark M.
turned on guest access
10:15 AM
Dominic M.
has entered the room
Mark M.
howdy, Dominic!
Dominic M.
Howdy Mark!
Mark M.
how can I help you today?
Dominic M.
View paste
You answered a question of mine recently on stackoverflow regarding pros/cons of different ways of accessing data stored on phone from 3rd party apps. Thanks for your answer!
http://stackoverflow.com/questions/6534187/android-ipc-and-contentprovider-differences
You mentioned also that 3rd party apps could communicate with my service using intents and sending results back via a Messenger. I got this working but
am unsure if I've implemented correctly. Do you have any examples of this from your tutorials/book?
Mark M.
covered in the two chapters on services in _The Busy Coder's Guide to Android Development_
also, IIRC, tutorial #16 in _Android Programming Tutorials_ uses a Messenger
Dominic M.
Excellent, I'll take a look at them!!
Mark M.
yes, it does
10:20 AM
Mark M.
not much too it, really
Dominic M.
cool
Probably more specific question regarding this: Where or when should unbind from my service?
Mark M.
that's difficult to answer in the abstract
when your activity is destroyed, you definitely need to unbind or pass the binding to a new instance in the case of a configuration change (e.g., rotation)
beyond that, it's more tied to your business logic
Dominic M.
ok, thought the destroy method would be sufficient, so just checking
Also, another question: I'm considering using this intent-based form of IPC instead of full blown aidl IPC because it *seems* more straight forward. Any major differences between these two IPC techniques?
Mark M.
the command pattern (what I think you're referring to an "intent-based form of IPC") tends to lead to looser coupling, which I like
for example, if the activity sends a command with a Messenger, and the activity goes away (e.g., user presses BACK), the service can still chug along just fnie
er, fine
the service will get a RemoteException when it tries to send results via the Messenger, but it can simply ignore that
binding gets messy because the binding itself is state that has to be managed on a configuration change
10:25 AM
Mark M.
(e.g., bind using the Application context and pass the ServiceConnection from old to new instance via onRetainNonConfigurationInstance())
so, unless you absolutely need the richer API you get from binding (either AIDL or local binding), I lean towards the command pattern
Dominic M.
Ok, yeah, I'm leaning that direction too!
That's all my questions Mark! Thanks for all your work in the book and tutorials! They've been a great way to learn android!!
Mark M.
glad you like them!
Dominic M.
thanks, bye
Mark M.
see ya!
Dominic M.
has left the room
10:40 AM
fitz
has entered the room
fitz
helllo
hello
had to try that again :)
so I know you do not know a bunch or work on google stuff but....
Do you know anything about GWT - I am concerned that it might be dropped for another direction by google - think it is here to stay?
10:45 AM
Mark M.
dunno
fitz
thinking about using gwt for the heavey lifting of app
Mark M.
the Warescription site is written using GWT
fitz
ok
Mark M.
but I have no idea what Google's long-term intentions are
fitz
and you did that or someone did it for you
Mark M.
if by "did that" you mean wrote the site, I did the Warescription site
the main CommonsWare site was professionally designed
fitz
ok and GWT was fine to work with? I have read online that documentation and info on GWT is a mess
Mark M.
um, well, I'm not planning on using it again
fitz
so if I do some stuff in GWT and have an alert type message to get to android phone - what direction can you give me to look at for this alert link process
Mark M.
C2DM, Xtify, Urban Airship are the big three push options that I know of
I assume that's what you mean by "this alert link process"
10:50 AM
fitz
ok great thanks will look at that - on android side I should just focus on alert notice info that you have in the books?
Mark M.
if by "alert notice info" you mean Notification for status bar icons, yes, that's covered in _The Busy Coder's Guide to Android Development_
fitz
ok - and yes it will be status bar and a link to web site GWT location
ok thanks for you time cya
Mark M.
see ya!
fitz
has left the room
10:55 AM
Jonathan
has entered the room
Jonathan
hey Mark
Mark M.
howdy Jonathan!
chat's just about over -- how can I help you?
Jonathan
i did have a question for you on supporting Xoom tablets
our designer simply scaled up the design for the xlarge screen
however, to effectively use mdpi resources and not scale/stretch everything to fit the screen size would require separate resources for the xlarge screen
and then I found svg-android for SVG
what other implementations using SVG are you aware of?
and is this the best approach?
Mark M.
I'm not aware of any others
I do not know how efficient it is
Jonathan
hmm
Mark M.
it's mostly then a question of whether the app is too slow when using them
Jonathan
oh not at all
Mark M.
for example, using SVG in ListView rows might get dicey
Jonathan
it basically creates a PictureDrawable
Mark M.
if performance isn't an issue and you're getting good results from a look-and-feel standpoint, go for it
I really wish they'd've put an SVG renderer in the firmware, implemented in native code
Jonathan
awesome
i'd like to make an SVGDrwable subclass that I could specify in XML .. but i'm having a bit of trouble finding a good example of how to do this
Mark M.
oh, yeah, I have no idea if you can invent new Drawable XML structures
Jonathan
cool okay
thanks!
Mark M.
you could certainly do it as XML resources
11:00 AM
Jonathan
right now i have them in res/raw and refer to them that way
@raw/whatever
but would like to do things like statelist SVG drawables
Mark M.
XML would be faster to parse, though I don't know if the svg-android project can work with the data that way
Jonathan
and currently require code to convert the SVG raw into a PictureDrawable
Mark M.
yeah, I have no idea if that'd be possible
Jonathan
okay
Mark M.
and, that's a wrap for today's chat
next one is 7:30pm (US Eastern) on Tuesday
have a pleasant day!
Jonathan
cool, thanks again!
Jonathan
has left the room
Mark M.
turned off guest access

Tuesday, July 5

 

Office Hours

People in this transcript

  • Dominic Marmion
  • fitz
  • Jonathan
  • Mark Murphy