Jun 1 | 7:55 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
NetApex | has entered the room |
NetApex |
Good evening
|
Mark M. |
Howdy, NetApex!
|
NetApex |
You were able to pick up an Evo weren't you?
|
Mark M. |
At Google I|O, yes
|
Jun 1 | 8:00 PM |
NetApex |
Ok what are you thoughts on it?
|
Mark M. |
Darn thing's so big, I can't find a case for it
|
Mark M. |
:-)
|
NetApex |
lol, Best Buy on Friday
|
Mark M. |
Screen is gorgeous
|
Mark M. |
Speed is in the Nexus One class
|
NetApex |
Glad to hear it, that is going to be my next purchase
|
Mark M. |
WiFi hotspot may come in handy
|
Mark M. |
haven't played with the HDMI out yet -- doesn't come with the cable, and I'm not completely certain what the right cable is
|
Owen C. | has entered the room |
Mark M. |
howdy, Owen!
|
NetApex |
Understood.. I wouldn't have a need for that just yet anyway
|
Owen C. |
Hello
|
NetApex |
Ok do you recall helping me with a sound board idea some time ago?
|
Mark M. |
more or less
|
NetApex |
You showed me the whole setTag() bit and it made life a lot easier for me
|
Mark M. |
I'm all about making life easier
|
Mark M. |
except perhaps mine
|
Mark M. |
:-)
|
NetApex |
Well
I am redoing a lot of my old code now that I have learned a little more
java and I need to know if there is a way to make that part easy again
|
NetApex |
hehehe
|
NetApex |
View paste
(1 more line)
|
NetApex |
For example, instead of having each and every button call done I have gone...
|
NetApex |
as you can see I have commented out the setTag area because... well.. it doesn't work lol
|
Jun 1 | 8:05 PM |
Mark M. |
you're trying to call setTag() on an ArrayList
|
NetApex |
this way it reads my xml file and gets the buttons and places them as I want
|
NetApex |
I want to have the tag named the same as the button name
|
Mark M. |
OK
|
NetApex |
so obviously I am reaching for the wrong straw here huh?
|
Mark M. |
well, the string "name" doesn't exist, strictly speaking
|
Mark M. |
a View knows it's ID via getId() -- that's R.id.button37 or whatever your naming convention is
|
Mark M. |
and I don't know of a way, given the actual integer, to come up with "R.id.button37" as a String
|
Mark M. |
but you can put the tag in the XML
|
Mark M. |
android:tag
|
NetApex |
ok,
say the button is named sound01, that way I can name the sound that
plays when pressed sound01... could I cast the getID() to a string?
|
NetApex |
lol don't tell me I could just put a android:tag="sound01" in the xml?!
|
Mark M. |
yes
|
Mark M. | |
NetApex |
argh.. why is it always the easy answer I overlook?!
|
Mark M. |
well, setting the tag in XML is not terribly common
|
Mark M. |
in fact, I had to double-check that it was even possible
|
NetApex |
Heheh well that's me.. always have to make the easy stuff difficult
|
NetApex |
But you saved me a lot of extra work once again!
|
NetApex |
Thanks a ton!
|
NetApex |
Owen my friend, the floor is yours
|
Mark M. |
no problem
|
Owen C. |
Hey So i'm just getting started actually
|
Jun 1 | 8:10 PM |
Owen C. |
I'm having a hard time following the book and I don't really know where to start
|
Mark M. |
:-(
|
Owen C. |
I have elipse with the avd pluggin working properly but i don't know where to go
|
Owen C. |
Is life easier with ant?
|
Mark M. |
well, I'm not an Eclipse user
|
Owen C. |
ok
|
Mark M. |
how much Java programming experience do you have?
|
Owen C. |
a bit
|
Owen C. |
not a whole lt
|
Owen C. |
*lot
|
Owen C. |
but basic objec oriented stuff
|
Mark M. |
did you learn Java with Eclipse, or separately?
|
Owen C. |
seperately
|
Mark M. |
so you haven't done much with Eclipse yet, I'm guessing
|
Owen C. |
but i've been using mostly eclipse lately
|
Owen C. |
i've done some not a whole lot
|
Mark M. |
ok
|
Mark M. |
here is what I would recommend
|
Mark M. |
First, do the "Hello, World" from the Android Developers site, since that is set up for Eclipse: http://developer.android.com/resources/tut…
|
Owen C. |
yup i've done that
|
Mark M. |
Then,
I would recommend you work through the _Android Programming Tutorials_,
starting with Tutorial #2 (#1 would be redundant if you have done
"Hello, World")
|
Mark M. |
at least go through #14
|
Owen C. |
is that a better place to start than reading the book?
|
Mark M. |
that will lead you step-by-step through building a basic Android app
|
Jun 1 | 8:15 PM |
Mark M. |
you have three books
|
Mark M. |
not just one
|
Mark M. |
_Android Programming Tutorials_ is one of the three
|
Owen C. |
right
|
Owen C. |
i mean are the tutorials better to start with?
|
Mark M. |
if you have limited Java experience, I think the tutorials are a better starting place
|
Mark M. |
once
you get through tutorial #14, then you can start going back through
_The Busy Coder's Guide to Android Development_ to get more depth on
the Android topics you are interested in
|
Owen C. |
ok thanks
|
Owen C. |
ok cool
|
Owen C. |
On the calendar I see office hours for today and tomorrow. Will there be more posted in the future?
|
Mark M. |
yes
|
Mark M. |
I don't usually schedule them more than a week in advance
|
Mark M. |
my calendar gets...messy
|
Owen C. |
Haha understandable
|
Mark M. |
usually there are two a week
|
Mark M. |
one in the morning US Eastern, one in the evening
|
Mark M. |
though, depending on my schedule, sometimes there are fewer, or their times shift
|
Owen C. |
Alright! Thanks for your help.
|
Owen C. |
ok
|
Owen C. |
Thanks again.
|
NetApex |
I
use Eclipse, and basically was (am) in the same boat Mark. It's been
very useful to me to point out my errors. And of course the books are
just great to work on.
|
Jun 1 | 8:20 PM |
NetApex |
Heck, my wife just bought me a book on Java last week so now I can understand more of why we do certain things.
|
Mark M. |
once you start raking in the dough from your soundboard app, you'll be able to buy your *own* Java books! :-)
|
NetApex |
lol,
well the funny thing is I am probably going to charge for one of them
since every week I get about 20 emails with "can you add this sound" to
it.
|
Mark M. |
charge for adding sounds
|
Mark M. |
it's called "directed development"
|
Mark M. |
occasional revenue model used in open source
|
NetApex |
I'm
like, hey, it was a hobby at first now it's getting to be really time
consuming (granted it is still a ton of fun but ya know)
|
NetApex |
my main issue is file size.. you can only add so many sounds before it becomes a 25 meg app
|
Mark M. |
on the plus side, over time, Apps-on-SD will become prevalent
|
Jun 1 | 8:25 PM |
Mark M. |
at that point, app size will become less of an issue
|
NetApex |
true
|
NetApex |
I want to be able to stream the sounds without it going through the whole, opening mediaplayer dialog
|
NetApex |
(stream from a website that is)
|
Mark M. |
dialog?
|
NetApex |
well
if you just point it to a file on the internet it does the jump to the
browser, then pops open media player... I haven't done enough hunting
to find a way to just have it play
|
Mark M. |
are you just using startActivity()?
|
Mark M. |
if you use MediaPlayer, you won't get the browser
|
Mark M. |
(by MediaPlayer, I mean android.media.MediaPlayer)
|
NetApex |
ahh ok I was going with a startActivity
|
Mark M. |
check out the Media chapter in _The Busy Coder's Guide to Advanced Android Development_
|
Jun 1 | 8:30 PM |
Mark M. |
I show there doing streaming video with MediaPlayer, and doing local audio with MediaPlayer
|
NetApex |
if
I do MediaPlyer though I have learn how to make sure that they stop
when they are supposed to so people can hit 8 or 9 buttons in rapid
pace without crashing
|
Mark M. |
that should help you understand how to apply MediaPlayer for streaming audio
|
Mark M. |
that's not going to be easy with streaming
|
Mark M. |
for local stuff, I'm assuming you're using SoundPool to handle that
|
NetApex |
hmmmm
|
NetApex |
hehe.. umm.. yeah.. of course I am (note: look up soundpool)
|
Mark M. |
SoundPool is designed for playing back several audio clips simultaneously
|
Mark M. |
mostly used for games
|
NetApex |
ahh that would be a much better choice than how I am doing then
|
Mark M. |
in particular, it lets you set the maximum number of simultaneous clips to play
|
NetApex |
that's where I need to focus some time then
|
Mark M. |
you
can then "fire and forget" the clips as the game needs them, indicating
their priority, and SoundPool plays the N most important ones
|
Mark M. |
however, SoundPool only works with local stuff
|
Mark M. |
so you'd need to download any net-based clips
|
NetApex |
ok
|
Mark M. |
at least, I'm pretty sure SoundPool only works with local stuff
|
NetApex |
I thought soundboard was more for games and therefore assumed it was over my head at the time
|
NetApex |
errr.. soundpool
|
Mark M. |
I'm not sure how well it will fit your model, but it's worth peeking at
|
Jun 1 | 8:35 PM |
NetApex |
thank you again
|
Jun 1 | 8:40 PM |
Mark M. |
any other questions?
|
Owen C. |
Not from me thanks
|
NetApex |
Not at the moment
|
Mark M. |
no problem, just checking
|
NetApex |
Have you thought about making anything for the Evo? Something that shows off the front camera ability or anything?
|
Mark M. |
well, I'm hoping a front camera API makes it into Android 2.3 or 3.0 or whatever Gingerbread gets called
|
Mark M. |
at that point, I may play around with it
|
Jun 1 | 8:45 PM |
Mark M. |
I have plenty of things to work on more general to Android
|
Mark M. |
rather spend time on that then on device-specific features, in general
|
NetApex |
Good point
|
Owen C. |
for the main.xml file in elipse, how do you just see it as a text file?
|
Mark M. |
there should be a tab for that, underneath the preview pane, IIRC
|
Owen C. |
thanks
|
NetApex |
oh a request for future books...
|
NetApex |
REST and JSON stuff
|
Jun 1 | 8:50 PM |
Mark M. |
I take it you're looking for more than the Internet chapter presently has?
|
NetApex |
hehe.. or maybe a book mark... I guess I missed that in there
|
Mark M. |
doesn't cover JSON, but does make a REST-style GET request
|
NetApex |
well my big issue is the how to display results
|
Mark M. |
I recommend using an LCD screen
|
Mark M. |
you could beep the results out with Morse code, but that might get tedious
|
Mark M. |
:-)
|
Mark M. |
more seriously, somebody needs to write a JSONAdapter
|
Mark M. |
so if you're getting a list of stuff back, you can just run it through the adapter framework to put it in a list, spinner, etc.
|
NetApex |
ok
|
Mark M. |
that's now officially on my "things to write reusable components for someday"
|
NetApex |
Cool, I will be the first to snatch that up too!
|
Mark M. |
"where 'someday' may be measured in geologic timeframes, at my current list size"
|
Mark M. |
speaking
of such components, I haven't announced it yet, but I've updated the
ColorMixer parcel to include a dialog (ColorMixerDialog) and a
preference (ColorPreference)
|
NetApex |
That's ok, I am patient
|
NetApex |
and I need to learn how to implement those too
|
Jun 1 | 8:55 PM |
Mark M. |
those meaning custom dialogs and preferences
|
Mark M. |
?
|
NetApex |
meaning the parcels that you have out there
|
Mark M. |
ah
|
Mark M. |
some scenarios can be covered by the new "library project" that debuted with the latest Android tools update
|
Mark M. |
parcels
would mostly be for wide-area reuse -- "library project" is mostly for
reuse within a local team or individual developer (paid/free app
versions)
|
Mark M. |
I'm hoping to run a contest to get some more parcels written, later this year
|
Mark M. |
gotta get our widget library beefed up -- too many people grousing about how Android's widgets pale in comparison to iPhone
|
Owen C. |
Sorry to interupt- what is the easiest way to run an app on a device that i have written from eclipse?
|
NetApex |
Well don't start the contest too soon.. I need to figure out more about them so I can learn how to write them
|
NetApex |
Oh, I know that one!!
|
Owen C. |
sweet :)
|
Mark M. |
Owen: first, turn on USB debugging and "allow apps from non-Market" in the Settings on the device
|
Mark M. |
Settings > Applications (and > Development for the USB debugging one)
|
NetApex |
Attach
your phone via cable and if it is already setup, you can just goto run
and it will ask if you want to use the emulator or the device (if your
configuration is set to manual - otherwise it will go right to the
device... found out the hard way)
|
Mark M. |
right -- Eclipse should auto-detect the device and give it to you as a run option
|
Owen C. |
hmm
|
Jun 1 | 9:00 PM |
Owen C. |
do i need to reboot eclipse?
|
NetApex |
I spend many minutes trying watching my screen on the laptop as my phone that was charging via cable had the app up and waiting
|
Mark M. |
not that I'm aware of, but, then again, I only see Eclipse in my training courses, when students use it
|
NetApex |
which phone do you have?
|
Owen C. |
nexus one
|
NetApex |
when you hit run what happens?
|
Owen C. |
i get the run as window
|
Owen C. |
and it gives me a few options
|
Owen C. |
android app android junit test java app
|
Owen C. |
lots of them
|
Mark M. |
you want "Android app"
|
NetApex |
ok, you pick android app and then what happens?
|
Owen C. |
that just runs the emulater
|
Owen C. |
*emulator
|
NetApex |
ok this time instead of hitting run, there should be a run configurations a little further down the menu
|
Mark M. | |
Mark M. | |
Jun 1 | 9:05 PM |
Mark M. |
and that's all the time I have for this evening
|
Mark M. |
another chat is scheduled for tomorrow morning
|
Mark M. |
should have two next week, probably Tuesday evening and Thursday morning
|
Mark M. |
have a pleasant evening, all!
|
NetApex |
you too!
|
NetApex |
take care
|
NetApex | has left the room |
Owen C. | has left the room |
Mark M. | turned off guest access |