Way back in June someone contacted me and asked me if dongsa.net, an online Korean verb conjugator that I wrote, was available as an iPhone app. There wasn't an app but the email inspired me to rewrite dongsa.net in Javascript so that it could be run offline on devices that support HTML 5. This is possible since dongsa.net uses an algorithm and not a database to conjugate Korean verbs. If you are interested in Korean verb conjugation you might want to check out my earlier article where I announce dongsa.net.

The other day I picked up an Android phone here in Korea and I decided to see how hard it would be to turn the Javascript-based version of dongsa.net into an app. Turns out it's not that hard at all. The application is just an embedded web browser. Since Android phones come with a WebKit-based browser they can handle pretty much any site you throw at it. This is all the Java code I had to write:

package us.bravender.android.dongsa;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class Dongsa extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        WebView engine = (WebView) findViewById(R.id.web_engine);
        engine.getSettings().setJavaScriptEnabled(true);

        engine.loadUrl("file:///android_asset/html/index.html");
    }
}

Here are some screenshots:

If you have an Android phone you can download the app. The source is all over at GitHub. The android directory contains all the code necessary to build the app and the html directory contains all of the Javascript and HTML required for the offline version of dongsa.net.