Instead of fiddling with AT commands and parsing the strings returned from the phone, DisGUISE enables you to use actual objects to control and monitor events on your phone. There are also classes available to create various GUI items on the mobile, which report back their results through event listeners, and allow the phone to act as an input and output device of your application.
A common case of use would be the implementation of a media remote control: While actions like skipping to the next or previous track or volume adjustment can be implemented with the builtin BT-HID remote control quite easily, this approach allows you to establish a way of displaying information from the computer on your phone, like the properties of the playing track, or the current volume level.
If you are interested in this project, feel free to contact me.
DisGUISE will focus on a clean and flexible implementation of a class library that will enable developers to use the phone GUI from within their own applications. Most classes will be simple object oriented wrapper around the builtin widget availablevia AT commands, and classes to support other phone features like notification on incoming calls.
DisGUISE is explicitly not designated to become an media player interface itself, but to provide the platform to implement such a program.
GUIdanSE (Hooray for project names) however will bring more advanced widgets - derived from the base classes of DisGUISE - with it, for example a file browser or media controller. It will act as an example of DisGUISE use as well.
Another goal is the use of DCOP, Bonobo, Corba or DBUS to provide a way of using the phone functions without applications borders, however this is still only planned.
The library is aimed at Sony Ericsson phones, since most of the GUI related commands are specific to that brand (The commands start with AT*SE...). Other operations, like looking up the phonebook, or listening for key or call events may work on other brands phones as well. The library has been tested on following devices:
- K750i (primary development platform)
- (that's right, nothing more yet)
The DisGUISE library is easy to use: Just derive something from the supplied classes, and let the library do the hard work. If, for example, you would like to display an information message on your phone, you would have to do the following without DisGUISE:
Without DisGUISE: The naked truth
- Open the device
Initialize an UI session:
Create the alert (The 4 indictates the type "info")
AT*SELERT="Text goes here",4,1
Parse the returned string and remember the GUI item id ("1" in this example)
Wait for GUI event codes, and destroy the window once they are received
Close the GUI session
- Close the device
Of course, if you create more than one widget, you have to keep track of them to decide when to open or close the GUI session.
With DisGUISE: Hard work hidden in the dark
With the library, you can just instantiate some objects and get on with your actual application:
using DisGUISE.Backend; using DisGUISE.SEWidgets; IPhonePort port = new DeviceFilePort("/dev/bluetooth/rfcomm/1"); SEWidget w = new SEAlert(port, "Text goes here"); w.AutoDestruct = true; w.Show();
The AutoDestcuct property destroys the widget once a arbitrary GUI event is received, a behaviour which is appropiate for such an easy widget like a message box. As a bonus, the class itself will keep track of all widgets being shown an destroyed, deciding when to close the GUI session or open a new one.