Archive for 1st December 2007

SI543 – Beginning Java for Google Android

I have packaged up the lectures, podcasts, assignments, blog entries, etc about the emergent use of Google Android in SI543 at University of Michigan.

Go here for an intro to using Google Android
www.si543.com/si543/ – soon this will just be www.si543.com.

Important Google Android Skill – My Applications don’t seem to get updated!

If you keep making modifications and they are *not* making it down to your Android device you can wipe out the versions of the app on our device as follows. For example – I simply added a Log.i method to the onCreate method and it *never* came out – I thought I was crazy. I figured I was doing something wrong.

I don’t know why it does not just overwrite the files on my Emulator – but by blasting the files on the emulator life gets much better.

Start this process with Eclipse up and running and the emulator up and running – hey try to update your app.

$ cd /Users/csev/dev/android_sdk_darwin_m3-rc20a/tools
$ ./adb devices
List of devices attached
1	emulator-tcp-5555	device	0
$ ./adb shell
# ls
drwxr-xr-x root     root              1969-12-31 19:00 var
drwxrwxrwt root     root              2007-12-01 08:06 tmp
drwxr-xr-x root     root              2007-11-11 15:59 system
drwxr-xr-x root     root              1969-12-31 19:00 sys
drwxr-xr-x root     root              1969-12-31 19:00 sbin
dr-xr-xr-x root     root              1969-12-31 19:00 proc
-rwxr-xr-x root     root        93824 1969-12-31 19:00 init
drwxr-xr-x root     root              1969-12-31 19:00 etc
drwxrwx--x system   system            2007-11-11 15:59 data
drwx------ root     root              1969-12-31 19:00 root
drwxr-xr-x root     root              2007-12-01 08:06 dev
# cd data
# cd app
# ls
-rw-rw-rw- root     root       139313 2007-12-01 08:06 Lunar.apk
-rw-r--r-- system   system    1325833 2007-11-11 15:59 ApiDemos.apk
-rw-rw-rw- root     root       139233 2007-11-13 16:50 Toozday.apk
-rw-rw-rw- root     root        49781 2007-11-29 08:01 Twitter.apk
-rw-rw-rw- root     root        51506 2007-11-29 12:21 Hello.apk
-rw-rw-rw- root     root        11931 2007-11-29 12:32 H2.apk
-rw-rw-rw- root     root        54804 2007-11-29 18:48 SkeletonActivity.apk
-rw-rw-rw- root     root        11931 2007-11-29 19:49 H3.apk
-rw-rw-rw- root     root       139591 2007-11-30 20:07 LunarLander.apk
# rm Too*
# rm Hello*
# rm H2*
# rm H3*
# rm Ske*
# rm L*
# rm T*
# ls
-rw-r--r-- system   system    1325833 2007-11-11 15:59 ApiDemos.apk
#   (Exit with CTRL-D)

Then run the app again – Voila!

SO far once I have done this – I can re-download again the normal way – if I get stuck and downloads seem not to be overwriting the app on the emulator – blast away!