1
Android jChat 1.3
User Guide
2
Contents
Introduction.......................................................................................................................................................3
Android jChat 1.3 setup.....................................................................................................................................3
Setting the phone number ............................................................................................................................3
Customizing the GPS location provider .........................................................................................................3
Launching JADE main container ....................................................................................................................5
Using Android jChat 1.3.....................................................................................................................................6
Connecting to JADE........................................................................................................................................6
Knowing jChat 1.3 tabs ......................................................................................................................................8
The Contact tab .............................................................................................................................................8
The map tab...................................................................................................................................................9
Picking contacts ...............................................................................................................................................10
Interacting with contacts.................................................................................................................................11
Sending an SMS to one or more contacts....................................................................................................11
Calling a contact ..........................................................................................................................................11
Starting a chat session .................................................................................................................................12
Using the status bar to browse chat sessions..............................................................................................12
Closing a chat session ..................................................................................................................................13
Compiling and signing jChat ............................................................................................................................14
FAQ ..................................................................................................................................................................15
3
Introduction
jChat application is an agent based IM-style application for Android , based on JADE (http://jade.tilab.com).
It allows the user to communicate with any other contact having the same software running and connected
to the same JADE platform. Users can send text IM in a chat like way, call a contact by phone or even send
an SMS to a contact.
Moreover, the position of each contact can be seen on the map at any time and it is continuously updated.
jChat 1.3 has been tested on the first Android phone: the TMobile G1 phone.
Android jChat 1.3 setup
In order to be able to start and use the jChat 1.3 application, a few configuration steps are required.
Setting the phone number
jChat 1.3 application uses the phone number as the agent ID of each contact. When running of the real
phone the application tries to retrieve the real phone number using the Android API. If for some reason the
phone number cannot be retrieved it must be set using the Jade Setting dialog (see Connecting to JADE)
Due to some API changes from Android SDK 0.9 to 1.0, phone number customization is no more possible on
the emulator. In this case, jChat 1.3 uses the emulator default telephone number and appends a random
integer to ensure the uniqueness when using multiple instances of the phone emulator.
Customizing the GPS location provider
jChat 1.3 allows to a user to see both his position and his contact’s on a map. To do so, a mocked GPS
location provider is used. jChat 1.3 used a mocked GPS service running on the phone.
Since Android SDK 1.0 removed the API used by the location provider service, this solution is no more
applicable.
To send custom tracks to jChat 1.3 you can use the custom LocationProvider tool that is provided under
/tools directory in the source tree.
Please note that this tool is a standard J2SE application using Java 1.5 and swt, which has been written
using the same libraries used by the ddms tool provided with Android SDK.
You can easily build and run this new tool by using ant with the provided build.xml
4
Figure 1
To do so, you have to:
� Go to <JCHAT-SOURCES-BASEDIR>\tools\LocationControlTool folder on a
command shell
� Edit the build.properties file, setting android-sdk-folder property to the path of your
Android 1.0 SDK
� Type ant at the shell prompt
� You should be able to see the LocationControl tool GUI.
� Launch an emulator. As soon as the emulator connects to adb, you should be able to see it in the
Available Devices panel.
� Click on the emulator icon in Available Devices panel.
� Click on the Load KML… and choose a KML track file to import. You should now be able to see all
the positions in the track. Please note that the KML parser only looks for data inside
<coordinates> tag inside <MultiGeometry> element. Any other data shall be ignored!
� You are able to set Loop Mode (locations will be fired from beginning to end and back forever) by
clicking the Loop Mode enabled checkbox.
� You are able to set the delay in milliseconds between the firing of two consecutive positions in the
track, by setting it in the checkbox
� If you press the Play Route button, the default gps provider on the emulator shall begin to
receive position updates. If you start jChat, you should be able to see you own position changing
over time in the map tab.
� You are able to stop the update anytime by pressing Stop Route button. You are also free to
launch a second emulator instance and send updates to it by clicking on its icon in Available
5
Devices and repeating the procedure. You should be able to handle multiple emulator instances
with different data playing at the same time.
� If you close the tool window, all the running updates shall be stopped.
Launching JADE main container
To be able to run jChat 1.3, a JADE Leap main container must be launched.
A JADE Leap container MUST be running when jChat 1.3 connects to it, otherwise the application will hang.
These are the steps that should be executed:
1. Download the last JADE-Leap sources from http://jade.tilab.com
2. Unpack the sources somewhere
3. Build JADE Leap for J2SE following the instruction provided with JADE sources. If the build is
successful, a JadeLeap.jar file is available.
4. Launch a JADE Leap main container, together with JADE RMA GUI issuing the following command
java -cp <PATH_TO_JADE_LEAP>\JadeLeap.jar -Djade_domain_df_autocleanup=true
jade.Boot -gui
Please note that the option -Djade_domain_df_autocleanup=true is necessary to correctly cleanup
the DF agent.