Office Hours — Today, March 11

Tuesday, March 9

Mar 11
9:55 AM
Mark M.
has entered the room
Mark M.
turned on guest access
10:25 AM
Jim J.
has entered the room
Jim J.
Hello Mark. I love your books. They help a lot. Got time for a quick question ?
Mark M.
sure!
Jim J.
How do you obtain the name and email address of the owner of the phone ? Is it even possible ? I have a registration form and it would be cool if I could pre-fill this data.
Mark M.
Lots of people ask that
I do not know the answer, though
I have not seen an obvious API for it
10:30 AM
Jim J.
I was afraid you might say that.
Mark M.
It would not shock me if it is not available, for privacy reasons
Jim J.
My experience is that Java object serialization works fast enough on Android for my purposes. I do not have large object graphs. Do you think I am painting myself in a corner ? I am serializing to a servlet and back.
Mark M.
Oof
Jim J.
Huh?
Mark M.
I'm not sure if Dalvik VM is committed to maintaining serialization compatibility with other VMs
I don't trust serialization between environments in general, though I'm kinda conservative on that point
Jim J.
Really. Hhmm.... Right now anyway it works with Google App Engine.
Mark M.
Personally, I'd use some format you control
either text based (JSON, XML)
or binary (...can't remember the name of the Facebook stuff they open sourced to Apache, but that works on Android)
Jim J.
That reminds me. Any idea how to post an event to facebook and/or twitter ?
Mark M.
Ah, Thrift is what I was thinking of
10:35 AM
Mark M.
while advertised for RPC, you can use it for just serialization
Jim J.
What is Thrift ?
Mark M.
the Facebook stuff they open sourced to Apache, but that works on Android
supposedly the binary format is optimized for over-the-wire transport
For posting to Twitter, consider using ACTION_SEND and letting the user control the posting
I'll have more coverage of this in the next Advanced Android update, due out soon
If that is unacceptable, use JTwitter
the JAR used in the Advanced Android and Android Programming Tutorials books
for Facebook, beats me
Jim J.
Do you think I will have to obtain the user's twitter and facebook credentials or can I just get some sort of valet token and post on their behalf ? I don't really want to know there creds.
Mark M.
Well, you can try OAuth, but that's difficult to integrate -- it's designed for Web apps
otherwise, you will need their credentials, at least for Twitter
10:40 AM
Jim J.
This has been a great help. Thank you very much. I look forward to your next updates, especially any concerning posting to social networking sites. Have a great day !
Mark M.
You too!
Jim J.
has left the room
10:45 AM
Mark M.
turned off guest access

Tuesday, March 9

 

Office Hours

People in this transcript

  • Jim Jackson
  • Mark Murphy