Wednesday, August 23, 2006

TimeTable ME is a timetable platform written in J2ME, Java MicroEdition. It allows any train operators to easily create a portable schedule/timetable application that runs on any PDA/mobile devices supporting J2ME MIDP 2.0. Sample implementation contains the current schedule for CalTrain, the train system in San Francisco Bay Area.

Devices known to support MIDP 2.0:

  • Symbian OS v7.0s+
  • Palm OS 5.2+
  • All Blackberry
  • Windows CE/Mobile 5.0+
  • Windows Mobile 2003 2nd Edition+
  • Windows devices will need IBM Micro Environment if it is not supplied by the phone manufactures.

    How it looks:

    1. Select a train schedule.


    2. Select "From" and "To" stations and "AM/PM".

    Palm Blackberry


    3. Matching timetables are displayed.



    How it works:

    SCREEN 1: The schedule names are read from .JAD file.

    SCREEN 2: When a schedule is selected, the app attempts to read ${scheduleName}.txt from the JAR. The schedule has to be a TAB DELIMITED file in the following format.

    Format of the schedule database:




























    Train No.San FranciscoMilbraeMountain ViewSan Jose
    4228:00 AM

    8:30 AM
    4248:15 AM8:30 AM
    8:45 AM
    4259:00 AM9:15 AM9:30 AM10:00 AM

  • Time can be in 24hr format instead of AM/PM
  • UTF characters are not yet supported.
  • First column is ignored when the schedule is loaded.
  • First row contain the stations names that will display on screen 2.
  • In the example above, 422 is a speed train connecting San Francisco to San Jose, 425 is a slow train stopping at every station. Please note the train stations MUST be in order of the direction of the train. In a Southbound timetable, the northmost station is listed first. The order is reversed for a Northbound timetable. Also, train number (row) MUST be ordered chronologically by time of departure.


    How to create a new app using your train timetable

    Simple (Java/Symbian phones only):

    1. Edit your timetables into the format above
    2. Open up the .JAR file in the distribution, delete *.txt and put your timetables in there.
    3. Edit .JAD file in the distribtion (see configurable params below).
    4. Update MIDlet-Jar-Size in the .JAD with the new .JAR size.

    All devices:

    1. Follow the instruction at the bottom of the page to set up your developer environment.
    2. Format your timetables and put them inside the lib/schedule folder of the source
    3. Edit .JAD file in the distribtion.
    4. Run Ant against the build.xml


    Configurable parameters (italized) in .jad file:

    MIDlet-1: CalTrain,,CalTrainMIDlet
    MIDlet-Jar-URL: CalTrain.jar
    MicroEdition-Configuration: CLDC-1.0
    MIDlet-Version: 1.2
    MIDlet-Name: CalTrain Schedule
    MIDlet-Vendor: Grassroot Innovation
    MicroEdition-Profile: MIDP-2.0
    CONTACT_EMAIL: jflashcard@gmail.com
    TITLE: CalTrain Schedule
    HELP_TEXT: Caltrain timetable effective January 1, 2006 (Source: http://www.caltrain.com/timetable.html) Legend: @=Six minute timed transfer at Redwood City station; *=Train may leave up to 5 minutes early.
    SCHEDULE1: North M-F
    SCHEDULE2: South M-F
    SCHEDULE3: North S-Su
    SCHEDULE4: South S-Su
    MIDlet-Jar-Size: 16554


    Variable Reference:
















    CONTACT_EMAILEmail contact where users into problems.
    TITLETitle of the root menu (screen 1).
    HELP_TEXTText to be displayed at the help menu. Copyright info goes here.
    SCHEDULExName of the file before .txt. The name of the schedule will be displayed in order at the root menu.

    For Developers:

    Tools Required:

    1. J2ME Wireless Toolkit from Sun
    or J2ME SDKs from phone manufactures such as Nokia.
    2. Apache Ant
    3. (Optonal) Eclipse and EclipseME
    Edit eclipseme-build.properties when finish

    Downloads:

    Dist: Java/Symbian Blackberry PalmOS
    Only weekend CalTrain schedules are included in the distribution.

    SubVersion: http://timetableme.tigris.org/svn/timetableme/trunk/TimeTableME


    page hit counter