Jun 29 | 3:50 PM |
Mark M. | has entered the room |
Jun 29 | 3:55 PM |
Mark M. | turned on guest access |
Mark J. | has entered the room |
Mark M. |
howdy, Mark!
|
Mark J. |
howdy howdy
|
Jun 29 | 4:00 PM |
Mark M. |
how can I help you?
|
Mark J. |
I got a question for you, not programming/java
related.
|
Mark M. |
no, I don't know why they picked that color green
for Android
|
Mark M. |
oh, wait, that probably wasn't the questoin
|
Mark M. |
:-)
|
Mark J. |
Damn, I was hoping for tha cyanogen blue
|
Mark J. |
:)
|
Mark J. |
How many, and which, Android devices do you have?
|
Mark M. |
let's see...in rough chronological order...
|
Mark M. |
T-Mobile G-1
|
Mark M. |
Google Ion (a.k.a., HTC Magic)
|
Mark M. |
Motorola CLIQ
|
Mark M. |
two HTC Heroes
|
Mark M. |
two Motorola DROIDs
|
Mark M. |
HTC Tattoo
|
Mark M. |
HTC EVO 4G
|
Mark M. |
Nexus One
|
Mark M. |
HTC Incredible
|
Mark M. |
that makes 11.5
|
Mark M. |
and the ARCHOS 5 Android tablet, which I list
separately because it's only a sorta-Android device, IMHO
|
Mark M. |
not counting the nook, which is powered by
Android, not that you'd ever know
|
Mark J. |
Is it really?
|
Mark M. |
is what really?
|
Mark J. |
the nook, Android powered
|
Mark M. |
yes
|
Mark M. |
already been rooted and stuff
|
Jun 29 | 4:05 PM |
Mark J. |
Well, damn, I guess missed that news.
|
Mark M. |
quirky when you try running regular Android apps
on it, IIRC
|
Mark J. |
So, which device would you say is your favorite?
|
Mark M. |
that depends on whether you take carriers into
account, and the uses of the device
|
Mark M. |
my day to day phone is the Nexus One, because it
runs on T-Mobile
|
Bonnie C. | has entered the room |
Mark J. |
Okay, so it gets the most use?
|
Bonnie C. |
Hello
|
Mark M. |
as a quasi-tablet, the EVO 4G has a pretty slick
screen, though the battery life leaves something to be desired
|
Mark M. |
for personal stuff, yes
|
Mark M. |
howdy, Bonnie!
|
Danny B. | has entered the room |
Mark M. |
and, howdy, Danny!
|
Danny B. |
Hi there.
|
Bonnie C. |
Hi everyone :)
|
Mark M. |
Mark: did that answer your question?
|
Mark J. |
Yeah :P, I will keep myself quiet for a little bit
|
Mark J. |
GO ahead and move one :)
|
Mark M. |
OK, Bonnie, did you have a question?
|
Bonnie C. |
Yes, although it's probably very basic. I'm sort
of learning Java as I'm learning Android.
|
Bonnie C. |
I'm doing one of the tutorials right now.
|
Brian C. | has entered the room |
Bonnie C. |
It's page 19-20 in the Tutorial book.
|
Bonnie C. |
I'm not sure why but the code doesn't run because
there's an error with onSave
|
Mike R. | has entered the room |
Mark M. |
first, which version of the book do you have?
check the cover page
|
Mike R. |
Hi
|
Mark M. |
(btw, howdy, Brian and Mike!)
|
Brian C. |
Hi, everyone.
|
Bonnie C. |
Version 2.8
|
Jun 29 | 4:10 PM |
Mark M. |
OK
|
Bonnie C. |
Is it because it's for Android 2.2 and I'm using
2.1 because my phone's got the 2.1 OS and I'm testing on it?
|
Mark M. |
No, the tutorials all work with 2.1 -- I recommend
2.1 for this edition of the book
|
Bonnie C. |
Ok
|
Mark M. |
when you say "there's an error with onSave", what
is the error?
|
Bonnie C. |
onSave cannot be Resolved
|
Mark M. |
that means you do not have onSave in your source
code
|
Mike R. | has left the room |
Mark M. |
onSave is defined in the box at the top of page 20
|
Mark M. |
you can also see the whole project in its entirety
on github
|
Mark M. | |
Bonnie C. |
Ok
|
Mark M. |
Let me take some questions from the others, then I
can circle back to you if you are still having trouble
|
Mark M. |
Danny: do you have a question?
|
Danny B. |
I have a nonstandard question. I'm porting an
application called RoadMap. It's already a multiplatform app - several
unixes, Windows CE, iphone, .. - and I'd like it on Android too. Written
in C so I'm using the NDK and rewriting the portability layer. It's
well written but Android is somewhat different, and I'm still learning
about Android :-)
|
Bonnie C. |
Ok
|
Jun 29 | 4:15 PM |
Danny B. |
So let me cut it into something you might want to
think about.
|
Danny B. |
I have a periodic event that I'm causing to happen
by using sendMessageDelayed, and then sending it again from the
handler.
|
Danny B. |
Inside the handler I'm (re)drawing stuff, and they
appear only partially; it looks like during the (re)draw, part of the
previous drawing remains, then it gets erased, and then only half of the
drawing is visible until the next handler call.
|
Danny B. |
And I am wondering what's causing this :-)
|
Mark M. |
well, I have not done anything with low-level
drawing primitives
|
Mark M. |
hence, I haven't a clue
|
Danny B. |
Fair enough. Thanks. On to the next, I'd say.
|
Mark M. |
bear in mind that drawing events, like anything
else, wind up as messages on the message queue
|
Danny B. |
Yes...
|
Mark M. |
hence, it may be that not enough of your drawing
events get processed before your next sendMessageDelayed() is triggered
to run
|
Mark M. |
you might want to look at how games are written
(e.g., the LunarLander sample app)
|
Jun 29 | 4:20 PM |
Danny B. |
I would be able to eliminate that by lowering the
frequency, right ?
|
Mark M. |
in principle, yes
|
Mark M. |
OK...Brian, did you have a question?
|
Danny B. |
Already tried that, it doesn't :-( I did browse
the LunarLander, but your suggestion may be a good one - I'll disect it
more, and one or two other tutorials. Again, thanks.
|
Brian C. |
yes, need some advice
|
Brian C. |
If I have a series of listviews, and the selcetion
from the last is ultimately the value I want to return to the activity
that started the selection, would you do that in a viewpflipper or as a
series of startActivityForResult calls?
|
Mark M. |
um
|
Brian C. |
like, say I want to select a city from somewhere
in the US for use in my app, and I start with a listview of regions,
then use that to determine which data to present in a listview of states
|
Brian C. |
then drill down to city
|
Brian C. |
get my drift?
|
Jun 29 | 4:25 PM |
Mark M. |
yes, I get your drift
|
Danny B. | has left the room |
Mark M. |
my gut is to use activities
|
Mark M. |
I am somewhat nervous about too deep of a chain of
startActivityForResult() calls
|
Mark M. |
however, I have never tried that
|
Brian C. |
so, I'd like to have the back button work to back
up if the selection was a mistouch, which would work well as a series of
activities, then I guess I'd just need to finish() each activity in the
onResult method?
|
Mark M. |
onActivityResult(), yes
|
Brian C. |
or, I could use a ViewFlipper and intercept the
back key event was my other thought
|
Mark M. |
with the ViewFlipper, you'd override the BACK
button with onBackPressed() (or onKeyDown() for Android x.1)
|
Mark M. |
and have it flip you back a level, or do the real
BACK processing if you're at the top
|
Mark M. |
my concern there is having a very fat activity, in
terms of heap space
|
Brian C. |
Yes. It could potentially be quite large with all
the cities loaded in the one activity
|
Mark M. |
I'd probably start with the chained set of
activities, then look to coalesce into one if that causes problems
|
Brian C. |
OK, thanks for the advice
|
Mark M. |
and on a completely unrelated note, ESP 1, POR 0
in Whirled Cup, meaning my current host country is in a state of
mourning right now
|
Mark M. |
OK...Mark, do you have a question?
|
Mark J. |
Nope, just trying to figure out AsyncTask, I will
let you know if I do.
|
Jun 29 | 4:30 PM |
Mark M. |
just be sure to let me know from onPostExecute()
|
Mark M. |
Bonnie: did you solve your onSave problem?
|
Mark M. |
:-)
|
Mark J. |
If I can make it that far :)
|
Bonnie C. |
Yes, I just copied and pasted. My problem must
have been a simple typo on my part :)
|
Mark M. |
ah, OK. Any other questions, while it is your
turn?
|
Bonnie C. |
Nothing for now. I'm just absorbing all the
tutorials.
|
Mark M. |
OK...Brian, any questions?
|
Brian C. |
No, I'm good, thanks
|
Mark J. |
I have one: Favorite Applications?
|
Mark M. |
OK, well, if any of you come up with a question,
chime in!
|
Mark M. |
well, I'm not the most typical Android user
|
Bonnie C. |
I just got my phone and am having trouble getting
data through Fido.
|
Jun 29 | 4:35 PM |
Bonnie C. |
From what I gather online, it could be something
to do with the Rogers update.
|
Mark M. |
notables on my Nexus One beyond the typical apps:
Ambling BookPlayer (excellent audiobook app), KeePassDroid (password
safe), Remember the Milk, StreamFurious Pro, and the TripIt client
|
Mark M. |
Bonnie: sorry to hear that!
|
Bonnie C. |
I might be simply forced to download and install
the Rogers update (Rogers owns Fido).
|
Bonnie C. |
I'm going to ask next time I'm in the store.
|
Bonnie C. |
I have a question/suggestion about the game
Replica Island.
|
Bonnie C. |
The source has been put online.
|
Bonnie C. |
I'm trying to learn game development. Mark, if
you can, would you be able to go through the code and explain/document
it for training purposes?
|
Mark M. |
Not a chance
|
Bonnie C. |
Aww ok :)
|
Mark M. |
I haven't done 2D game development in about two
decads
|
Mark M. |
at least, not until 2011 sometime
|
Mark M. |
er, decades
|
Mark M. |
suffice it to say, I'm a wee bit out of date on
the subject
|
Bonnie C. |
That's alright, it was worth a shot. I hope
someone doe sit.
|
Bonnie C. |
*does it
|
Jun 29 | 4:40 PM |
Mark M. |
you'll find bits and pieces of info on the
author's blog: http://replicaisland.blogspot.com/
|
Mark M. |
however, it looks reasonably advanced, in terms of
subject matter
|
Bonnie C. |
Yeah, I checked it out.
|
Brian C. |
You might reach out to Leigh McRae from
lonedwarfgames.com also, Bonnie.
|
Bonnie C. |
I'm looking for a book or mentor that will bring
someone from a beginner to the advanced level.
|
Bonnie C. |
Thanks
|
Mark M. |
I have not read _Pro Android Games_, though I seem
to recall it getting some favorable reviews
|
Bonnie C. |
I just ordered that.
|
Bonnie C. |
But according to the review, the author assumes
the reader has experience developing games.
|
Bonnie C. |
While I could read books on game development, I
heard you need to design games with Android in mind from the very start,
or you'll need massive redesign.
|
Bonnie C. |
So I'm looking for reading material (beginner
level) that does both.
|
Mark M. |
ah
|
Bonnie C. |
I'll see if I can contact Leigh McRae
|
Bonnie C. |
Thanks for the tip :)
|
Jun 29 | 4:45 PM |
Mark J. |
Alright well, I have a question, it may take a
minute to explain though
|
Mark J. |
Well actually it's a few questions.
|
Mark M. |
fire away
|
Mark J. |
Alright well, as I said, I was looking at
AsyncTask, Do you that this would be an okay solution for RSS? So it
does not lock up the UI Thread?
|
Mark J. |
Or should I try a service?
|
Mark M. |
bot
|
Mark M. |
er, both
|
Jun 29 | 4:50 PM |
Mark M. |
Services are "background" in that they do not have
a UI
|
Mark M. |
Services are not "background" from a threading
standpoint -- they run on the main application thread by default
|
Mark M. |
Using an AsyncTask invoked by a Service to fetch
your feeds is a fine strategy
|
Mark M. |
It is similar to the Service/WeatherPlus sample in
The Busy Coder's Guide to Android Development
|
Mark J. |
Alrighty, I will take a look at that, I will
update you if I have more questions :)
|
Jun 29 | 4:55 PM |
Mark M. |
any last questions?
|
Bonnie C. |
I have another tutorial question
|
Mark J. |
What color is the Android logo?!?! :P
|
Bonnie C. |
lol
|
Mark M. | |
Mark M. |
#A4C639
|
Mark M. |
Bonnie: go ahead
|
Bonnie C. |
In the Busy Coder's book, I was doing the tutorial
named 'Now' with the button that updates the date.
|
Bonnie C. |
In the last line of the book's code, there's
nothing in the constructor for Date()
|
Bonnie C. |
This brings up an error in my compiler. It
expects an int.
|
Jun 29 | 5:00 PM |
Mark M. |
There are six possible Date constructors
|
Mark M. |
One takes no parameters, and results in a Date
object representing the current date/time
|
Mark M. |
Make sure you are using java.util.Date and not
java.sql.Date
|
Bonnie C. |
Ah, that's probably it
|
Mark M. |
yeah, I wish the Java folk had not created two
Date classes
|
Mark M. |
a long time annoyance
|
Bonnie C. |
Hehe :)
|
Bonnie C. |
Thanks, that fixed the problem.
|
Mark M. |
and that wraps today's chat
|
Mark J. |
Alright, Seeya next time Mark
|
Mark M. |
Thursday will have another chat at the same time
-- 4pm US Eastern, 1pm US Pacific, 9pm Portugal
|
Bonnie C. |
I only took one community college class of C++ a
couple of years ago.
|
Mark M. |
have a pleasant evening, everyone!
|
Bonnie C. |
Thanks :)
|
Mark J. | has left the room |
Bonnie C. | has left the room |
Brian C. | has left the room |
Mark M. | turned off guest access |