2009년 9월 24일 목요일

Android Developers Blog: An introduction to Text-To-Speech in Android

Android Developers Blog: An introduction to Text-To-Speech in Android

2009년 9월 20일 일요일

How to turn off the annoying beep sound in Ubuntu 9.04

Go to System>Preferences>Sound>Sounds and uncheck "Play alert sound".

I am not sure if this works for other versions of Ubuntu.

Ubuntu Beginner's Guide

Please look at the following link.

http://www.ubuntupocketguide.com/download_main.html

Using Virtual Console in Ubuntu

Like most other Linux distros, Ubuntu also provides virtual consoles.
You can switch between virtual consoles.
There are 6 virtual consoles available.

To switch between them, press Ctrl+Alt+F1, Ctrl+Alt+F2, ... and so on. (up to F6)

Usually 1st virtual console (Ctrl+Alt+F1) is the one you have X server in it.
After switching from X server (F1) to other consoles,

if you want to go back to X, press Ctrl+Alt+F7.

* If you are running Ubuntu on VMWare, Ctrl+Alt is reserved for exiting VMWare.
So, change the hot key through Edit>Preferences>Hot Keys (in my case, changed to Win key)
or press Ctrl+Alt+Space, release only Space and press F# key.

How to boot into console/command line instead of X in Ubuntu

To boot into console/CLI everytime ,

$sudo update-rc.d -f gdm remove

Just to shutdown the X server,

$sudo /etc/init.d/gdm stop

To return gdm (X server) back again

$sudo update-rc.d gdm defaults

2009년 9월 19일 토요일

Understanding DIP on Android Platform

안드로이드의 HW configuration에서 LCD density라는 환경 설정 값을 가지고 있습니다. 기본적으로 이 값은 160입니다. (DEFAULT).

도넛 버전 이전에는 공식적으로 HVGA만 지원을 했고 도넛부터 WGVA등이 추가되었습니.

이와 함께 LCD density 120 (LOW) 240 (HIGH) 두 개가 추가되었습니다.

아래 이미지들은 WVGA 해상도에서 LCD density 160 240인 경우를 비교해 놓은 것입니다.

보시듯이 LCD density 240일 경우 즉 고해상도에 LCD의 물리적인 사이즈가 변경이 거의 되지 않으며 HVGA랑 거의 동일한 look을 가지게 됩니다.

LCD density 160일 경우 MID같이 LCD의 물리적인 사이즈가 매우 커졌을 때 유용한 형태 인 것으로 생각됩니다.

(왜 이렇게 되는가는 표 아래쪽에 설명을 첨부하였습니다.)


Lcd.density = 160

Lcd.density = 240

Home

Apps List

Settings

실제 DPI 정보와는 약간 다른 단위가 안드로이드에 사용이 되고 있습니다.

DIP (또는 DP)라는 것으로 Device Independent Pixel의 약자입니다.

이는 디바이스의 LCD 해상도가 변경이 되어도 GUI 요소들의 물리적인 크기를 동일하게 유지하기 위한 방법입니다.

LCD density 160일 경우, 1 DIP = 1 Pixel 이라는 공식이 성립됩니다. (안드로이드가 HVGA, 160에서 출발해서 그렇습니다.)

따라서 이 density 값이 240으로 변경되면 1 DIP = 1.5 Pixel이 됩니다.

기본 생성되는 WVGA 에뮬레이터가 density 240으로 설정되어 있는데, 이 때문에 아이콘들이나 이미지들이 늘어나 보입니다.

(기존 20DIP x 20DIP 크기의 이미지가 HVGA (160)에서는 20pixel x 20 pixel로 보이지만 WVGA (240)에서는 30pixel x 20pixel 로 보이기 때문입니다.)

따라서 실제 물리적인 LCD의 크기가 많이 커지지 않고 해상도만 커진다면, 고해상도에서 더 많은 pixel을 차지하게 되므로 GUI 요소들의 실제 크기는 유사하게 유지시킬 수 있습니다. (예를 들면 저해상도 고해상도에서 모두 1인치)

Eclipse Configuration for Android

In order to smooth operation with android application development, I have the following eclipse.ini configuration.

-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-framework
plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
-vm
C:\Program Files (x86)\Java\jre1.5.0_20\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms128m
-Xmx512m
-XX:PermSize=256m

Check for more (including how to debug android source with eclipse)
http://source.android.com/using-eclipse

2009년 9월 18일 금요일

How to clear or modify the VMWare Player's Recent Virtual Machine list

VMWare Player does not provide any options or tools to edit or clean "Recent Virtual Machines". When you erased VMs or have not been used for a while (likely not to use in the future), this is really annoying.
Here is how you can modify the list.

This only works on Windows.

1. Go to %USERPROFILE%\AppData\Roaming\VMWare
* %USERPROFILE%=C:\Document and Settings\[user] on Windows XP
%USERPROFILE%=C:\Users\[user] on Windows Vista
assumed the OS is installed in C drive. If you installed in other drive, please replace C: with the correct one

2. Open preferences.ini
3. Find the lines that contains the following contents. Usually around the end of file

pref.mruVM#.filename = "..."
pref.mruVM#.displayname = "..."

* # is a number. If you have 2 recent items, you have pref.mruVM0... and pref.mruVM1... .

4. Edit and remove unnecessary items.
5. Now you will have cleaned-up recent VM list.

2009년 9월 5일 토요일

Crash info on Android Device

I learned that there are 2 kinds of crash information on the device.
(There might be more. If I find more, I will add it)

1. Tombstone
You can find this crash info file under /data/tombstones/.
The filenames look like tombstone_00, tombstone_01 ...
This crash file can be interpreted by addr2line tool.
Actually I did not try this tool. (at the moment, linux is not available.. sorry)

2. anr (android non response)
ANR traces are logged in the folder /data/anr as a filename "traces.txt"
This file is in plain text format.
Use any text editor tool to open this log.
It shows java stack traces when anr have occurred.

2009년 9월 2일 수요일

How to install APK without Market on Android

1. Register .apk mime-type to the web server and upload .apk file to an appropriate location.
For apache server,
add the following line to mimetype configuration file.

application/vnd.android.package-archive apk

Of course, you have to restart the web service to apply this change.

2. Now check your device. Go to Settings > Applications

Have "Unknown sources" checked.