Office Hours ā€” Today, January 6

ā† Thursday, December 30, 2010

Mark M.
has entered the room
Mark M.
turned on guest access
Jan 6
4:00 PM
fitz
has entered the room
Mark M.
howdy, fitz!
how can I help you today?
fitz
hello - congrats on book revision - will read through it next week
Mark M.
thanks! another update being generated right now
fitz
I am again here to just learn and watch - any way to get emailed the chat files even if I miss session - just for my reference
Mark M.
they are posted to the [cw-android] Google Group, generally
fitz
ok cool - so now that you have had time to evaluate 2.3 - you like or so-so - see at CES they announced honeycomb already on Motorola tablet
Mark M.
as a user, Android 2.3 isn't that big of a deal to me at present
particularly since the SIP client doesn't work with my SIP provider
4:05 PM
Mark M.
as a developer, there is interesting incremental stuff, plus lots of goodies for game developers
fitz
cart before the horse - stuff is moving fast :)
Mark M.
since I'm not a game developer (nor do I play one on TV), the incremental stuff is my focus
now, Android 3.0, based on the video from yesterday, is quite a departure
not quite sure how to put that into context right now
fitz
ya same here - games are not my thing
have not had time to look at 3.0 - major direction change?
Mark M.
tough to describe in words
4:10 PM
fitz
ok will go look - listening to CES verizon - hope they have something to say :)
so I am just hanging to watch chats thanks
Mark M.
OK
4:30 PM
David
has entered the room
Mark M.
howdy, David!
David
Happy New Year! I want to make a Web Server send data to an Android device (usually client) sometimes. How can I do that?
4:35 PM
Mark M.
um
that doesn't make a lot of sense to me
Web servers are typically "pull" models, with clients initiating requests
what do you mean by "send data to an Android device sometimes"?
David
Whenever the server has an event, it will send the data. I know in terms of Server/Client. But is it possible to use socket?
Mark M.
You are welcome to use Java sockets in Android
Your problem is primarily in the server
and in the "sometimes"
and in the "send data"
David
Is the socket connection always on? Can the Android handle this?
The server will initiate the sending when it has an alert.
Mark M.
You probably want C2DM or Urban Airship, then
or SMS
rolling your own C2DM equivalent is certainly possible, but handling all scenarios will take quite a bit of time
for example, you need to be careful not to draw too much power
David
I will implement it too, but it has to go through Google network.
Mark M.
and, you need to deal with socket timeouts
and, you need to deal with network failovers from WiFi to 3G (or back to WiFi)
4:40 PM
Mark M.
if you have many developer-months lying around that you don't know what to do with, feel free to give it a shot
what we could use is an open source C2DM clone, so you can host this stuff yourself
alas, I am not aware of one
David
I see.
Mark M.
C2DM uses Google servers, Urban Airship uses Urban Airship servers
David
How about HTTP persistent connection?
Mark M.
see notes above about socket timeouts and network failovers
fitz
will your advanced book next version cover more on C2DM?
David
Will it work for my applicaiton?
Mark M.
fitz: it already has a chapter on it, and I do not expect to expand upon it any time soon
David: what is "it"?
David
That is a good news.
fitz
ok thanks
David
Somepeople suggests a proxy. Will it work?
I mean a proxy on Android.
Mark M.
I have no idea what that suggestion might be referring to, sorry
if you elect to implement your own C2DM-like system, watch the 2010 Google I|O presentation on C2DM
they mention a number of challenges they needed to overcome, that you will need to overcome in your own implementation
4:45 PM
David
Thanks.
Mark M.
also, bear in mind that C2DM does not require -- does not even *want* -- you to send much data
mostly, you send a "tickle" with a pointer to some place to get the real data (e.g., URL to a Web service)
hence, the C2DM message that passes through Google servers does not have to contain any data that Google could somehow use
David
There is little info on how to send content from App Server over C2DM.
Mark M.
the point is, you *don't* send "content" over C2DM, or Urban Airship for that matter
you send a short notice (handful of bytes) that your client on the device can use to go pull the "content"
e.g., a URL
David
I see. Thanks I make sense.
It makes sense.
Between C2DM and Urban Airship, which one do you recommend?
Mark M.
I have not used Urban Airship, I just know of it
4:50 PM
Mark M.
it has the advantage of working on a couple of platforms, whereas C2DM is Android-only
OTOH, C2DM is free, and Urban Airship is not, IIRC
David
That is good to know.
Mark M.
On a completely unrelated note, _Android Programming Tutorials_ Version 3.1 will be released in less than an hour
tested on Android 2.3, plus better material on getting Eclipse set up
and the ever-popular errata fixes
4:55 PM
fitz
nice - thanks for update
Mark M.
you can download the PDF now, unless you bought your Warescription in the past couple of weeks -- last handful of PDFs are being created now
EPUB and Kindle editions will roll out over the next several hours
running out of time -- any last questions?
fitz
nope cya
fitz
has left the room
David
That is all for today.
Thank you.
Mark M.
OK, have a pleasant day!
David
has left the room
Mark M.
turned off guest access

ā† Thursday, December 30, 2010

 

Office Hours

People in this transcript

  • David
  • fitz
  • Mark Murphy