I\'ve been having issues with this for far too long. This code should output dx,dy,dz for the accelerometer, and a running total of the dx. It should also output azimuth,
The reason you're getting 0.0, -0.0, -0.0 from getOrientation() is that getRotationMatrix() doesn't always get a valid result. You need to check getRotationMatrix()'s return value, which will be false if the result is invalid, or true if it succeeded.
Added: Actually, that didn't come out right. You're getting an invalid result for the reason aganders pointed out. Checking the return value would simply be an indication that you were in fact getting an invalid result.