Office Hours — Today, July 26

Friday, July 22

Jul 26
7:25 PM
Mark M.
has entered the room
Mark M.
turned on guest access
7:40 PM
NetApex
has entered the room
Mark M.
howdy, NetApex!
NetApex
Evening
I finally made my first widget thanks to your books
Mark M.
how can I help you today?
widget widget, or app widget?
NetApex
Widget widget
Mark M.
that's cool
not all that many people doing that
7:45 PM
NetApex
I am looking to add a voice search button to it, but (hmm, actually app widget is probably the better answer)
But the search part seems a bit above me
Mark M.
for searching your own app, you mean?
NetApex
Right
Mark M.
how is your data stored?
NetApex
and to be honest, i just want te voice recognition to put te word in place and I could do the rest
It isnt stored in app actually, it queries our serves Global Address List
Mark M.
NetApex
(typing on the Tab so excuse the delay)
Hmm, that looks like exactly what I need
7:50 PM
Mark M.
note that I haven't actually tried that code
but, it seems straightforward enough
NetApex
oh I do have another question too
Mark M.
you're the only one here, so fire away
NetApex
This app isnt going on the market
so is there a straight forward way to, make it check somewhere for dates?
Err...updates
Mark M.
I'd have it grab a file from a well-known stable URL
where that file has info on the latest version (version code, URL to download the update, etc.)
NetApex
and more importantly how do you make it install the update?
Mark M.
I'd download the APK yourself
use the magic MIME type in the Intent
then, use startActivity() to kick off the install
application/vnd.android.package-archive
that will trigger the installation process, assuming the device is set up to allow non-Market installs
7:55 PM
NetApex
Ahh, so startActivity() will start the install if I get it downloaded
Mark M.
yup
in theory, you can hand it the URL
and Android can download it for you
NetApex
okay cool
Mark M.
but if you want to do the download in the middle of the night or something, that doesn't work so well
NetApex
I will have it check for an update when started and the download will be a choice then
at most 1 meg
Mark M.
that'll work, if the user won't mind the interruption
NetApex
Cool, sounds easier than i thought it would be
Not used to being able to hog all of your time
8:00 PM
Mark M.
yeah, I need to do a bit more to promote the chats, methinks
NetApex
If there was an app for it....
Having it remind people of the time and even be able to chat using it
Mark M.
I don't think there's an API for Campfire
NetApex
Dang
Mark M.
the reminder bit would be easy enough, though people could do that themselves by subscribing to the Google Calendar
I'll ponder it
NetApex
That's the catch i don't get a reminder for some reason
Mark M.
hmm, that's disappointing
NetApex
I have to remember to look
Mark M.
I've been poking around for another online calendar service to switch to
perhaps I'll have to escalate that process
8:05 PM
NetApex
I noticed you have been moving away from Google a bit, any certain reason?
Mark M.
they kinda messed up my accounts
Andrew H.
has entered the room
NetApex
Uh oh
Mark M.
I've never been a "put your eggs all in one basket" kind of guy anyway
Andrew H.
Hello
NetApex
Yeah
Mark M.
that incident just put more emphasis on trying to make myself less dependent upon any one firm
howdy, Andrew!
Andrew H.
This is my first time here
Mark M.
Andrew: do you have a question?
welcome!
if there's a big crowd, I try to go round-robin on questions
Andrew H.
Yes, let me see if I can figure out how to ask it
Mark M.
with a small group like this, just ask away!
Andrew H.
Ah
okay
Well I'm trying to do some 2D graphics stuff
with Canvas, and Path, and Drawables
and I'm stuck right now
Mark M.
oy
not my cup of tea
but, feel free to ask -- maybe you'll be lucky and hit one of the bits of 2D graphics stuff that I know
Andrew H.
Essentially I've been able to draw on the screen with my finger, create paths using quadTo, and draw the paths to the Canvas
which works
Ah, okay :P
However, when I draw enough paths, the app gets really laggy
8:10 PM
Andrew H.
since I'm having to redraw all the paths on the view each time I update a single Path
so, I've been trying to look into good Android graphics practices
I thought maybe I should create a single View for each Path, and add it to the parent View
Mark M.
yeah, definitely not my cup of tea
that's conceivable, but it doesn't feel likely
Andrew H.
but then I watched a talk by Romain Guy from Google and he said try to keep the number of Views to a minimum
so I thought I'd look into Drawables instead
Mark M.
I suspect it may be that you draw to a bitmap-backed canvas and blit the whole bitamp onto the real canvas, so you don't have to keep re-applying the paths
but, that's just a lightly-educated guess
Andrew H.
Hmm
haha
okay
so, create a bitmap out of my canvas each time I add a Path?
Mark M.
no
Andrew H.
and then just apply the bitmap, and a new path each time?
Mark M.
I am assuming that there is a reason you have to "keep re-applying the paths"
and I am guessing that this is due to something with the Canvas that you get in the drawing methods, having to rebuild the whole image
however, you can create your own Canvas, backed by a Bitmap, IIRC
so, each time you add a path, you add it to your Canvas
Andrew H.
well, right now when I update a path, I just invalidate the View, which in turn calls draw() on all the paths to redraw them all
which i know is not efficient at all
Mark M.
yeah, I'm really out on a limb here
8:15 PM
Mark M.
see if you can find an open source Android project that does some similar stuff, and see how they do it
or, try StackOverflow
Andrew H.
I _was_ able to make it more efficient by only invalidating a section of the view using invalidate(Bounds) and gave it the bounds of the Path I was updating
Mark M.
or, try a book that covers more 2D stuff (e.g., Ed Burnette's _Hello, Android_)
Andrew H.
okay, I did search StackOverflow
and didn't get too much help, but I'll look for an open source project or a book
Mark M.
I may get into 2D stuff, with an eye towards charts/graphs, in 2012
Andrew H.
I was hoping you covered what I'm looking for in your books :P
Which I bought yesterday
haha
Mark M.
assuming the whole Mayan calendar end-of-the-world thing gets delayed
NetApex
Lol
Andrew H.
haha
Mark M.
_Pro Android Games_ would be another candidate, though I have heard that its material is a bit dated
while you're not implementing a game, a book on Android game development is likely to have better 2D coverage than a general purpose guide
Andrew H.
Yea, I know a bunch of stuff changed in Honeycomb in terms of graphics
to make it work better
Mark M.
most of that would be behind the scenes with graphics acceleration
I don't think any Canvas-related APIs changed
Andrew H.
I was at Google I/O and watched a talk about graphics
Mark M.
leastways, not that I recall
Andrew H.
which helped, but I still don't really understand it all
not my strong point
well, they change the way invalidating works, from what I recall
so an entire parent doesn't get invalidated if only a child gets invalidated
8:20 PM
Andrew H.
instead it just rebuilds the "display list" or something
Mark M.
oh, yeah, I remember something about that
Andrew H.
I understand the concept...but I don't understand what it means for me and how I use it
haha
Mark M.
I think that's more for view hierarchies
Andrew H.
I assume I don't _have_ to "use" it...it just works
ah
Mark M.
(e.g., ListView and rows, TableLayout and rows)
Andrew H.
okay
NetApex
Ya know Mark, you should do a Google+ hangout once a month or so
Andrew H.
I'm trying to think if I have any other questions
I've got a few different projects I'm working on
Mark M.
NetApex: that implies that I would be on G+
which I'm not yet
NetApex
Ahh, well that should change
Andrew H.
Right now my main project is a startup making note-taking software for active-pen based tablets
8:25 PM
Mark M.
that certainly would explain all the path stuff
Andrew H.
Like the HTC Flyer, or the Lenovo ThinkPad Tablet that was announced last week
haha, yup :)
Mark M.
does the Flyer ship with a pen?
Andrew H.
Umm, I think it depends where you buy it
for a while I know Best Buy was not offering it _with_ the pen, you have to buy it separately for $80
which I thought was just ridiculous
but I believe it comes with the pen now
Mark M.
yeah, that's a little out there
Andrew H.
probably because no one was buying it
Mark M.
I played with a Kensington stylus with the XOOM early on
Andrew H.
but I believe the version of the ThinkPad tablet that comes with the pen is only $30 more
Mark M.
I also contributed to the Cosmonaut Kickstarter, and they're moving along
I think pen+tablet has interesting potential as an adjunct to traditional finger-based input
Andrew H.
interesting, I wasn't familiar with that kickstarter
yea, the advantage of these pens (on the Flyer and ThinkPad Tablet) is that they're "active"
Mark M.
Andrew H.
like a TabletPC
if you're familiar with those
Mark M.
right
vaguely
Andrew H.
Yea, well they're pretty awesome
I used one in college, and I really wished there was something more like today's Android tablets paired with those pens
Mark M.
I'm just glad we've moved past the clay tablets I had to use in college
Andrew H.
haha
NetApex
Hehe
8:30 PM
Mark M.
ok, that's a wrap for today's chat
next one is Thursday, same time (7:30pm Eastern)
Andrew H.
Alright
thanks for your help
NetApex
Alright, have a good one
Andrew H.
or at least pointers in the right direction
:)
Mark M.
have a pleasant day, everyone!
NetApex
has left the room
Andrew H.
has left the room
Mark M.
turned off guest access

Friday, July 22

 

Office Hours

People in this transcript

  • Andrew Hughes
  • Mark Murphy
  • NetApex