Office Hours — Today, January 11

Friday, January 8

Jan 11
7:50 PM
Mark M.
has entered the room
Jan 11
7:55 PM
Mark M.
turned on guest access
NetApex
has entered the room
vibes35
has entered the room
vibes35
Hello
NetApex
Just wanted to start out with... You rock man!
Mark M.
Howdy all!
NetApex
How are ya?
vibes35
Agreed! Very nice info
Mark M.
Relieved that the Android 2.1 SDK is out and seems benign
vibes35
Wish T-Mobile would update the myTouch - i am still 1.6
Jan 11
8:00 PM
NetApex
Still on 1.5 on my Hero
Mark M.
I get the sense (pun lightly intended) that HTC does not have quite the army working on upgrading existing devices that they do on creating new ones
NetApex
Yeah I feel at times that their upgrade area is out of touch as well
vibes35
So, I just purchased this subscription a few days ago and must say amazing- i am new to mobile dev and excited to learn
Mark M.
vibes35: glad to hear it!
NetApex
I am new as well, Mark is a great guy!
vibes35
I have been trying to get my head around the general workflow and have all the tools installed successfully etc
vibes35
Is it ok to ask some questions here? On specifics and general?
Mark M.
That's the purpose of the chat room!
Mark M.
Ask away!
vibes35
:) sweet
NetApex
(I wont hog today)
vibes35
Anyway, I work as a 3d designer and want to create an app to showcase my work in a gallery situation
vibes35
So, I am looking for best practice to set up this environment
vibes35
I am getting familiar with the main.xml
vibes35
and main java file
vibes35
So what or how would you suggest moving forward?
Mark M.
Could you describe a bit more about "showcase my work in a gallery situation"?
Mark M.
I am not sure what that means
Jan 11
8:05 PM
vibes35
oh ya... primarily i think it would be cool to have a nice splash scrn. Then a menu of say 9 small preview images where when one is clicked fills the screen and then have the option to use as wallpaper
NetApex
I like the sound of that
Mark M.
OK, so the gallery is of ordinary images (e.g., PNG files), not OpenGL models?
vibes35
correct png files
Mark M.
OK
Mark M.
Let's ignore the splash screen for the moment
Mark M.
You have a few choices for the "9 small preview images"
vibes35
ok
Mark M.
I'd go with a three-column GridView, but you could use a manually-built grid of ImageButtons, or even ImageViews
Mark M.
The advantage of the GridView is that it is easy for you to increase the number of preview images if you wish
Mark M.
I cover GridView in the chapter on selection widgets
Mark M.
You can get control when the user taps on one of the images in the GridView
Mark M.
At that point, you can start a new activity that will display that image full-screen in an ImageView
Mark M.
I cover starting new activities in the Multiple Activities chapter (BTW, these chapter references are for _The Busy Coder's Guide to Android Development_)
vibes35
ok...
Mark M.
You can then perhaps an an option menu on the full-screen image activity to allow the user to set it as wallpaper
Mark M.
I have a chapter on adding menus in the book as well
Mark M.
I know it is possible to set wallpaper, but I haven't tried it, so I don't know much about it
vibes35
hmm... sounds like i need to read the book :)
Jan 11
8:10 PM
Mark M.
Be careful not to get confused with the new "Live Wallpaper" stuff that just showed up within the past hour or so in the Android 2.1 SDK
Mark M.
The book will give you the tools you need to build the app you're aiming for
vibes35
ok.. so from the 3 books I need to really start with that one?
NetApex
I do have a question for you too Mark when you get a minute. (Still same soundboard app)
vibes35
go ahead!
Mark M.
Well, the one I wouldn't start with is the Advanced Android book
NetApex
I can wait, I hogged him all last chat lol
Mark M.
You can either start with the original Android book, or the Tutorials.
Mark M.
It all depends on how you like to learn
vibes35
no... go ahead i am getting the first book pulled up
Mark M.
Some topics, like GridView, aren't used in the Tutorials, but the rest of what you're seeking is
NetApex
heheh ok, feel free to jump in any time though
vibes35
well, i learn best by seeing full code and then look at specifics later
vibes35
if that makes sense
vibes35
kinda hard for me as i come from a very visual bkg in design and imagery to now code and syntax with no mercy
Mark M.
Sure -- start with the Tutorials then
vibes35
:)
Mark M.
Note that I'll be issuing a fairly major update to those Tutorials by the end of the week
vibes35
k
NetApex
Cool, just when I started learning things they have to go change lol
NetApex
Ok, I have the whole long click save file thing working now thanks to you!
Mark M.
NetApex: Glad to hear it!
NetApex
My problem now is that phones don't give you the option to make items ringtones
Jan 11
8:15 PM
NetApex
I can't figure what I need to do.. assuming something with an intent in the manifest file but can't quite find something to confirm that
Mark M.
NetApex
I saw that... soooooo much code I was confused a bit
Mark M.
Yeah, well, I think Ms. Hackborn wrote it, so it's also probably serious "power developer" stuff too
NetApex
It was impressive looking, I will tell ya that
Mark M.
My guess is that RingtoneManager is the key piece of what you'll need: http://developer.android.com/reference/and…
Mark M.
You probably also need to get your audio clip into the MediaStore
NetApex
That part I did... and I thought that was a mistake
NetApex
Now it shows up as media to play instead of a ringtone lol
Mark M.
Oh
NetApex
I found
NetApex
View paste
sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED, Uri.parse("file://" 
                + Environment.getExternalStorageDirectory())));
