Jul 26 | 7:25 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Jul 26 | 7:40 PM |
NetApex | has entered the room |
Mark M. |
howdy, NetApex!
|
NetApex |
Evening
|
NetApex |
I finally made my first widget thanks to your books
|
Mark M. |
how can I help you today?
|
Mark M. |
widget widget, or app widget?
|
NetApex |
Widget widget
|
Mark M. |
that's cool
|
Mark M. |
not all that many people doing that
|
Jul 26 | 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)
|
NetApex |
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
|
NetApex |
It isnt stored in app actually, it queries our serves Global Address List
|
Mark M. | |
NetApex |
(typing on the Tab so excuse the delay)
|
NetApex |
Hmm, that looks like exactly what I need
|
Jul 26 | 7:50 PM |
Mark M. |
note that I haven't actually tried that code
|
Mark M. |
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
|
NetApex |
so is there a straight forward way to, make it check somewhere for dates?
|
NetApex |
Err...updates
|
Mark M. |
I'd have it grab a file from a well-known stable URL
|
Mark M. |
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
|
Mark M. |
use the magic MIME type in the Intent
|
Mark M. |
then, use startActivity() to kick off the install
|
Mark M. |
application/vnd.android.package-archive
|
Mark M. |
that will trigger the installation process, assuming the device is set up to allow non-Market installs
|
Jul 26 | 7:55 PM |
NetApex |
Ahh, so startActivity() will start the install if I get it downloaded
|
Mark M. |
yup
|
Mark M. |
in theory, you can hand it the URL
|
Mark M. |
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
|
NetApex |
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
|
NetApex |
Not used to being able to hog all of your time
|
Jul 26 | 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....
|
NetApex |
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
|
Mark M. |
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
|
Mark M. |
perhaps I'll have to escalate that process
|
Jul 26 | 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
|
Mark M. |
howdy, Andrew!
|
Andrew H. |
This is my first time here
|
Mark M. |
Andrew: do you have a question?
|
Mark M. |
welcome!
|
Mark M. |
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
|
Andrew H. |
okay
|
Andrew H. |
Well I'm trying to do some 2D graphics stuff
|
Andrew H. |
with Canvas, and Path, and Drawables
|
Andrew H. |
and I'm stuck right now
|
Mark M. |
oy
|
Mark M. |
not my cup of tea
|
Mark M. |
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
|
Andrew H. |
which works
|
Andrew H. |
Ah, okay :P
|
Andrew H. |
However, when I draw enough paths, the app gets really laggy
|
Jul 26 | 8:10 PM |
Andrew H. |
since I'm having to redraw all the paths on the view each time I update a single Path
|
Andrew H. |
so, I've been trying to look into good Android graphics practices
|
Andrew H. |
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
|
Mark M. |
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
|
Andrew H. |
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
|
Mark M. |
but, that's just a lightly-educated guess
|
Andrew H. |
Hmm
|
Andrew H. |
haha
|
Andrew H. |
okay
|
Andrew H. |
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"
|
Mark M. |
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
|
Mark M. |
however, you can create your own Canvas, backed by a Bitmap, IIRC
|
Mark M. |
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
|
Andrew H. |
which i know is not efficient at all
|
Mark M. |
yeah, I'm really out on a limb here
|
Jul 26 | 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
|
Mark M. |
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
|
Andrew H. |
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
|
Andrew H. |
Which I bought yesterday
|
Andrew H. |
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
|
Mark M. |
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
|
Andrew H. |
to make it work better
|
Mark M. |
most of that would be behind the scenes with graphics acceleration
|
Mark M. |
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
|
Andrew H. |
not my strong point
|
Andrew H. |
well, they change the way invalidating works, from what I recall
|
Andrew H. |
so an entire parent doesn't get invalidated if only a child gets invalidated
|
Jul 26 | 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
|
Andrew H. |
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
|
Andrew H. |
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
|
Andrew H. |
I've got a few different projects I'm working on
|
Mark M. |
NetApex: that implies that I would be on G+
|
Mark M. |
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
|
Jul 26 | 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
|
Andrew H. |
haha, yup :)
|
Mark M. |
does the Flyer ship with a pen?
|
Andrew H. |
Umm, I think it depends where you buy it
|
Andrew H. |
for a while I know Best Buy was not offering it _with_ the pen, you have to buy it separately for $80
|
Andrew H. |
which I thought was just ridiculous
|
Andrew H. |
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
|
Mark M. |
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
|
Andrew H. |
yea, the advantage of these pens (on the Flyer and ThinkPad Tablet) is that they're "active"
|
Mark M. | |
Andrew H. |
like a TabletPC
|
Andrew H. |
if you're familiar with those
|
Mark M. |
right
|
Mark M. |
vaguely
|
Andrew H. |
Yea, well they're pretty awesome
|
Andrew H. |
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
|
Jul 26 | 8:30 PM |
Mark M. |
ok, that's a wrap for today's chat
|
Mark M. |
next one is Thursday, same time (7:30pm Eastern)
|
Andrew H. |
Alright
|
Andrew H. |
thanks for your help
|
NetApex |
Alright, have a good one
|
Andrew H. |
or at least pointers in the right direction
|
Andrew H. |
:)
|
Mark M. |
have a pleasant day, everyone!
|
NetApex | has left the room |
Andrew H. | has left the room |
Mark M. | turned off guest access |