Office Hours — Today, January 5

Tuesday, January 3

Jan 5
3:55 PM
Mark M.
has entered the room
Mark M.
turned on guest access
4:05 PM
Kathy
has entered the room
Mark M.
howdy, Kathy!
how can I help you today?
Kathy
Howdy Mark
I was recently looking at the android souce code on line. In one of the Java programs it looked like a C program was being called, but I could not find the source code for it. Do you know where that source code is?
Mark M.
um, well, it's in the source code :-)
I certainly can't tell you where every line of C code resides
usually, once I hit a native method, I just stop
what specifically were you looking at?
Kathy
Do you know where the native code is to look at?
Mark M.
well, there's tons of it
so, beyond http://source.android.com, I cannot tell you anything more in the abstract
Kathy
I could not find it, maybe I wasn't looking in the right place.
4:10 PM
Kathy
I actually could not find any of the C code.
or native code.
Mark M.
what specifically were you looking at?
Kathy
I would have to go out right now and try and find it again. I thought maybe the native code was someplace else and that was why I could not find it.
Mark M.
from what I have seen, it is not usually in the same directory as the Java source
Kathy
What directory is it in?
Mark M.
I have not bothered hunting for it too often -- again, if I hit a native method, I know I have gone too far down the rabbit hole
well, that varies
if you come up with an example sometime, I can try to help you find the answer, but I cannot address this generically
Kathy
okay
I have another question.
Mark M.
go right ahead
Kathy
I got a kindle touch for XMAS and I am trying to get your books onto my kindle. I downloaded the mobi files and copied them into the documents folder on my kindle per the kindle instructions. I am not able to see the books on my kindle so I was wondering if I am suppose to download the kindle books a different way or something.
4:15 PM
Mark M.
no, that should work
make sure the files look like they downloaded (they should be several MB each, not just a few bytes)
it is conceivable that the Kindle Touch behaves differently than all the other Kindles
in which case, I'm not quite certain how you would get books on there
Kathy
They are. I just wanted to make sure I was downloading them right before I start pursuing a problem with the kindle itself.
Mark M.
since there are many other sources of MOBI files, you might see if Amazon has any support pages for the Touch indicating how to load files via USB
Kathy
The only thing I could find that might cause this problem in the kindle discusssions were DRM issues.
Mark M.
there's no DRM on my files
in fact, AFAIK, the only DRM possible with the Kindle is with AZW files you get from Amazon directly (which is basically a DRM wrapper around a MOBI file)
Kathy
I did find the Kindle Touch documentation for adding the mobie files through the USB connection and that is what I did and followed.
Mark M.
that's disturbing
Kathy
So, it sounds like a problem with my kindle touch. It would not be the first.
Mark M.
what's supposed to happen is that after you unmount the drive from your desktop/notebook, and the Kindle returns to normal, the books should appear alongside all your other ones
you might grab another MOBI file from someplace else (Project Gutenberg, Baen Free Library, etc.) and try that
Kathy
Yes, that is what the kindle touch documentation also said should happen.
Mark M.
if that one works, odds are it is something on my end
Kathy
That was my next step is to try another mobi.
Mark M.
if that one fails, then there may be something out of sync with the Touch
4:20 PM
Kathy
The Kindle Touch is new and there are some issues with it. If I am able to successfully load the other mobi I will let you know.
Mark M.
please do
Kathy
I have been synching it also. turning it off and on, ect...
4:25 PM
Kathy
I have been opening the kindle files from your website and doing a save as. I am looking at the file types and they are MHTML DOCUMENT.
Mark M.
:: shrug ::
I don't know what that means
if the files are several MB in size and have a .mobi extension, they are probably good
Kathy
What is the best way to download your books from your website?
Mark M.
right-click over the links and do Save Link As or the equivalent (name varies by browser)
Kathy
I am using Windows Internet Explorer. The kindle files I just downloaded from gutenberg are showing up just fine on my kindle.
Mark M.
on your Warescription page, in the books table, click the Refresh button towards the upper-left of the page, then right-click over one of the books and do Save Link As... or the equivalent
copy that into the Kindle's documents/ directory
and see what happens
4:30 PM
Kathy
I just did all that and it still wants to save it as a html file. I need to figure out how to get it to save properly. I don't have this problem with your pdf files. I can try another browser.
Mark M.
yeah, try another browser
I seem to recall IE having some issues with the MOBI stuff, though I have never been able to figure out quite why
4:35 PM
Kathy
Success, I used firefox and it worked and it is on my kindle. I was able to successfully download the kindle file from the gutenberg website using IE.
Mark M.
interesting
could you paste here the specific Gutenberg link that worked?
Kathy
I went to this site and selected the kindle download. http://www.gutenberg.org/ebooks/14264
Mark M.
OK, I'll try switching to the MIME type that they are serving and see if that helps
thanks!
4:50 PM
James T.
has entered the room
Mark M.
howdy, James!
how can I help you today?
James T.
Hi
I've got a question about onSaveInstanceState and fragments
for some reason it is never called
Mark M.
correct
oh, no, wait
hold ond
er, on
sorry, I was thinking of something else
AFAIK, it should be called
are you using native Honeycomb fragments, or the Android Support package?
James T.
Support package
There are a couple of other people with the same problem on SO, but so far no answers
Well, I guess the first question should be, is that how I should be saving my state for configuration changes?
Mark M.
that's certainly one approach
if the fragment is dynamic (created via FragmentTransaction), you could use setRetainInstance(true)
James T.
It's not dynamic
4:55 PM
Mark M.
I'm using onSaveInstanceState() in the EU4You_6 sample app from the books
last I checked, it worked
however, there have been an update or two to the Android Support package since I last tried it
I will try it again with the latest Android Support stuff this weekend
I will update that SO issue with my results
James T.
Awesome. I'll check out the sample you pointed me to and make sure I have the latest support package. Thanks for producing some great learning materials and for all the help you give the community.
Mark M.
happy to help
we're running out of time -- any other questions from anyone?
James T.
oh, real quick
are these office hour sessions saved any where for other users to see what was asked?
Kathy
no, still looking for the native code. Thanks for all of your help, especially with the kindle.
Mark M.
James: I post them to the Web site and email the links to the [cw-android] Google Group
one of these decades, I'll set up an RSS or Atom feed and get it all more formally linked into the site
too many to-do items, too little time...
James T.
I understand. The google group should work fine. Thanks again.
5:00 PM
James T.
has left the room
Mark M.
well, that's a wrap for today's chat
next two are Tuesday and Thursday, 7:30pm Eastern
have a pleasant day!
Kathy
has left the room
Mark M.
turned off guest access

Tuesday, January 3

 

Office Hours

People in this transcript

  • James Trimble
  • Kathy
  • Mark Murphy