Mar 11 | 9:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Mar 11 | 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
|
Mark M. |
I do not know the answer, though
|
Mark M. |
I have not seen an obvious API for it
|
Mar 11 | 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
|
Mark M. |
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
|
Mark M. |
either text based (JSON, XML)
|
Mark M. |
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
|
Mar 11 | 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
|
Mark M. | |
Mark M. |
supposedly the binary format is optimized for over-the-wire transport
|
Mark M. |
For posting to Twitter, consider using ACTION_SEND and letting the user control the posting
|
Mark M. | |
Mark M. |
I'll have more coverage of this in the next Advanced Android update, due out soon
|
Mark M. |
If that is unacceptable, use JTwitter
|
Mark M. |
the JAR used in the Advanced Android and Android Programming Tutorials books
|
Mark M. |
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
|
Mark M. |
otherwise, you will need their credentials, at least for Twitter
|
Mar 11 | 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 |
Mar 11 | 10:45 AM |
Mark M. | turned off guest access |