Archive for January, 2006

TorchLight

This idea struck me while using the newly brewed mirror application of mine.

Just the opposite of it, instead of a blackscreen and backlight off, I thought using a empty screen and blacklight on can turn the phone into a light source.

Another silly idea? Hopfully not. Lets say you might drop your car keys below the car seat where the door lights do not provide enough illumitation. Turn the torch light application on.

Then why not just press any button to turn the handphone lights on? 1) You dont have to keep pressing to keep on the lights on. 2) Its the clearest, bright light you can get from your phone lcd screen.

One day, when you find yourself in pitch darkness with nothing but your phone, you should find this application useful. Other uses for this software is reading papers in dim light conditions and … draining battery life..

[update]
At the end of the day after I wrote this version, I found while surfing the net that someone had implemented this idea too but for symbian series 60. See here

[note]
Download TorchLight.jar

I have also updated Mirror midlet so it can exit gracefully on Sony Ericsson phones. Both midlets now have icons.

[source]

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Graphics;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import com.nokia.mid.ui.DeviceControl;
import com.nokia.mid.ui.FullCanvas;
/**
* Mirror Application for Nokia Phones - Turns Screen Black
*
* @author Joshua Koo http://zz85.is.dreaming.org zz85@users.sf.net
*
* 30 Jan 2006, Monday (Chinese New Year’s Day 2)
*/
public class TorchMIDlet extends MIDlet implements CommandListener {

private Canvas myCanvas;

public TorchMIDlet() {
}

public void startApp() throws MIDletStateChangeException {
myCanvas = new MyCanvas(this);
Display.getDisplay(this).setCurrent(myCanvas);
myCanvas.repaint();
DeviceControl.setLights(0, 100); //Turns on lights

//myCanvas.addCommand(new Command(”Exit”, Command.EXIT, 0));
//myCanvas.setCommandListener(this);
}

public void pauseApp() {
}

public void destroyApp(boolean arg0) throws MIDletStateChangeException {
}

public void commandAction(Command c, Displayable s) {
notifyDestroyed();
}

}

class MyCanvas extends FullCanvas {

int toFill = 0×999999; // white

MIDlet m;
public MyCanvas(MIDlet m){
super();
this.m = m;
}

public void paint(Graphics g) {
//g.setColor(toFill);
//g.fillRect(0,0,getWidth(),getHeight());
}

public void keyPressed(int keyCode)
{
if (keyCode == Canvas.UP)
toFill++;
if (keyCode == Canvas.DOWN)
toFill–;
if (keyCode == KEY_SOFTKEY1)
m.notifyDestroyed();

repaint();
}

}

Mirror MIDlet

If you have come across this Mirror application for Palm or this commercial PocketPC version, here’s my software for turning your nokia phone into a “mirror”.

Simple, silly, yet “idea!”, it works by turning all the pixels on the screen black. For my version, it turns off the backlight to reduce reflections glare. Works best under the sun, you might use it to spy on people behind you while look at the reflections on the black screen held in your hand.

Its about 2 years since I wrote a mobile application maybe - 1) disappointment in grades i got for my mobile applications module, 2) really never get to have hands-on using a real phone.
Its now with my Nokia 3120 I got, and a DKU-5 cable, installation of Sun Wireless Toolkit and Nokia Developer Tools I can get started again. Btw Nokia 3120 is really one of the cheapest phone with a “symbian os” - series 40. Programming language is java, (j2me -mobile edition if you care), and the program can be called a midlet too because midp (1.0) is required on handphones to run them.

Download it here for nokia phones, if not here for slightly more compatible version, if not just turn ur phone off to make it work the same way too.

Here’s the source code if you cared

import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Graphics;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;

import com.nokia.mid.ui.DeviceControl;
import com.nokia.mid.ui.FullCanvas;

