Volleynerd Knowledge Base

Wednesday, January 20, 2010

Android App - Debug Logging


Sort of equivalent to .NET Debug.WriteLine( )

import android.util.Log;

sprinkle the following throughout the code
Log.d( "Some Category", "blah blah message" )

Couldnt get NetBeans to show me the output. Using Android "adb" dev tool (from SDK tools dir).

adb devices
adb logcat

Can filter output with something like the following:
adb logcat XmlNode:D *:S
(Above says show DEBUG output for XmlNode category, and SILENT for everything else)


blog post about it here
ADB documentation here



Tuesday, January 12, 2010

AVS Forum Threads for my new A/V stuff


Just wanted to keep these URLs around (also have them on delicious).

AVS Forum "official threads" for various devices:
  • Samsung 55" LN55B640 TV - here
  • Motorola DCX3400 HD DVR - here
  • Onkyo TX-SR607 receiver - here


Samsung 55" LCD TV (& DVR setup)


Pulled the trigger on the Samsung 55" LCD tv last week. Model: LN55B640
Best Buy - $1599

This will be a post of many setup notes as I hack on setting it all up.

XBox 360
Hooked it up today - I only have the component video cable for it. Do they make an HDMI cable for it? (proprietary connector on the 360 side)

TV doesn't have optical IN (only OUT to a receiver). Since I don't have a receiver yet, I'm using the (white/red) audio composite connectors on the hybrid component/composite 360 video cable to send audio to the TV. Didn't think this would work, but it does. Eventually, with a receiver, I'll hopefully go HDMI from 360 to receiver, then HDMI to the TV. (worst case, I can go component + optical audio from 360 to rcvr, then HDMI to TV)

For a while, was getting 720p on the TV, then finally remembered to set the 360 to output 1080p. SWEET. (Still seeing 60Hz on the tv info display, we looked it up and found that this is talking about the input side, not what the TV is outputting)

No lag in picture display, even in Game Mode OFF. Tried turning it ON and didn't notice a difference.

Time Warner HD DVR Cable Box
Motorola DCX3400
HDMI cable to the TV.

Controlling TV volume with the DVR remote. Use this site to find the code.
Turn on TV, on remote: TV mode, hold Setup button (blinks twice). Enter code: 0812 (blinks twice). Test by turning off the TV with the remote. Woot.

30-second advance
DVR remote doesn't have a button for this, but the functionality exists on the DVR. Just have to program a button on the remote.
Lucky - the same procedure that works on the old Motrola remote works for this one too.
See my previous post.

  1. Press the "Cable" button at the top of the remote to put it into Cable Box control mode.
  2. Press and hold the "Setup" button until the "Cable" button blinks twice.
  3. Type in the code 994. The "Cable" button will blink twice.
  4. Press (do not hold) the "Setup" button.
  5. Type in the code 00173.
  6. Press whatever button you want to map the 30-second skip command to (ex: ON DEMAND). The "Cable" button will blink twice if successful.



Wednesday, January 06, 2010

First Droid App


WHEW - had a hell of a time today during IK RECESS building my first app for the Droid. Just some notes on what I had to do:

Started here with SDK install. Which has a bunch of sub-steps.

Download Eclipse, wait, need Java -- what version, and what type (EE, SE, ME)? version 6 JDK most recent, fine.

Install Java, which also installs something like "update 17".

Install and Run eclipse. Nope. Doesn't find a java VM. Try -vm command line arg to show it where the VM is. Nope. Now doesn't barf, but just runs, and process dies after 5 secs (no UI). Eclipse readme says compatible with Java 1.4.2. WHAT? I'm using Java 6. Go to get old version, maybe uninstall 6 and use 1.4.2? Huge red warning before download 1.4.2 --- it has passed it's "EOSL" (end of service liftetime) - back in Oct 2008. Nice.

Coworker Brad says screw all that - use NetBeans.

Nice - NetBeans install comes with Java (if needed), but recognizes that I have v6 patch 17 or whatever already and uses that.

NetBeans IDE starts up! But ... not so fast. Move on to step 2: Android SDK

Extract Android SDK, and try to run "SDK Setup" but it doesn't seem to do anything.
Readme says an alternative is command line:
tools\android.bat update sdk


Whew - runs a UI that goes out and finds packages. Fails on https calls (expired cert? who knows - no detailed error message). Set to use HTTP instead. Get a huge ass list of packages, now we're getting somewhere. Chose them all (shouldn't have) and download. Takes *forever*.

Sweet! Now we have some sub-folders under the SDK "platforms" folder that was initially empty. One for each of the Android OS levels, 1.5, 1.6, 2.0, 2.0.1

Next step: ADT plugin

ADT plugin is for Eclipse, so we use nbandroid.
Loose instructions here.

To install the Android platform within Netbeans though, we need to point it to a "platform" folder. Now we have one of those after getting through the Android SDK components updater above. Point at the 2.0.1 platform folder.

Woot! Platform installed. Create new project. Hello world. Run!
... wait ... need an emulator.

Per Google instructions, use command line tool to create one.
tools\android.bat create avd --target 5 --name dan_droid

What is "5" ? It's the OS version target dummy. Use the following to see the choices:
tools\android.bat list targets

OK, created the emulator. Back in NetBeans, Run! Sweet, choose emulator ("AVD") to start. Go.
... damn ... errors in the output window that emulator is not ready.

Poke around the tubes and find that you should start the emulator first. (not let the NetBeans IDE start it)

Manually start the emulator
\tools\emulator -avd dan_droid
(dan_droid is the name of the emulator created from above)

Ahh, there's a UI to manipulate the emulators too.
\tools\android.bat
"Virtual devices" node

WOOT! After letting the emulator start and settle down, now run from NetBeans IDE -- I see my "hello world" !!

In NetBeans, when debugging, to prevent getting prompted for which emulator device to use each time:
Project, Properties, Run node.
Set Target Device = "automatic", and select the AVD from the list
(dont worry that this is the registered one whereas you want it to use the currently running one, it seems to figure that out)



Monday, January 04, 2010

Android apps


Starting a list of droid apps that I either already have, want to get, or just want to remember about:

  • BettrFlickr - all things related to flickr, including of course, uploading pics
  • PicUp (by Aqris) - upload pics to flickr, facebook, twitpic
  • Meebo - IM client for all mediums
  • Digg Droid - app for digg. Can also use m.digg.com mobile site.



Home