Oct 5 | 9:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Mark M. | has entered the room |
Mark M. | has left the room |
Oct 5 | 10:00 AM |
brian k. | has entered the room |
brian k. |
morning mark!
|
Mark M. |
howdy, Brian!
|
Mark M. |
how can I help you today?
|
brian k. |
first -- thanks again for the class in NYC -- very helpful!
|
Mark M. |
you are very welcome!
|
brian k. |
we are getting close to releasing the app i was working on but came across an odd behavior on the Nexus 7 in the Geocoder
|
Oct 5 | 10:05 AM |
brian k. |
i posted to stackoverflow and android developers but got no response
|
brian k. | |
brian k. | |
Mark M. |
I have not used Geocoder, but historically, it has not exactly been a bastion of reliability
|
brian k. |
on stackoverflow another person confirmed the same issue
|
brian k. |
odd thing is the issue seems ot come and go but seems most pronounced on the NExus 7
|
Prasanna | has entered the room |
Mark M. |
you probably should consider posting the full stack trace in the future
|
Mark M. |
without that, nobody is really going to be able to help a lot
|
brian k. |
good point
|
Mark M. |
(BTW, howdy, Prasanna!)
|
Pedro T. | has entered the room |
Prasanna |
Hi Mark!
|
brian k. |
i can repost it
|
Pedro T. |
Hi everyone!
|
Mark M. |
have you tested it in the Jelly Bean emulator?
|
Mark M. |
(howdy, Pedro!)
|
brian k. |
we fallback to the Maps API but since it caps at 2,500 requests per day i'm concerned about releasing it to production
|
brian k. |
no -- thought the device would be a better test
|
Mark M. |
it feels like this may be tied to Jelly Bean, more than hardware
|
Mark M. |
that's just a guess
|
Mark M. |
and, as I noted, since Geocoder has never been all that stable, I've never touched it
|
Mark M. |
you might consider finding another third-party service that you can use
|
brian k. |
haven't been able to reproduce it on the Galaxy Nexus yet but i'll keep trying
|
Mark M. |
let me take questions from the others, and I'll be back with you in a bit
|
brian k. |
is there anyway to kick this up to someone at Google?
|
brian k. |
ok
|
Mark M. |
Prasanna: do you have a question?
|
Prasanna |
Yes
|
Mark M. |
(brian: oh, how I wish)
|
Prasanna |
View paste
|
Oct 5 | 10:10 AM |
Prasanna |
View paste
|
Mark M. |
I have no idea on either of those
|
Mark M. |
I have not experimented with adding custom contact data
|
Mark M. |
sorry!
|
Prasanna |
oh ok
|
Mark M. |
Pedro: do you have a question?
|
Pedro T. | |
Pedro T. |
Prasanna maybe you can examine the table under adb
under console I read some tables on console using sqlite3 after I enter
with adb shell. so then after reviewing the table maybe you can use a
query to modify the table as you want
|
Mark M. |
either you are truly out of memory, or your heap
is fragmented enough that there is no single block of memory big enough
for your needs
|
Mark M. |
Pedro: you cannot modify the database except as part of a firmware build or on a rooted device
|
Prasanna |
Thanks Pedro. Heading out mark. Thanks for doing these QA sessions. Have a good day all.
|
Pedro T. |
haa I have a rooted device maybe that's why i can do it. I never tried on a non rooted device
|
Mark M. |
with respect to your memory issue, the amount of *device RAM* is not that important
|
Mark M. |
the bigger issue is the amount of heap space per process, and what you are doing with the heap
|
Pedro T. |
ok.
|
Pedro T. |
but the extrange question is why the heap is growing that fast
|
Oct 5 | 10:15 AM |
Gabriele | has entered the room |
Mark M. |
dump your heap and use MAT to track down memory leaks
|
Gabriele |
hi
|
Mark M. |
(howdy, Gabriele -- I will be with you shortly)
|
Pedro T. |
ok
|
Mark M. |
and, again, it may be less of a full-fledged 'leak' than is a matter of heap fragmentation
|
Pedro T. |
the dump heap file of android is compatible with MAT?
|
Mark M. |
yes, if you dump it from DDMS in Eclipse
|
Pedro T. |
ok
|
Mark M. |
if you use standalone DDMS, there is a utility you need to use to convert the format
|
Mark M. |
this is covered in _The Busy Coder's Guide to Android Development_
|
Pedro T. |
I use DDMS under eclipse.
|
Pedro T. |
so great that is compatible
|
Mark M. |
also, bear in mind that your button backgrounds
are probably several times 40KB, as you will have different backgrounds
for normal, pressed, selected, etc. in your StateListDrawable
|
Mark M. |
and, 40KB is the on-disk compressed size, and so
each of those will take substantially more memory when loaded and
uncompressed into Bitmap objects
|
Mark M. |
hence, each of those buttons could be chewing up a few hundred KB
|
Mark M. |
but, again, I'd start with MAT and see if that tells you things you can do to improve matters
|
Mark M. |
let me take questions from the others, and I will be back with you in a bit
|
Mark M. |
Gabriele: do you have a question?
|
Gabriele |
yes
|
Gabriele |
View paste
|
Mark M. |
I have no idea
|
Oct 5 | 10:20 AM |
Pedro T. |
ok I will try with mat and then go back
|
Gabriele |
I've tried using setInitialScale, setScaleX (and Y), js, but the same happens
|
Mark M. |
wait a minute
|
Gabriele |
Sure. Alternatively, do you have an idea on how I
can save and restore the zoom "position" of the user? So he dosn't have
to use pinch-to-zoom every time he loads a new page on the WebView.
|
Mark M. |
I think you want setZoom() on WebSettings
|
Mark M. |
setScale() is actually scaling the View itself (e.g., for scale animations)
|
Mark M. |
setScale() has nothing to do with user zoom levels
|
Gabriele |
You meant setTextZoom?
|
Oct 5 | 10:25 AM |
Mark M. |
ah, yes, sorry
|
Gabriele |
Oh, ok, thank you, I'm going to try it right now! I didn't find it.
|
Mark M. |
Brian: do you have another question?
|
Mark M. |
Prasanna: do you have another question?
|
Mark M. |
Pedro: do you have another question?
|
Mark M. |
if anyone has another question, feel free to chime in and ask
|
Pedro T. |
not for the moment I want to solve this first
|
soli | has entered the room |
Mark M. |
howdy, soli!
|
Oct 5 | 10:30 AM |
Mark M. |
soli: do you have a question?
|
soli |
Hello!
|
soli |
yeah, just a minute:)
|
soli |
btw, can i stay here just for fun?
|
Prasanna | has left the room |
Mark M. |
um, sure, though these office hours are more for questions and answers than just hanging out
|
Mark M. |
if anyone has a question, feel free to ask
|
soli |
ok
|
soli |
So, I have a client that wants me to make a clone
of his iOS app, and i'm kinda weak in UI design.. which android ui
elements do I need to use to create something like that? or in other
words, how do i create a rectangle in the middle of the screen?
Gridview?
|
Gabriele |
Mark: which is the right event to detect user used pinch-to-zoom?
|
soli | |
Mark M. |
soli: I am not sure what in there is "a rectangle in the middle of the screen"
|
Oct 5 | 10:35 AM |
Mark M. |
you could accomplish it using nested LinearLayouts or a GridLayout
|
Mark M. |
Gabriele: I am not certain that there is an event for pinch-to-zoom that is raised for developers to listen for
|
Mark M. |
if there is one, I do not know what it is off the top of my head
|
Mark M. |
I do not recall seeing one
|
soli |
oh ok, thought that GridLayout is limited to higher API's
|
soli |
Thanks
|
Mark M. |
GridLayout is available as an Android library project from the Android Support package, working back to API Level 4
|
soli |
damn it is
|
soli |
Great!
|
Mark M. |
I think I have instructions for using the backport in my chapter on GridLayout in the book
|
soli |
thanks
|
soli |
i'll look into that
|
soli |
Ok, so i'm going to read about it. Thanks for this awesome service and your book
|
soli |
Bye
|
Mark M. |
you are most welcome!
|
brian k. |
thanks again mark - i'll try posting my stack trace and seeing it that helps someone to respond to my posts
|
Mark M. |
OK
|
Oct 5 | 10:40 AM |
Mark M. |
if you come up with a reproducible scenario, for any Nexus device or the emulator, consider filing an issue at http://b.android.com (assuming there is no such issue there already)
|
Mark M. |
the key is "reproducible scenario"
|
Oct 5 | 10:45 AM |
medhat | has entered the room |
Mark M. |
howdy, medhat!
|
Mark M. |
medhat: do you have a question?
|
medhat |
yes
|
medhat |
hi
|
medhat |
Actually, I like the book so much, but since it was merged into one book it is a little overwhelming to me.
|
medhat |
In many places you talk about the core chapters,
and I have been looking for a listing of those core chapters, but could
not find it.
|
medhat |
I found the listing of the trails.
|
Mark M. |
the core chapters are all of the front ones, up through the Getting Help chapter
|
medhat |
Is there a way to get a list of the minimum chapters I need to read to get started.
|
medhat |
thanks.
|
Mark M. |
i.e., everything that comes before the trails
|
medhat |
ok.
|
medhat |
that was my question :-) I guess I am a "very" busy coder that I couldn't figure that out by myself :-)
|
Mark M. |
I should try to make it more obvious
|
Oct 5 | 10:50 AM |
Mark M. |
if anyone has a question, feel free to ask
|
medhat | has left the room |
brian k. | has left the room |
soli | has left the room |
Gabriele |
Thank you Mark, see you the next time. :)
|
Mark M. |
OK
|
Gabriele | has left the room |
Oct 5 | 11:00 AM |
Mark M. |
that is a wrap for today's chat
|
Mark M. |
the next chat is Tuesday, IIRC
|
Mark M. |
have a pleasant day!
|
Mark M. | has entered the room |
Mark M. | has left the room |
Pedro T. | has left the room |
Mark M. | turned off guest access |