Skip to main content

Posts

Showing posts from June, 2010

ASE r25 Released

I skipped release notes for r24, so I'm rolling them into the release notes for r25. So, what's new? Features: It's now possible to specify the MIME type when calling startActivity or startActivityForResult . Added APIs for: Viewing local HTML files Interactively taking pictures and video Recording phone calls Retrieving cell location and signal strength on GSM networks Checking if TTS is currently speaking Screen brightness control Checking screen state (i.e. is it on or off) A new SeekBar dialog Added Try::Tiny to Perl modules. There's now a trigger service that will allow launching scripts as particular events occur on the phone. Currently there's one such event which will launch a script when the ringer mode changes. Export more along these lines in the near future. Interpreters are now chmoded to be world readable and executable. This is cool because now you can execute interpreters directly from adb shell. Bug fixes: Fixed NPE when extras ar
Read more

How far did Tom Petty free fall?

This evening, Laura and I listened to Tom Petty's "Free Falling"  and became curious about just how far he free falls during the song. First, a little research: The terminal velocity of a sky diver is approximately 55 m/s . The acceleration of gravity on Earth is 9.8 m/s^2 . The song is 4 minutes and 15 seconds long. However, Tom Petty only starts free falling at 1 minute and 9 seconds into the song. And now comes the math: Tom Petty is in free fall for 4 minutes + 15 seconds - (1 minutes + 9 seconds) = 3 minutes + 6 seconds . He takes 55 m/s / 9.8 m/s^2 = 5.6 seconds to reach terminal velocity. He travels  (9.8 m/s^2 * (5.6 s)^2) / 2 = 154 meters before reaching terminal velocity. Assuming that he stops free falling at the end of the song, he free falls for a total of 3 minutes + 0.4 seconds * 55 m/s + 154 m = 10 kilometers . We can only conclude that he jumped from a passenger jet at a cruising altitude of about 33,000 feet. Ouch.
Read more

Better Orientation Readings in Android

The orientation sensor  is deprecated. The new suggested method of determining orientation is a bit more complex, but produces better results. The following example should be enough to get you started. For help with interpreting the results, consult the SensorEvent documentation. private class SensorValuesCollector implements SensorEventListener { private float[] mMagneticValues; private float[] mAccelerometerValues; private final float mAzimuth; private final float mPitch; private final float mRoll; @Override public void onAccuracyChanged(Sensor sensor, int accuracy) { } @Override public void onSensorChanged(SensorEvent event) { synchronized (TiltController.this) { switch (event.sensor.getType()) { case Sensor.TYPE_MAGNETIC_FIELD: mMagneticValues = event.values.clone(); break; case Sensor.TYPE_ACCELEROMETER: mAccelerometerValues = event.values.clone(); break; } if (mMagneticValues != null &
Read more