Wednesday, December 22, 2010

Android Unit Conversion

vConvertIt 0.9 (beta) is now available as a free App for your Android powered phone from the Android market place. Best of all vConvertIt is also ad-free.

vConvertIt Unit Converter is a basic unit conversion utility offering over 850 conversions in 12 different categories.

vConvertIt converts as you type, provides key filtering on both the category list and the units lists for quickly finding the unit you're looking for.

vConvertIt saves the most recent conversion in each category for fast lookup of the previous conversion and fast repeated
conversions of the same type.

UPDATE: Version 0.91 i snow up on the market. It fixes a bug in the input units field which caused the cursor to jump to the beginning of the number after each key press. Thanks so much to SMing for reporting this problem.

NOTE: this is a beta version, so if you have feedback, comments, or new units / categories you would like to see added don't hesitate to email me. I'm busy adding new units, new categories, and double checking the accuracy of each conversion prior to release 1.0.

Thursday, October 14, 2010

Blood Alcohol Concentration Calculator (vBacc)

vBacc is available for Android download from the Android Market place.

vBacc estimates your Blood Alcohol Concentration (BAC) based on the number of drinks you have consumed, the elapsed time between drinks, your body weight, and your sex.

vBacc is for entertainment purposes only. DO NOT use estimates from vBacc to determine your ability to participate in activities that are dangerous while intoxicated. vBacc may under-estimate your BAC since BAC is determined by many complex factors.

When you first start with vBacc hit the config button and set your weight and sex. These factors help vBacc generate an accurate estimate.

vBacc is a unique blood alcohol concentration calculator in several ways. It keeps track of how much time elapses between drinks and accounts for this when determining your BAC. You can use vBacc to monitor your BAC as it declines over time once you stop drinking.

Ideally you should hit the "Drink" button each time you finish a drink. If you forget to press drink, simply press "Drink" twice to catch-up. You can approximate what your BAC would be if you had a large number of drinks by pressing the button once for each drink. For example if you wanted to know what your BAC would be if you had 8 drinks, simply hit the drink button 8 times. This estimate would be based on having 8 drinks in very rapid succession.

If your friends hit the drink button a bunch of times and mess up your setting you can just hit the "Reset" button and then the "Drink" button enough times to get you back where you should be. The estimate will be a little high in this case since vBacc will assume you just chugged all your drinks.

You can suspend, or even shut-off vBacc and it will remember the information necessary to determine your BAC when you start it up again. Still feel drunk in the morning ? Check vBacc and it will show you if you still have a positive BAC.
Please drink responsibly and have fun with vBacc.

vBacc v1.02 is now available
v1.02 extends the original vBacc concept to multiple users. The UI is cleaned up and improved and users are now able to enter their weight in either kilograms or pounds.

Feedback, bug reports, and suggestions are always welcome.

Wednesday, December 9, 2009

sdk.dir versus sdk-location

When something is simple to do I like to just do it - instead of using an obscure wrapper. So I'm inclined to to run a tool like 'android update' to update a project and then do a diff on the old version of the project to see what it does. Well, all android update does in this case is make some simple changes in local.properties and default.properties. Knowing this I prefer to edit these files myself instead of running android update.

I was updating all my android projects from SDK 1.5 to 2.01 (yes I have neglected them for a while).

I ran into a problem.

In local.properties the SDK location used to be stowed in sdk-location. It is now in sdk.dir.

So simply updating local.properties
from
sdk-location=blah blah/android-sdk-linux_x86-1.5_r1
to
sdk-location=blah blah/android-sdk-linux_x86-r04

DOES NOT WORK.

It took me a few minutes to figure out the problem. Perhaps someone else will encounter the same issue and I hope this helps. You simply need use sdk.dir in your location.properties file.

sdk.dir=blah blah/android-sdk-linux_x86-r04

Oh, and don't forget to check you other build files and replace sdk-location with
sdk.dir.

Sunday, August 23, 2009

Obscured Satellite Images

Coming across obscured areas in Google Maps is always interesting. Makes you wonder why its obscured, who's behind making sure its obscured, etc,etc.

A pretty good list of obscured areas is available at wikipedia. Here is a nice site with a map of blurred places.

This one in Northern Canada is not simply blurred. Its completely blanked, and visible from pretty far up. Anyone have a clue what it might be ?


View Larger Map

Saturday, August 22, 2009

busybox for Android on FreeRunner