/**
* Mirror Application for Nokia Phones - Turns Screen Black
*
* @author Joshua Koo http://zz85.is.dreaming.org zz85@users.sf.net
*
* 28 Jan 2006, Saturday (Chinese New Year’s Eve)
*/
public class MirrorMIDlet extends MIDlet {

private Canvas myCanvas;

public MirrorMIDlet() {
myCanvas = new MyCanvas();
}

public void startApp() throws MIDletStateChangeException {
Display.getDisplay(this).setCurrent(myCanvas);
myCanvas.repaint();
DeviceControl.setLights(0, 0);
// dealing with Backlight http://discussion.forum.nokia.com/forum/showthread.php?threadid=64234 http://discussion.forum.nokia.com/forum/showthread.php?t=33194
}

public void pauseApp() {
}

public void destroyApp(boolean arg0) throws MIDletStateChangeException {
}

}

class MyCanvas extends FullCanvas {
public void paint(Graphics g) {
g.setColor(0×000000); // black
g.fillRect(0,0,getWidth(),getHeight());
}
}

Well, some other j2me applications for handphones that kept me interested recently
1) Go Bible - “Go Bible Java applications that can be loaded onto phones. ”
2) ReadManiac - “A Library in the Pocket”
3) vOICe - “seeing-with-sound technology for the totally blind”

Well.. if I free (word being very subjective), I’ll try working on some other ideas I have. If you have any cool ideas, let me know and see if I challenged to implement it. Meanwhile checkout some sites - Wireless Java downloads, Imserba - “The best mobile phones portal and community in the world”

[update:] After running this application, I found it could serve another purpose. To trick people into thinking the handphone is off as the screen is dark and blanked out.

Signs you are watching a Korean Drama

Trying to create one of the humorous and a little truthful series of “How do you tell you are a XYZ addict” or “Top 10 things when you are a ABC” or “10 Reasons why YYY” .. here my first attempt creating a list - on spotting Korean dramas.

10. You see beautiful sceneries (mountains, lakes, greenery’s.. and 4 seasons- falling leaves, snow)

9. You see a hospital scene. A character is dying (likely cancer) or sick.

8. You see a bicycle scene. (The guy is riding a basket typed bicycle with a girl on it too)

7. You see scolding or fighting scenes.. When its not, the pace is slow (speech takes a long time to complete and walking is done slowly).

6. The scenes can be exaggerating but humorous

5. You feel heartbrokenness and sad

4. The actors are crying

3. You see Korean actors.

2. You hear Korean being spoken. (sort of hash like hokkien or Malay). Sometimes you hear konglish. (i cant critise it as bad english as mine isnt good either)

1. You see chinese or english subtitles(watching from vcds). You see dual sound icon (if watching on Singapore’s channel. You see a korean tv channel logo (You must be watching in korean then)

If you have anything interesting to add, do let me know.

Bible on your Handphone

Extracted from my mail to some youths

Kitami recently introduced me to this free bible software (kjv and asv editions) called “Go Bible” for mobile phones. (He did request if I could code an bible application.. at that time i could only find bible software for pda and palm.. and thought too the whole bible was too huge unless spitted into smaller books.. of course nowadays handphones have capabilities reaching pdas)

Nowadays most modern (&coloured) handphones are capable of running “java applications”. Its specially easy since you could install applications through infra-red, bluetooth, cable, or wap connection.

There are 2 versions.. version 1 is for “older” handphones which cant support big files. version 2 is for newer, better end handphones.. version 2 supports chinese versions and sending verses to your friends.

Even for my “free” nokia 3120, I’m able to copy a few books into the phone (eg. Proverbs, Psalms.. using version 1.. as for NT, I have a pocket new testament bible).. You can jump to any verse, or search for words.

Since we bring our mobile phones everywhere with us (and play games when we are bored), i think its a great idea that we have a “bible” everywhere we go.

The link for the software is at http://www.onthenet.com.au/~jolon/

But after what I said, doesnt mean I recommend not bringing bibles to church. ;-)

Nice use of tagging

See http://fac-simile.org/catalog/ensembles

Where it was very helpful organising and finding music. btw, all the scores (in pdf) linked on their webpage are free

lab4games.net was down the past week. I used http://zz85.wordpress.com/ during that time. You might have still be able to access my blog via zz85.is.dreaming.org then (with js disabled). Lab4games.net is back.