NetApex
and thought it would fix things
NetApex
but that just made it scan the sdcard and place it as a musical file instead hehe
Mark M.
I haven't messed with the MediaScanner, but I think that will tell it to sweep the SD card and sync the MediaStore with the media found on the SD card
Mark M.
Just like when you attach and then detach USB storage on the device and it pops up that "preparing SD card" Notification
Jan 11
8:20 PM
NetApex
yeah, that was what I was able to find as well.
Mark M.
Anyway, I suspect there's a way to add a ringtone, perhaps even setting it as the default, but I don't know the techniques
NetApex
Seems like my "it must be simple since there are so many" soundboard app is more difficult than I thought
Mark M.
There's a zillion ringtone apps on the Market too
NetApex
Hmmm, I did read about setting it as default.. maybe I should remember current default, make this choice default, and then return the original to default and see if that lets it make it to the list of choices then
Mark M.
Mark M.
That's the stuff Ms. Hackborn maintained -- had it confused with RingDroid
Mark M.
Rumors are that the apps-for-android stuff isn't being kept up to date, but it might give you some clues
NetApex
ok I will take any clues I Can get... this is the final step until this app is done
Jan 11
8:25 PM
NetApex
NetApex
which ended up circling back around to the mediascanner and confusing me again
vibes35
Here may be a stupid question.. but looking at the tutorials 'A Simple Form' the main.xml is pretty straight forward. So every button, text view etc. needs to also be referenced in the java main file?
Mark M.
vibes35: only those you need to
Mark M.
For example, a static TextView that isn't changing does not need to be referenced from Java
Mark M.
for those, you can skip the android:id attribute in the XML
Mark M.
But, if you want to programmatically change the widget, or hook up an event handler, you'll need to access it from Java
vibes35
ok.. so when the primary java loads the main.xml i only really have to worry about anything that may need changing dynamically?
Mark M.
generally, yes
vibes35
and again sorry for the basic ?'s
Mark M.
no worries
vibes35
so for instance the EditText android:id="@+id/addr" would be referenced in the java?
Mark M.
if you need the value from the EditText, yes
Jan 11
8:30 PM
Mark M.
findViewById(R.id.addr);
vibes35
ah... ok!
Mark M.
One of the downsides of starting with the Tutorials is that they have only a bit of explanation of what's going on.
Mark M.
They're principally designed to be used in my training courses
Mark M.
Secondarily, they're in support of the other two books
vibes35
I can download the code from the site for the tuts can't I?
Mark M.
Yes
vibes35
ok.. well It sound like i will dig in with the first book and reference the tuts so maybe I can ask more intelligent ?'s :)
vibes35
do i need to download each individually or is there one complete zip i am missing?
Mark M.
On the github page, look for the Download button
Jan 11
8:35 PM
Mark M.
Sorry, slight GUI change at github
Mark M.
It's the Download Source button, towards the upper right
Mark M.
It'll then give you an option to download a ZIP or TAR.GZ of everything in that repository
vibes35
Cool! Thanks got it
vibes35
3 megs
NetApex
Ok, without you having used it before I am guessing you could probably eyeball this and tell me how it is best used or if it will do what I think it might...
vibes35
I am glad i did not waste my money at the bookstore on some other dev books! Yours seems so much more intuitive .. Thank you
Mark M.
I certainly try
Mark M.
If nothing else, I make it up in volume... :-)
NetApex
http://developer.android.com/reference/and… the getRingtone (@Vibes35: Just being able to talk to someone makes it so much more of a value!)
vibes35
well, along with this open chat and all this is great!
NetApex
exactly
NetApex
sorry, @Mark M. The getRingtone part may be what I need possibly...I think
NetApex
I just don't know for sure how to call it.
Mark M.
Doubt it
Mark M.
That gives you a Ringtone object, but all it appears you can do with one of those is play it
NetApex
ok
Mark M.
I don't see where you might supply it to something to add a new ringtone or something
NetApex
sigh
Jan 11
8:40 PM
Mark M.
but, again, I've never tried playing with ringtones
NetApex
here is the kicker though
Mark M.
Might be worth a fresh issue over on StackOverflow
NetApex
I made this and on Android 2.0 it works right now with no other work
NetApex
on my Hero it mocks me and says there is no ringtone around
vibes35
Thank you both! I have to run but look forward to learning more :)
NetApex
Have a good one Vibes
Mark M.
vibes35: see ya!
Mark M.
NetApex: at this point, all I can do is shrug my shoulders
NetApex
heheh I am good with that
Mark M.
Android is vast, and I certainly don't know all of it
NetApex
I hear ya
NetApex
Ok lets toss this aside a sec
NetApex
Can you think of some other app that would be a nice little learning thing that uses items from the book, but isn't necessarily something you have in the book as an example
Mark M.
Ummmm
Mark M.
There's probably lots of possibilities
NetApex
Something that I can just try to make using things I can learn from the book (that isn't a soundboard lol)
NetApex
well.. something simple hopefully
Mark M.
I always recommend people create apps they'll use, where possible
Mark M.
So, what would you like your phone to do? Or, what are your interests? Or, what Web sites/apps do you use that don't have a native Android client?
Jan 11
8:45 PM
NetApex
Well that is something I have been thinking about forever... closest I came up with is an app to mark all of the emails read but I don't know if we can tie into the native email app, and creating a whole new mail app is probably so far beyond me I haven't even looked into it
Mark M.
Yeah, I wouldn't try messing with that
Mark M.
I'm one of those strange people who doesn't start writing something until there's a point...even if the point evaporates before I'm done
NetApex
hehehe
Mark M.
That's one of the reasons I don't have any apps out on the Market under my own name
Mark M.
Been too busy with other stuff, and the apps I wrote were under consulting gigs
NetApex
nice
Mark M.
So, in terms of an app for you, you can always create a dedicated app for some site you like, reading in the RSS and displaying it, clicking on list entries to bring up the article
Jan 11
8:50 PM
Mark M.
Or, if there's a Web app you use with an API, write a client for it
NetApex
thought about that too, there are two websites I thought about
Mark M.
For example, another subscriber wrote me yesterday saying he wrote Campfyre, a client for this very chat system
NetApex
Oh wow
NetApex
so he made an Android version?
Mark M.
Yes -- and sorry, the name's campyre (http://github.com/klondike/campyre)
Mark M.
Campfire has an API, and he hooked into it
NetApex
very impressive
Mark M.
I suspect it might not work with semi-private rooms like this one
Mark M.
Klondike is pretty good
NetApex
I saw http://api.outside.in/ and thought about that, would have to figure out to do some XML work though
NetApex
But what I REALLY want is to make an app for this radio station I listen to
Mark M.
Yeah, I ran into them when hunting for a sample to use for a presentation at the Sprint Open Developer Conference last fall
NetApex
did you make something for them?
NetApex
(The radio station I like streams in .apx format though and of course there is no media player in Android that works for it)
Mark M.
What is .apx?
Jan 11
8:55 PM
NetApex
essentially comes in a windows media format
NetApex
sorry... asx
Mark M.
If that's really RTSP or HTTP under the covers, some Android devices might handle it
Mark M.
Ah, .asx
vibes35
has left the room
NetApex
http://www.yeshome.com/TPage883.aspx has a page which shows the different links depending on phone OS's... none of which work with Android sadly
NetApex
I need to figure out a way to duplicate the stream as something else possibly
Mark M.
rtsp://wms2.christiannetcast.com/yes-fm doesn't work?
Mark M.
I would have expected the RTSP one to have a shot
NetApex
it didn't when I tried... maybe I typed it wrong though at the time
NetApex
If I can make that work I would have some fun making an app for them
NetApex
getting to use tabbed view for a purpose hehe
Jan 11
9:00 PM
Mark M.
well, all good things must come to an end
Mark M.
which means it's time to wrap up today's office hour chat
NetApex
yeah.. Heroes is coming on :)
NetApex
Thanks again for the chat man.
NetApex
Have a good week!
Mark M.
No problem
Mark M.
You too!
NetApex
Thanks
NetApex
has left the room
Mark M.
turned off guest access

Friday, January 8

 

Office Hours

People in this transcript

  • Mark Murphy
  • NetApex
  • vibes35