I saw that a busybox binary was available for Android . Forgetting the Freerunner has a slightly different ARM Architecture version than the G1 (v4 versus v5) I grabbed a copy and loaded it. Well it didn't work. I built a version for ARMv4 that will work on the Freerunner. It is available here. No change to instructions for applying and using:

adb shell
# mkdir /data/bustbox
# exit
adb push busybox /data/busybox/busybox
adb shell
# cd /data/busybox
# ./busybox --install
# export PATH=/data/busybox:$PATH

Friday, August 14, 2009

Google Maps working on OpenMoko FreeRunner

Getting Google Maps working on my OpenMoko FreeRunner with Android

For some reason this took me a while to get working. The basic idea is described by Sangjin Yun here, although there were a few twists perhaps related to the particular version of Android I'm using - Michael Trimarchi's freerunner-cupcake-snapshot-v15.jffs2 and uImage-v22.bin from here.

I'll take the liberty of repeating Sangjin's instructions here along with my minor modifications just so it is easy to understand.

1. Get the Maps.apk and com.google.android.maps.jar from the emulator.
You should also grab com.google.android.gtalkservice.jar from the emulator
The Maps.apk depends on the gtalkservice.

2. Enter the shell of your device.

  • adb -d shell

3. Remount the system partition with read/write permissions.

  • mount -o rw -t yaffs2 /dev/block/mtdblock3 /system

For me the remount was a bit different. The following did the trick

  • mount -o remount,rw /dev/root /

4. Copy the files to the system directory.

  • adb -d push Maps.apk /system/app/
  • adb -d push com.google.android.maps.jar /system/framework/

I needed to install the files onto my moko a bit differently. Since Maps.apk depends on the two libraries it will not install first. Here is what I did:

  • adb push com.google.android.maps.jar /system/framework/com.google.android.maps.jar
  • adb push com.google.android.gtalkservice.jar /system/framework/com.google.android.gtalkservice.jar


5. Add the permission for maps.

I found it simplest just to adb pull platform.xml onto my host, edit it there, adding an entry for both maps and gtalkservice, and then adb push it back to the phone.

/etc/permissions/platform.xml

<permissions>

...


<!-- This is a list of all the libraries available for application code to link against. -->

<library name="android.awt" file="/system/framework/android.awt.jar">
<library name="android.test.runner" file="/system/framework/android.test.runner.jar">
<library name="com.android.im.plugin" file="/system/framework/com.android.im.plugin.jar">
<library name="com.google.android.maps" file="/system/framework/com.google.android.maps.jar">
<library name="com.google.android.gtalkservice" file="/system/framework/com.google.android.gtalkservice.jar">

</permissions>


6. At this point Maps.apk will still not load because the libraries are not yet registered. Restarting the device will allow the package manager to pick up and register the two new libraries. This can easily be done using

  • adb stop

  • adb start


Alex Buntu Reported that his version of adb does not support the stop and start command.
If you can't restart your device this way you can always resort the power cycling it.
Until the new libraries are properly registered you will get
Failure [INSTALL_FAILED_MISSING_SHARED_LIBRARY] when trying to install Maps.apk


7. Now we can install Maps.apk. You should use adb install instead of adb push. push simply copies a file while install registers the package and check dependencies.

  • adb install Maps.apk


8. Now you should be able to run Google Maps on your Android Freerunner.

Friday, May 15, 2009

Multiple Trips for tangogps

This is a little mod for tangogps which

1) persists the Trip data, and

2) adds multiple independent trips (5).

I use tangogps on my Neo FreeRunner for an odometer in my old car. I wanted to have a separate trip settings for oil changes, and, since the fuel gauge doesn't work, for petrol fill-ups.

The changes are made to tangogps-0.9.6

Here is a src patch.

and here is a complete openmoko package binary.

A few usability notes:

Without this update tangogps starts the trip counter by default. With this mod there are now 5 separate trip counters - all are OFF by default.

Cycle through the separate trip counters using a new NEXT button.

When you first start up tangogps, cycle through the trip counters and turn on the ones you want running for your current trip.

Starting, Stopping, and Reseting a trip counter works the same as before with the caveat that the operation only affects the trip counter currently displayed on the screen.


Some additional changes being considered:

Add ability to name the trips instead of simply using the numbers 1,2..,5.

Add ability to create an unlimited number of trips instead of fixing the number (presently at 5).



comments and feedback are welcome.