Table of figures - Department of Computer and Information Science
Transcription
Table of figures - Department of Computer and Information Science
NORGES TEKNISK-NATURVITENSKAPELIGE UNIVERSITET FAKULTET FOR INFORMASJONSTEKNOLOGI, MATEMATIKK OG ELEKTROTEKNIKK PROSJEKTOPPGAVE Kandidatens navn: Frode Walle Emne: TDT4735 Systemutvikling, fordypning Oppgavens tittel: Verdiaukande radiomodul Oppgavens tekst: Java-nettradio med tilleggsinfo via GPRS Verdiaukande radiomodul (kva spelast no, kva kjem, info om artistar, programleiarar, nyheitsticker, programinfo, bilete av platecover, etc. her bør det være returmogelegheiter, f.eks avstemming på musikken som spelast akkurat no). Oppgaven skal sjå på korleis ei radiosending kan supplerast med ein bidreksjonal datakanal over GPRS eller UMTS. Informasjon om lokasjon til mobil-brukarar kan overførast i forbindelse med avstemmingar. Klienten kan integrerast med chat mellom programleiarar og lyttarar i kombinasjon med lokasjon og anna presence informasjon. Besvares innen: 28. november 2003 Besvarelsen levert: 28. november 2003 Utført ved: Institutt for datateknikk og informasjonsvitenskap Veiledere: Monica Divitini, NTNU Steinar Brede, Telenor FoU Gunnar Garfors, NRK Radio module for increasing listener experience Abstract Abstract Initially mobile phones were designed to call people to talk with them. Now a mobile phone can do so much more. The future seems complex, mobile phones seems to be blended with other mobile devices such as PDAs, laptops and cameras. The number of services available and the complexity of them increase every day. The mobile phones are more and more integrated in everyone s lives and most people who own one carries it with them at all time. The future seems to be heading for a world where we will check the everyday services by our mobile phone rather than from home. In addition to calling other persons, the users will require mobile shopping, entertainment, device to device direct communication, location services and more. Some of these services are already available, but there s more to come. The number of services looks to increase massively. This report presents the process of specifying a mobile service to support a radio show. It will specify a set of requirements and a design of such a system. A prototype is developed and presented as well. The service will use the location of the users. With respect to this technology related to finding location of mobile users will be presented as well as the state-of-the-art systems using location. Using mobile phones and location you can interrupt with the personal privacy, this is an issue that will be presented in this report as well. The prototype will be a J2ME program running on a mobile phone. iii Radio module for increasing listener experience iv Abstract Radio module for increasing listener experience Preface Preface This report presents the work done in the 9th semester specialization project Radio module for increasing listener experience in the course TDT4735 Software eningeering at the Norwegian University of Science and Technology. The project has been carried out at the Department of Computer and Information Science on the Faculty of Information Technology, Mathematics and Electrical Engineering. The student responsible of this work is Frode Walle. I would like to thank my supervisors Steinar Brede at Telenor R&D and Monica Divitini at NTNU for their counseling and advices. I will also specially thank Steinar Brede for setting me up nicely with nicely with the equipment needed. Thanks also goes to Gunnar Garfors at NRK for his assistance. Trondheim, November 28th 2003 _________________________________ Frode Walle v Radio module for increasing listener experience vi Preface Radio module for increasing listener experience Table of contents Table of contents Abstract ..............................................................................................................................iii Preface................................................................................................................................. v Table of contents ...............................................................................................................vii Table of figures ................................................................................................................... x 1 Introduction ................................................................................................................. 1 1.1 Problem definition............................................................................................... 1 1.2 Objectives and research approach ....................................................................... 2 1.3 Report outline...................................................................................................... 2 2 Example scenarios....................................................................................................... 4 2.1 On the move a listener scenario ....................................................................... 4 2.2 In the studio a radio program host scenario ..................................................... 5 2.3 Promotion a management scenario .................................................................. 6 3 Location....................................................................................................................... 7 3.1 Buddylist ............................................................................................................. 7 3.2 gulesider.no ......................................................................................................... 8 3.3 UK Ambulance Service....................................................................................... 8 3.4 Standpunkt ....................................................................................................... 8 3.5 Comparable systems............................................................................................ 9 3.5.1 Svisj ......................................................................................................... 9 4 Privacy....................................................................................................................... 11 5 Techonology.............................................................................................................. 12 5.1 Mobile technology............................................................................................. 12 5.1.1 Wireless communication standards........................................................... 12 5.1.2 Mobile networks........................................................................................ 13 5.1.3 SMS Short Message Service .................................................................. 14 5.1.4 MMS Multimedia Messaging Service.................................................... 15 5.1.5 WAP Wireless Application Protocol...................................................... 15 5.1.6 J2ME Java 2 Micro Edition.................................................................... 16 5.2 Mobile devices .................................................................................................. 17 5.2.1 Mobile phone............................................................................................. 17 5.2.2 Combined device....................................................................................... 18 5.2.3 PDA Personal Digital Assistant ............................................................. 18 5.2.4 Laptop........................................................................................................ 19 5.3 Positioning specifications.................................................................................. 20 5.3.1 Latitude and longitude............................................................................... 20 5.4 Determining position......................................................................................... 21 5.4.1 GPS Global Positioning System............................................................. 21 5.4.2 GLONASS Global Navigation Satellite System.................................... 21 5.4.3 Galileo ....................................................................................................... 21 5.4.4 Mobile positioning .................................................................................... 22 5.4.5 Telenor Positioning Middleware System (PMS) ...................................... 24 5.5 Java Technology................................................................................................ 25 vii Radio module for increasing listener experience Preface 5.6 Web Service and SOAP .................................................................................... 25 Choice of technology ................................................................................................ 26 6.1 User interfaces................................................................................................... 26 6.2 Modelling language........................................................................................... 26 6.3 Programming language ..................................................................................... 26 6.4 Web server for database and web services........................................................ 27 7 Overall explanation of the system............................................................................. 28 8 System requirements ................................................................................................. 29 8.1 Functional requirements.................................................................................... 29 8.1.1 General functional requirements ............................................................... 29 8.1.2 Specific functional requirements............................................................... 30 8.2 Use cases ........................................................................................................... 33 9 Software architecture and design .............................................................................. 34 9.1 Class diagram .................................................................................................... 34 9.1.1 Class description ....................................................................................... 35 9.2 Sequence diagrams............................................................................................ 36 9.2.1 User registration ........................................................................................ 37 9.2.2 Logging in on the system .......................................................................... 38 9.2.3 Updating user profile................................................................................. 39 9.2.4 Setting availability..................................................................................... 40 9.2.5 Submitting a vote ...................................................................................... 41 9.2.6 Looking up information about the radio host............................................ 42 9.2.7 Looking up information about the radio program..................................... 43 9.2.8 Submitting message to public chat............................................................ 44 9.2.9 Initiating a private chat.............................................................................. 45 9.2.10 Initiating a call or a teleconference ........................................................... 46 9.2.11 Creating a poll ........................................................................................... 47 9.2.12 Logging an event....................................................................................... 48 9.2.13 Submitting a message to the public chat - host ......................................... 48 9.2.14 Moderating a chat...................................................................................... 49 9.2.15 Updating song title and artist .................................................................... 50 9.2.16 Updating the show information................................................................. 51 9.2.17 Displaying the locations of the logged in users......................................... 52 9.2.18 Generating statistics from backlogs .......................................................... 53 10 Results ................................................................................................................... 54 10.1 Demonstration of prototype .......................................................................... 54 10.1.1 Starting mobile client ................................................................................ 54 10.1.2 Main screen ............................................................................................... 55 10.1.3 Poll screen ................................................................................................. 56 10.1.4 Artist information screen........................................................................... 57 10.1.5 Radio host and radio program screens ...................................................... 58 10.1.6 Evaluation on the prototype ...................................................................... 58 10.2 Knowledge of technology ............................................................................. 59 11 Conclusion............................................................................................................. 60 12 Bibliography.......................................................................................................... 61 6 viii Radio module for increasing listener experience Table of contents 13 Glossary................................................................................................................. 63 Appendix A: Java source code .......................................................................................... 65 ix Radio module for increasing listener experience Table of figures Table of figures Figure 3-1: Messenger service using location..................................................................... 7 Figure 3-2: Example of opinions based on location............................................................ 9 Figure 5-1: Example of SMS received.............................................................................. 14 Figure 5-2: Example of received MMS............................................................................. 15 Figure 5-3: Example of using WAP.................................................................................. 16 Figure 5-4: A mobile phone .............................................................................................. 18 Figure 5-5: A combined device, the Nokia Communicator .............................................. 18 Figure 5-6: A Personal Digital Assistant........................................................................... 19 Figure 5-7: A laptop .......................................................................................................... 19 Figure 5-8: Latitude and Longitude .................................................................................. 20 Figure 5-9: GPS s use of satellites .................................................................................... 21 Figure 5-10: Omnidirectional cell ..................................................................................... 22 Figure 5-11: Three sector cells.......................................................................................... 22 Figure 5-12: Cell of origin ................................................................................................ 23 Figure 5-13: Timing advance ............................................................................................ 23 Figure 7-1: Physical overview of the system .................................................................... 28 Figure 8-1: Use case diagram............................................................................................ 33 Figure 9-1: Class diagram ................................................................................................. 34 Figure 9-2: Registration sequence diagram....................................................................... 37 Figure 9-3: Log in sequence diagram................................................................................ 38 Figure 9-4: Updating user profil sequence diagram.......................................................... 39 Figure 9-5: Setting availability sequence diagram ............................................................ 40 Figure 9-6: Submitting a vote sequence diagram.............................................................. 41 Figure 9-7: Looking up radio host information sequence diagram................................... 42 Figure 9-8: Looking up radio show information............................................................... 43 Figure 9-9: Submitting message to public chat sequence diagram ................................... 44 Figure 9-10: Initiating private chat sequence diagram...................................................... 45 Figure 9-11: Initiating teleconference sequence diagram ................................................. 46 Figure 9-12: Creating a new poll sequence diagram......................................................... 47 Figure 9-13: Event logging sequence diagram.................................................................. 48 Figure 9-14: Moderating a chat sequence diagram ........................................................... 49 Figure 9-15: Updating song title and artist sequence diagram.......................................... 50 Figure 9-16: Updating show information sequence diagram ............................................ 51 Figure 9-17: Displaying locations of logged in users sequence diagram.......................... 52 Figure 9-18: Generating statistics sequence diagram........................................................ 53 Figure 10-1: Starting the client.......................................................................................... 54 Figure 10-2: The main screen............................................................................................ 55 Figure 10-3: The menu options available in the main screen ........................................... 55 Figure 10-4: The poll screen ............................................................................................. 56 Figure 10-5: The poll menu where you can choose which option to vote for................... 56 Figure 10-6: The updated poll screen................................................................................ 56 Figure 10-7: The screen displaying information about the artist currently being played . 57 x Radio module for increasing listener experience Table of figures Figure 10-8: The radio show host information screen ...................................................... 58 Figure 10-9: The radio show information screen .............................................................. 58 xi Radio module for increasing listener experience xii Table of figures Chapter 1 : Introduction 1 Introduction Mobile devices such as mobile phones and personal digital assistants (PDAs) have over the last few years grown massively in popularity. These devices are easy to carry around and can communicate wirelessly. This means that the device, providing they are in range of a transmitter or receiver, can be used for a given purpose at any place and any time. Because it s become such a popular device, there are a really big range of users that have different needs. Therefore the opportunities to explore different kinds of services which there will be a demand for, are great. Even if only a small percentage of the possible users will need this service, there s still a big market to promote this service to as there are so many users. Because of the interest of finding out more applicable areas of mobile devices and other services connected to them. One of the things that are considered is how to use the location of the mobile devices can be used. How can the fact that some users are in the close to one another be used for something useful? Back to the start, the first services available on the market were the obvious ones that a mobile device was built to do, to call people without being physically connected to a phone line. Since text messages and multimedia message as been become popular services provided on mobile devices, several other services have been implemented as well, such as data transfer. The latest hot, common feature is Java-enabled mobile devices. This, along with the fact that the performance and standards of the mobile devices, such as colour displays on mobile phones, has opened up for a lot of new features to be implemented. 1.1 Problem definition Lately interactive broadcasting has flourished. The public broadcasters now want their audience to take part in the show that s on the TV or radio. The audience is expected to give their input to the show live. This input could be plain comments on the show or it could be polls that will decide the content of the program. So far the most common form for interactivity is by users submitting text messages (SMS) or multimedia messages (MMS). The latter have only really made an impact on the TV broadcasts where it s possible to display the message on the screen. NRK s Standpunkt and Svisj , TVNorge s concept is called Mess-TV . In the radio broadcasts it s not so common to use interactivity by using mobile devices, as the only way to report the input back to the audience is through sound. Whereas TV has the possibility to both show the input visually and by audio. However now that the latest mobile devices are Java-enabled, a whole lot of now opportunities arise in regard to interactivity and radio shows. Small Java-clients can run on the mobile devices, this can become the radio show s display. One thing that still seems unexplored with regard to interactivity is how the location of the user can be used. As the portable devices can move around almost without any restriction, it means that location aware services can adapt to where the user are at given time. A mobile phone is possible to locate by the global system for mobile communitcations (GSM). PDAs are either located by a built-in or additional device that can receive and send global positioning system (GPS) signals to determine its physical location. If the device has Bluetooth technology built-in, it can, if it is within range of a 1 Radio module for increasing listener experience receiver, connect to this to find its physical location. Bluetooth technology has a smaller range than GSM, so the device will have to be close to a receiver. Close in this case means 10 meters or less. 1.2 Objectives and research approach This project will study how a radio program can be supplemented with a bidirectional data channel to increase the radio listener experience. It will consider what information could be interesting for the listener to know about the content of the program currently broadcasting. On the other hand, what kind of input from the listeners are hosts of the program and the producing side interested in retrieving from the listeners. The people on the broadcasting side can post information to the users logged on with a mobile device. And users have the possibility to send information back to the hosts of the program. The information sent back could possibly be broadcasted to other users logged in with a mobile device; an example of this would be a chat. This project will also consider how we can use the location of the users can be used in combination with the services provided. Also, we will look at how presence information can be integrated. In short this report will present the following things: Describe scenarios to how the system could work Present an overview on systems using location and issues of privacy in an ubiquitous environment Specify the requirements for such a system Provide an design for the system Develop a prototype of a user client The approach to the problem is scenario driven. This means the work will be carried out based on the scenarios created. The scenarios will highlight issues concerning location, presence and privacy. For the prototype created only some parts of the scenarios will be realised. This specialization project will also be used to get to know the technology better. 1.3 Report outline This project is a collaboration between Telenor Research & Development, Norsk Rikskringkasting (NRK, the Norwegian Broadcasting Corporation) and Norwegian University of Science and Technology (NTNU). NRK is Norway s biggest broadcaster both in television and radio with 2 TV channels and 9 radio stations. Telenor R&D is Norway s largest research establishment within ICT (Information and Communication Technology). Their research is to comprise future communication networks and services together with applications in various market arenas. Hence, the field of mobile technology is among the areas of research they do. They are a part of The Program for Advanced Telecom Services (PATS). 2 Chapter 1 : Introduction This report is structured as follows: In the next chapter we will present a few scenarios which will describe how this system can work in practice. Chapter three will give a presentation of state of the art within location based service. The following chapter presents issues concerning privacy. Chapter five will discuss relevant technology. The chapter will cover mobile technology and technology for determining location. Chapter six will describe the choices of technology, whereas chapter seven will give a general overview the components of the system. Chapter eight and nine will go in depth on the design of the system. The former will describe the functional requirements of the system, and the latter how the different parts will interact with one another. Chapter ten will show the prototype of the mobile client. It will also evaluate how the process has been so far and the results. Chapter eleven will explain what s still to be implemented. Chapter twelve is the bibliography. Chapter thirteen contains glossary. Appendix A is the Java code produced so far on the mobile client. 3 Radio module for increasing listener experience 2 Example scenarios The following section will present to the reader how it this service will be employed. 2.1 On the move a listener scenario Roger is 21 years old and is from Voss, Norway. He s had a summer job this summer and has managed to save up some money. As his old mobile phone was rather old, he s decided to buy a new mobile phone. Like many men his age, he decided to buy a top of the range, Java-enabled phone. This means a mobile phone that can run J2ME1 applications. At the place where he worked during the summer he had to work with hearing protection, and modern hearing protection has built-in radio receivers. During his summer job he used this most of the time and he has now a few favourite programs on a NRK Petre, the channel aiming at a young audience. Whilst listening to the radio he s heard that they offer this client for Java-enabled mobile phones, where you can follow the show currently on the station more closely. They announce that you can retrieve information about what goes on in the program, what will happen later, what music is being played and more. So Roger logs on to the show s webpage, signs up for the service, creates his user profile and receives the instructions as of how to download and install the client. He follows them and just briefly checks that program starts up and it connects properly to the server. Roger is going to move to Trondheim to study at NTNU. He has already sorted out a flat with the student organization. So a few days before his first semester starts, Roger and his father will drive to Trondheim with all the things he s going to bring to his new flat. While driving the distance from Voss to Trondheim they listen to the radio. When all the newspapers have been read and looking out the window gets a bit boring, Roger pulls his mobile phone out of his pocket and starts up the client that connects him with the radio show. As he logged on, there s a song being played that he really likes. He s heard it before, and uses his mobile to look up the artist and song title, Tom McRae Bloodless . He also sees that he can look up more information about the artist performing this particular song. To top it all off he can have an image of the cover of the album from which the song is from. The program s time slot runs out, and a different one comes on air. This new program, Roger s never heard of before. Luckily with this client he s got installed on his mobile phone he can find some information about what happens in this program. He can also check out who s the host of the program. He s not heard of the host before, but the content of the show seems promising, so he goes on to listen to it. A few minutes into the program there s a poll on the screen where the listeners can vote for which song they want to be played next. One of the options is Bloodless by Tom McRae, so he decides to vote for that song. As it s early in the voting stage he can see that his vote made an impact on the poll. Roger can see the song appear as the next song in the main window. 1 Java 2 Micro Edition, see also section 4.1.6. 4 Chapter 2 : Example scenarios After the song has been played he logs off. The following day he s settling in at his flat. But at the time his favourite radio program comes on, he decides to follow it using the interactive service as well. He participates in the public chat between the different listeners and the people in the studio. Then he realises that there is an option to chat privately with other users, so will try this feature. Roger then gets the options of asking a user to chat with him by either typing in the user s username, or select from a list of either people that are in his proximity or from some given criteria that Roger will chose. He will try to find someone that is fairly close to him, who might give him an idea of things to do the few days before his studies start, as he doesn t know anyone that studies in Trondheim. He gets in touch with a girl, Christina, who s studied here for three years already and gets a few ideas of what to do to kill some time. Later he goes to shop some groceries, but doesn t log out from the client. When he returns he sees that there are an unanswered call and two persons have been trying to initiate a private chat with him. He then realise two things, he can set an availability status. It s available by default when you log in, however you can change it to a few other settings as well, such as away , busy and be right back . If one of these alternative settings is set, he can avoid people contacting him when he s not available. The other thing he discovered is that he need to update his user profile, he doesn t want other people to call him. So Roger opens his user profile and un-ticks the checkbox saying that he accepts that people can call him. He will still allow people to contact him sending private messages, and he will also allow the service provider to pick up his location for whatever purpose they require it. So when he takes a shower before going in to town to do some of the things Christina suggested, he sets his availability status to away . When returning to his mobile phone, he can see that setting his status to away worked. No messages nor calls has been received. While Roger s in town he seems to be a bit lost, he checks if Christina is still logged in. She is and he tries to call her so that she can put him in the right direction. 2.2 In the studio a radio program host scenario In the NRK Petre studio are Marit and Therese preparing for their radio program. Marit is the host of the show, it s her voice you ll be mostly listening to throughout the show. Before the show starts, she will be update the program profile so that the listeners can log in to see what will be on the program today. There will also be room for a general description of the program, such as comedy, debate, hit music show and a possibly a description the type of music they focus on playing. And finally, she updates some info on her personal profile that will be displayed when someone will look up the program host information on their mobile phone. On the contrary to the listeners, the people in the studio will have a web interface which they can access through their computers give their input to the program. Therese, who won t be the main speaker on air, will be in charge of moderating the public chat. When a message is sent from a user, it will be added to the queue of incoming messages, which Therese will go through to decide which will be broadcasted to all the listeners and which has such a content that they won t be published. All messages, accepted to be published or not, will be logged and saved in a database 5 Radio module for increasing listener experience together with some corresponding information, such as time, date and location of the user who submitted the message. During the show, Marit can create new polls. The polls are generic. They can be used for the listeners to decide which song to be played next or which subject should be discussed next. So Marit posts a poll where the listeners will decide which song should be played next and she can follow the voting live on her display. At any event, such as a new poll being posted or they have a (celebrity) guest in the studio, Marit or Therese should be able to post an event to the database for purposes the management could use, discussed in the next section. On Marit s monitor in the studio can bring up the location of the users that are currently logged in for purposes she would find it useful to the show. Some time during the program the system that feeds the our application with information about the song current song, crashes and therefore the automatic feed won t update anything, Marit and Therese will have the option to type the name of the artist and song title in manually. 2.3 Promotion a management scenario When the service has been running for a while, there will be a big database which will store a whole lot of information that the management can use for their purpose. The management logs onto a website and then they will able to look at the location of the users, where is it surprisingly few users and where are there many? How does the fact that a new poll has been posted affect the numbers of messages submitted for the show? What does a celebrity guest appearance in the program do to the activity in the chat? 6 Chapter 3 : Location 3 Location This section will present related work which focus on location. 3.1 Buddylist Buddylist [Her02] is a mobile version of message services like ICQ, MSN Messenger and Yahoo! Messenger developed by Telenor R&D. The user will define a list or more of contacts, being friends, colleagues, family or a combination. Figure 3-1: Messenger service using location Because it is mobile, it allows just about an infinite number of locations of the users. This means that the users can use the client anywhere and anytime. What separates this messaging service from the other ones mentioned earlier is that it is enhanced by using location of the user and buddies . A user can have location of the buddies displayed on a map. An additional feature is that you can choose which contact to centre the map around. The service also offers notification when buddies move close to you. 7 Radio module for increasing listener experience 3.2 gulesider.no gulesider.no [gulesider] is the website the Norwegian Gule Sider. Gule Sider is the Norwegian equivalent of a service that you will find in many countries, the yellow pages. This site contains the addresses and phone numbers of all businesses who are registered to be in the. In addition to this it service, it also provides search function within Norway. You enter an address, typically where you are at the moment. From this starting point you have a few choices. It can generate an instruction to a specified location. But the thing important in connection with location is that after you ve specified an address, you can search the yellow pages. You can type in the kind of branch you want to look for. It will then find stores or similar in the proximity of the location you initially submitted. This is very similar to the first scenario described. But instead of finding a shop, it will find people that are in the proximity. 3.3 UK Ambulance Service The idea for this service came up after a survey in the beginning of 2002 showing that 73% of the adult population in the UK either owned a mobile phone or had access to one. Almost 30% of the calls to the emergency numbers in year 2000 came from mobile devices. This had lead to a new situation compared to before the mobile phone became common property. Before when people called the emergency numbers, they would always call from a fixed line. This would mean that they were usually at a place they knew where was located, i.e. at home, at work or a phone booth. The new problem that arose was when people called from their mobile phones and were some place where they weren t familiar or there was no landmark that the location could be identified by. Another issue was the fact that there could sometimes be lack of information and therefore miscommunication which led to time being wasted trying to clear up the information. Sometimes the lack of information was down the person who took the call. But more often it was due to the called being in such an emotional state it wasn t possible to give a description of where he or she was. Therefore taking the location from the device calling would save time as you can avoid having to clear up or even find out vital information. In this field time is needless to say a very important factor. One minute can make a huge difference. This system is still under implementation. [sesi] 3.4 St a n dpu n k t Standpunkt is a TV debate program on NRK which discusses current affairs. In the TV studio there are guests which have different views on the subject being debated. In addition to this it invites the viewers to share their views. The debate where it s the users contributing you can follow live on teletext. The program has two hosts, one that s controlling the discussion between those who have been invited to the studio to join the debate and one that is responsible for the input from the viewers. The latter person is also 8 Chapter 3 : Location the viewers voice in the debate, he or her can ask questions from the viewers or give their point of view. What s interesting with regard to location is that the location of the listeners is logged. Doing this enables NRK create statistics on how the views are different from various parts of the country. [standpunkt] Figure 3-2: Example of opinions based on location 3.5 Comparable systems There are currently no systems that are identical to the projected in this report. However there are bits and pieces from several systems that each does a part of what this system as a whole will do. Most of the location related things have been presented in sections 3.13.4. 3.5.1 Svisj Svisj is an interactive TV program on NRK that runs outside of the normal schedule, this means after the last program has been showed and before the next starts the following day. It therefore broadcasts at less convenient hours of the day. This program offers the viewers to send SMS to chat and vote on which music video that will be showed next. It also offers the viewers to have their pictures displayed on the TV screen if they submit a MMS. The chat messages and the effects of a vote will be available on the TV screen. [svisj] Considering the off-peak broadcast hours, it s rather popular. The record is over 4000 thousand SMSs in two hours. This can be compared to planned system of this 9 Radio module for increasing listener experience project, in that you will have the users having input on the program. You will also have a display showing the input to the users. [NRKI03] 10 Chapter 4 : Privacy 4 Privacy Using a mobile phone can interfere with what you would call your private sphere. In addition your whereabouts can also be tracked. This are issues related to the use of the client described in the scenarios in Chapter 2. Privacy can be defined as the interest that individuals have in sustaining a personal space , free from interference by other people and organisations . [Cla99] It is possible to divide in to several categories; privacy of the person, privacy of personal behaviour, privacy of personal communications and privacy of personal data. Privacy of personal data relates to that a person has some data about him- or herself. Some of which he wants to protect from being available to other people or organizations. The person wants to be the one in charge of who gets to know what about him or herself. Every person will have his or her own view on what s accepted to share and what s not. Information about sexual preference, personal economy, religion, medical records, criminal records etc. are examples of sensitive information. In the scenario described above the users who have agreed to give up their location will be used by the system. They have accepted to give up information about where they are. Some people would not be comfortable knowing that their movement could be logged, provided that they are logged in. [MFD03] In the 70s the introduction of the first computerized services this became an issue. Therefore there was developed some guidelines addressing this issue. The following guidelines was developed by the US, it covers four areas [ADW01]: Notice: Choice: Access: Security: The individual should have clear notice of the type of information being collected, its use, and an indication of third parties other than the original collector who will have access to the data. The ability to not have the data collected The ability for the data subjects to see what personal information is held about him, to correct errors and delete information if desired. Reasonable measure taken to secure the data from unauthorized access. A form for privacy which is not considered is one that probably has just arose through the increasing use of mobile phones, and it is when can people contact you? Even though your mobile phone is switched on it doesn t necessarily mean that you want to be called up. Same goes for instant messengers, if you re logged, you might not want to be contacted. However something that goes for instant messengers is that you have a status, which will tell your contacts if you available to be contacted or not. The scenario in Section 2.1 explains how this work in practice. An availability status set to away will limit the methods of communication. Also having preferences settings to avoid being contacted is a way to protect this personal space. A phone call is much more disturbing than a discrete message. This section has provided a few guidelines as how to protect the users privacy. 11 Radio module for increasing listener experience 5 Techonology This chapter will present different technologies that were studied at the start of this project. This study happened before any design or implementation of the system had started. The aim was to gather knowledge of the field of technology which will apply to this project. 5.1 Mobile technology Mobile technology will play a major part in this project as its set in a mobile environment. Among the goals of this project is to look at how a radio program can be supported by listeners interacting using mobile devices. This section will provide an overview of the relevant mobile technology. 5.1.1 Wireless communication standards The mobile technology has evolved through the last few decades. The wireless communication standards have been classified into several generations as the technology has evolved. When the demand for wireless communication and services increased, a need to create better standards emerged to adapt to the new demands. The result of this was new generations of wireless communication standards. 1G First Generation The first generation s wireless networks were analogue, meaning the information was sent as a continuously varying waveform. This meant that it could only be used for transmitting voice. The quality of the transmission could vary as a result of interference from other radio waves. There is a severe security issue in 1G, people with a simple radio tuner could listen to other people s conversation and it was even possible to charge other users account. In Norway, Telenor has closed down most of their 1G network, the NMT900-network, but the NMT450-network is still running. 2G Second Generation In the second generation the information is sent digitally, this means that speech is converted into digital code before being transmitted. This can be used to increase security as it can encrypt the signals, which also will be clearer as there won t be the radio wave interference which reduced the quality of the signal in 1G. Most 2G networks include some additional services, such as the possibility to send text messages to other mobile phones, voice mail and caller ID. GSM (Global System for Mobil Communication) is the most popular 2G network, but other exists. These networks can also transmit data, however at a very slow rate. Usually the speed will be lower than 10 kilo bits per second. 2½G Second and a half Generation This is a term used for enhanced 2G networks, they have been enhanced to handle higher data speeds. 12 Chapter 5 : Techonology 3G Third Generation Since the first commercial opening of a third generation network in Japan 2001, only a few other countries have opened commercial 3G networks. In Norway it s not yet commercially available, but it does exist for testing and research purposes. The 3G networks will provide various advanced services, among them 2 megabits per second data transfer and video conferencing. This generation network is so powerful that the mobile phones will become more of a small computer or a PDA. 3G will in addition to being a connection between a mobile device and its base station (WAN Wide Area Network), it will also cover connections in a LAN (Local Area Network). This means that your mobile device can detect and communicate with equipment in your immediate proximity such as a printer, PC or TV. The possibilities to this are endless. You can find out more about these networks on [telenormobil], [gsm-world] and [umtsforum] 5.1.2 Mobile networks GSM Global System for Mobile communications GSM is a 2G network and by far the most popular and widespread wireless communication system with a market share of over 70% in wireless communication. It s used in most countries in Europe, USA, Canada and several countries in Asia. It became popular early on because of its high quality voice, but also due to standardisation by European governments early on. It was also easy to upgrade to higher data transfer rates, although it was a deliberate decision by the designers, it wasn t appreciated at first by its adopters. It was opened for commercial use in Norway in January 1993. In Norway and Europe GSM is divided into two collaborating networks, GSM 900 and GSM 1800. GSM 900 was the original network, but in places with higher concentration of people such as airports and cities, there is a strengthened GSM network, the GSM 1800. This is done to ensure a satisfactory capacity and quality of the GSM network services. The switch from one network to the other is not noticeable it happens without the users knowing. A dual band phone is required to take advantage of both networks, most, if not all, new mobile phones sold today are dual band phones. GPRS General Packet Radio Service GPRS is an extension of the GSM network and belong to the 2½G. GSM is circuit switched, whereas GPRS is packet switched and therefore suits data transmission. With circuit switching a user will have an open connection the whole time he s online, even when no data is sent. So the connection is idle while he for instance reads a webpage and there s close to no data exchanged. This is a waste to both the customer and the operator. The customer is paying for an inactive connection, the operator could possibly user the bandwidth for something more useful. Packet switching will only use bandwidth when needed, which allows the bandwidth to be used by other people when you re not receiving any data. Therefore under GPRS a time slot can be shared by hundreds of people if they don t try to download something at the same time. Each user will have a continuous connection a very low data rate, but it will burst when clicking a hyperlink or receiving emails. GPRS aim at transferring voice as packets as well, using a variable-rate 13 Radio module for increasing listener experience codec, so data can be transferred during gaps in the conversation. But this is yet not implemented, so GPRS co-exists with GSM and mobile phones support both networks. An advantage of GPRS is that you only pay for the amount of data you transfer, not the time you re connected. UMTS Universal Mobile Telecommunication Service UMTS is the description of the next generation mobile network and is a 3G network. The system will support advanced multimedia terminals and. Its bandwidth can reach 1 megabit per second. As a result of this advance telecommunication services will be available. With this technology you will always be connected to the network. UMTS is still not commercially in use in Norway, but it s considered to be the successor of GSM. The network is currently available in Japan, UK, Sweden, Spain and some other countries. 5.1.3 SMS Short Message Service SMS is service to send short alphanumeric messages to other users with a mobile device. It s a very popular service today. The messages can only be up to 160 characters long, because of the way the SMS is transmitted. SMS was originally part of the GSM specification, but due to its popularity, it s spread to other digital mobile systems. SMS is a store-and-forward-service, meaning that messages may be stored at a Short Message Service Centre (SMSC) before they are passed on to the receiver. Someone sends an SMS from either a mobile phone or another device such as over the internet using a PC. The SMSC will receive the message and check if the receiver is ready to receive the message. If the receiver is ready, the message is passed on. There are now a many companies providing value-adding services by SMS. Among the popular services is news updates, sports results and jokes. Figure 5-1: Example of SMS received 14 Chapter 5 : Techonology 5.1.4 MMS Multimedia Messaging Service MMS is an expansion of SMS. In addition to the plain old text message, you can also include audio, images and video to your message. An MMS is multimedia presentation in one package. As it s an expansion of SMS it s easy to handle MMS messages, if you re familiar to SMS, even though MMS provides a broader range of content. The speed of transmitting an MMS will vary, depending on the size of the message. But the speed of transmitting an MMS is not really an issue, as, unless the receiver is waiting for the message, he won t know there s a message waiting for him. MMS offers more than only mobile-to-mobile messaging, in addition it also provides the opportunity to send messages as emails. It will also soon offer email-to-mobile messaging. The telecommunication companies are confident that MMS will be a great success and follow up SMS success. Therefore there s spent a lot of resources on developing and realising MMS. Figure 5-2: Example of received MMS 5.1.5 WAP Wireless Application Protocol The WAP protocol was specified and developed by a group called the WAP Forum. This group consisted of companies who are in the wireless communication industry. The companies involved ware Unwired Planet, Nokia, Motorola and Ericsson. This forum still exists and has now over 250 members. [w3-schools] The purpose of the WAP specification was to provide a standard method for small, limited resource devices such as mobile phones. It was necessary to introduce a new special protocol optimized for low-resource devices, this protocol was WAP. The WAP standard is based on Internet-standards (HTML, XML and TCP/IP). Between the WAP enabled device and the Internet there is a WAP gateway proxy which connects the wireless terminal to the Internet. It s this that forwards the requests to the web server and replies to the device requesting a page in the correct format. To use WAP you will obviously need a device that s WAP enabled, the most common are mobile phones and PDAs. Most phones sold today do support WAP, but still the WAP service has not become as successful as and the creators had expected. The most 15 Radio module for increasing listener experience common explanation is that there are no WAP Killer Apps , an application or a service you just have to get. Figure 5-3: Example of using WAP On the WAP device there is a Micro Browser that displays information written in Wireless Mark-up Language (WML). The Micro Browser is created particularly for devices with little resources, and requires very little from the hardware, CPU and memory. It can also run downsized JavaScripts, called WMLScripts. WML Wireless Mark-up Language WML is defined by WAP and WAP sites are developed using this language. It basically works like HTML does for websites, however WML is based on the eXtensible Mark-up Language (XML). WML files can be stored on any web server. 5.1.6 J2ME Java 2 Micro Edition J2ME is a part of the Java 2 platform. [sun-j2me] It is a family of specifications that defines various downsized versions of standard Java. These downsized versions are developed to be used on devices with less resources than for instance a desktop computer. They are therefore suitable devices such as mobile phones, PDAs, smartphones and settop boxes. A configuration in J2ME is a specification that defines the software environment for a range of devices that defined by a set of characteristics that the specification relies on, for example type and amount of memory available, processor type and speed, and type of network connection available to the device. J2ME currently supports two configurations: 16 Chapter 5 : Techonology CLDC Connected Limited Device Configuration CLDC addresses the low end of devices. A device running the CLDC platform would typically be a mobile phone or a PDA, which have about 512KB of memory available. CDC Connected Device Configuration CDC aims at the devices that lie between those addressed by CLDC and normal desktop computers who can run the standard Java. These devices have typically more memory (2MB and more) and better processors. CDC is deployed at smart phones and high-end PDAs. MIDP Mobile Information Device Profile The MIDP is a set of Java APIs that along with CLDC provides a complete J2ME runtime environment targeted at mobile devices. Currently, it s the only profile specified for the CLDC. A MIDlet is a third-party application developed for a mobile device under CLDC and MIDP. To run a MIDlet application you will need to create a package of all the files required to run the application into a JAR-file and create a Java Application Descriptor (JAD) file. [Hel02] 5.2 Mobile devices On the market today there are a lot of mobile device available. The different devices will support different technology. Some of the technologies are more common than others and are popular due to their maturity. All mobile phones sold today support SMS. MMS, J2ME and WAP are pretty much standard on newer mobile phones, the use of MMS and J2ME applications has flourished lately. Many companies now offer various services using these technologies. Newer mobile phones have digital cameras, using MMS to send them to friends and such is very popular. Java games for the mobile phone have become popular. Some mobile phones are extended, almost becoming small pocket computers, which has regular internet access and as software for word processing and similar. PDAs are small handheld computers that usually do not offer phone capabilities, but are used as a personal almanac, keeping order in the addresses, meeting appointments and such. These three types of devices seem to move towards a merging in to one device. The following section will present each main category of devices briefly. 5.2.1 Mobile phone Mobile phones are the most common portable device today. They allow you to call other people who also have a mobile phone or a fixed line phone. Mobile phones are highly portable as they usually fit in a pocket and you can call from anywhere, provided that the mobile phone can receive signal from the network. All phones today support SMS and most new phones have MMS and WAP support as well. Java enabled phones are getting more common as well. Phones that support Java allow you to download programs and run them on you mobile phone. 17 Radio module for increasing listener experience Figure 5-4: A mobile phone 5.2.2 Combined device Combined devices are devices that have more resources than the mobile phones. These devices combine mobile technology with regular computer technology. This means that you can browse the Internet, use word processors and spreadsheets and other regular PC programs. These combined devices have a small colour screen and a complete keyboard, as well as the standard mobile display and keys. Figure 5-5: A combined device, the Nokia Communicator 5.2.3 PDA Personal Digital Assistant PDAs are small handheld computers that can communicate with a computer or a mobile phone. This way you can download files to the PDA when you for instance have to leave the office and need the files. PDAs also offer personal almanac services like notes, calendar, meeting appointments and Internet browsers and word processors. 18 Chapter 5 : Techonology Figure 5-6: A Personal Digital Assistant 5.2.4 Laptop Laptops are basically desktop computers only made smaller to make them more mobile and possible to carry around with you. Laptops normally have less memory, storage capacity, processing power and screens than a desktop computer. Figure 5-7: A laptop 19 Radio module for increasing listener experience 5.3 Positioning specifications To express location it is important to have a uniform way of doing it. This to make sure you re on the same map, so to speak. There exist several methods and specifications to express location. In the next section the most common will be described. 5.3.1 Latitude and longitude The most convenient way to identify points on the surface of the Earth is using it with a system of reference lines called parallels of latitude and meridians of longitude. Latitude and longitude lines form a grid on the earth s surface. Latitude lines run from east to west, with longitude lines running from north to south. The latitude lines run parallel to the equator and measure the distance north and south of the equator. The values range from 0 degrees at the equator, to 90 degrees north at the North Pole or 90 degrees at South Pole. Longitude runs parallel to the Prime Meridian and measure the distance east or west of the Prime Meridian. Values range from 0 degrees at the Prime Meridian and 180 degrees west or 180 degrees east. Figure 5-8: Latitude and Longitude The degree (°) is the basic unit of latitude and longitude. But this unit is rather large and it won t give you a very precise location. Therefore it s divided into smaller units. It can either be represented using decimal degrees such as 22.75°E. On printed maps however they use minutes and seconds to express the location more precisely. Each degree is divided into 60 minutes (´) and each minute is divided into 60 seconds (´´). This way of subdividing degrees works well because of it s similarity to the units of time. [raider] 20 Chapter 5 : Techonology 5.4 Determining position An aspect of this project is finding the location of the mobile device that a user is logged on. This section will describe some of the techniques available. 5.4.1 GPS Global Positioning System GPS is a well-known positioning system that s existed for about 30 years. It is produced by the American Department of Defence and is owned by the United States of America. GPS uses satellites in a geosynchronous orbit around the earth to determine the location of a GPS enabled device. GPS is popular for hiking and sailing as GPS can determine your position down to 10 meters and works well in open landscape. Figure 5-9: GPS s use of satellites A drawback with the GPS system is that it will need a fix from at least three satellites to determine an accurate position. The GPS system is very not suitable for built-up areas and indoor environments. There is quite a bit of latency using GPS, it can take as much as 30 seconds to retrieve the location. To use GPS on a mobile device, it will have to have a GPS receiver chip. 5.4.2 GLONASS Global Navigation Satellite System GLONASS [spaceandtech] is a Russian satellite system and is based on a constellation of active satellites which continuously transmit coded signals in two frequency bands. These signals can be received by users anywhere in the world to determine their position. This system is the counterpart to USA s GPS and both systems share the same principles in data transmission and positioning methods. GLONASS is managed for the Russian Federation Government by the Russian Space Forces. 5.4.3 Galileo Galileo will be Europe s own global navigation satellite system. It will provide a highly accurate, guaranteed global positioning system under civilian control. This system will be inter-operable with GPS and GLONASS. A user will be able to find out his position with 21 Radio module for increasing listener experience his receiver from any combination of the three systems satellites. Galileo will deliver real-time position accuracy down to the meter range, which is unprecedented by any publicly available system. It will guarantee availability of service under all but the most extreme circumstances and will inform the users within seconds if a satellite should fail. This makes it suitable for safety crucial applications, such as airplane landing systems and driving computers for cars. Galileo is a global network of 30 satellites evolved by the European Space Agency (ESA). The first satellite will be sent into space end of 2004 and the whole system will be operational by 2007. This system is expected to get better accuracy, covering and performance than GPS. [spaceandtech], [esa]. 5.4.4 Mobile positioning Wireless networks have a cell-based structure. This means that a given geographical area is divided into a number of smaller cells. In each of these cells there is a stationary unit called the base station. This base station serves all the mobile devices with in the border of the cell it covers. There are two types of cells, omnidirectional cell and sector cell. The omindirectional covers an area of 360 degrees around its position and covers the biggest geographical area. Figure 5-10: Omnidirectional cell In sector cells, the base station is placed in the intersection of two or more cells. This makes the base station cover one sector cell within a limited arc. A high number of small cells provide a higher capacity than fewer, bigger cells. The cells vary in size and type. The cell radius may vary from 100 metres to 35 kilometres. Sector cells are in general smaller than omnidirectional cells. Figure 5-11: Three sector cells 22 Chapter 5 : Techonology There are several ways of locating a mobile device in the network: COO Cell of origin This technique is based on locating the cell in the network where the mobile device is at a given time. If it s in a sector cell, the sector of which the mobile device is in will return an identification of the sector as well. This solution requires no upgrades neither of the existing network nor the mobile devices. The accuracy can be very variable, from 100 meters up to several kilometres. It will be more precise where there is a concentration of people, as the base stations will be closer to one another and therefore covering smaller cells compared to areas with more sparsely populated. Figure 5-12: Cell of origin TA Timing advance Timing advance is not a solution on its own, but a supporting technique to COO. TA is a parameter that is based on the delay between the base station and the mobile device. Since the distance between the mobile device and the base station can vary, the delay of the signals is therefore dependant of the distance between them. Figure 5-13: Timing advance The accuracy of TA is 550 meters, this means that if the mobile terminal is less than 550 meters away from the base station it won t improve accuracy. However combining the two presented techniques, TA and COO, will improve the accuracy. The two methods presented so far are supported by Telenor s positioning system. It will be described briefly in section 5.4.5. AOA Angle of arrival AOA uses an array of special antennas to decide the signal direction of the incoming signal. Two base-stations equipped with the special antennas are required to determine the mobile user s position. The further away the user is from the base stations the more inaccurate the determination of location becomes. RSS Received signal strength RSS uses relative differences in signal strength to determine position. The accuracy of the measurement decreases as the distance between the mobile device and base station increases. This technique is hardly implemented as it s difficult to predict signal variations caused by various radio frequency effects. 23 Radio module for increasing listener experience TOA Time of arrival This method is based on measurement of the arrival time of a well-known signal sent from a mobile device and is received by at least three units of measurement placed in connection with the base station. The time measured is stored according to absolute GPS clocks. The time delay for the actual measurements is calculated and a position is set out from this. This technique demands supplementary devices and software changes in the network, but no upgrades are necessary on the mobile devices. The accuracy is 50-150 meters. TDOA Time difference of arrival TDOA uses range differences and does not require synchronisation from the mobile node to the received signal. The clocks at the sites, however, need to be synchronised. The method requires at least three base stations for location in two dimensions. MF Multipath fingerprinting MF requires only one base station to locate a mobile device. The equipment captures the radio fingerprint of a mobile device for comparison to at database of fingerprints. The position of the mobile device is provided once a match is made. If no match is found, an estimate of the location will be returned. Several of the positioning methods presented above can be used together and form hybrid solutions. The information above is collected from [hia] and [telenormobil] 5.4.5 Telenor Positioning Middleware System (PMS) Positioning Middleware System is a gateway to Telenor s positioning platform. The system is used to find the position of mobile terminals in Telenor s network. Telenor PMS uses several of the techniques described above in the Mobile positioning section, for mobile positioning. Cell of origin, sector cells and timing advance is implemented. It may vary to what extent each technique is being used, it depends on cell density and network configurations. PMS will return the position of the mobile terminal in latitude and longitude, outer and inner radius of the cell the mobile device is in and some less interesting information. Communication with the PMS is implemented using a SOAP protocol. The time it takes to get a response to a request for the location of a mobile device may vary, 1 to 5 seconds response time is however normal. Getting the location does not require any updates on the SIM card or the mobile phone. The PMS will return error codes if it can t retrieve the position, there are different error codes for events as the phone is switched off, or out of range or if the phone for some reason is blocked from being allowed to get the position of. 24 Chapter 5 : Techonology 5.5 Java Technology The Java technology consists of two elements, a programming language and an environment where programs written in Java are executed. The Java language has a syntax that is very similar to the syntax of C++. The biggest difference between Java and C++ is that C++ has to compile the source code to a machine specific code. The resulting binary code will only work on the type of machine it s compiled on. Java source code is also compiled to a binary code as well. The binary code produced will be the same for any for a Java compiler on any platform. However to run this, you will need the Java Virtual Machine (JVM) which interprets the binary code. The JVM is machine specific, but because of this mechanism it makes the Java programs portable, you can bring the binary code to any platform and it will run without modifying the code and recompiling the program. The Java 2 platform is divided into three editions, this to tailor functionality to the different types of use and avoiding problems trying to develop for all types of terminals. The three editions are Java 2 Enterprise Edition (J2EE), Java 2 Standard Edition (J2SE) and finally Java 2 Micro Edition (J2ME). J2EE is developed for demanding server solutions, J2SE for ordinary desktop computers and finally J2ME is specialized for small electronic devices, such as mobile phones. [sun] 5.6 Web Service and SOAP The idea behind Web Services is to offer services of a web application available to a variety of clients, not only a browser. Instead of supplying information via a dynamically generated user interface such as HTML which is fairly fixed and can only be consumed by a browser, the server makes available a set of function calls over HTTP and uses XML as message transfer format which any user client can consume. This gives more freedom for the clients to use the services how they want to, as XML is a universal format for structuring documents and data, it is platform and language independent. As long as you are connected to the Internet, you can call functions available from any location. While a web service is a powerful concept for calling available functions as for how to do the calls, a protocol or an XML messaging specification is needed and agreed upon. Simple Object Access Protocol (SOAP) is such a protocol. It combines XML and HTTP. Where SOAP is the XML messaging specification, web services enables developers to target a range of clients and build services from both local and remote resources. SOAP codifies existing practice of using XML and HTTP together as a protocol. [axis] 25 Radio module for increasing listener experience 6 Choice of technology The pre-study was used to get background information on relevant technology that relates to this project. Some of the choices are limited by the technology itself. The choice of technology was in the end decided by reputation, functionality, existing knowledge of the technology and more. 6.1 User interfaces The interface for the users connecting to the system will be a J2ME-client developed for mobile phones. This gives a lot of opportunities compared to older kinds of technology when it comes to interaction between listener and the radio program hosts. Javaapplications are very popular currently on the newer phones, with Java games probably being the most popular application. This project will only be creating a prototype of a client. As for the interface of the people on the production side of the radio show there will be a web interface, this due to the fact that they have a job to do and will have to do it efficiently. So web interface on their monitor and a keyboard to type their messages is far more efficient than using a mobile phone. This will however not be implemented in this project. The interface for the management will also have a web interface to access the database. This will not be implemented in this project either. 6.2 Modelling language Creating models of the software system before starting the implementation is essential. Good models are very important to display and communicate your thoughts in a given way so that there won t be misunderstandings due to different interpretations. As the size of a system increase, it becomes even more important to have a well modelled system. Having a modelling language standard, can contribute to the success of a project. The modelling language selected was UML due to its extended use. The writer s knowledge of UML is very good compared to other modelling languages. UML is also well-known at Telenor R&D. 6.3 Programming language There would of course be a need for a programming language to implement the system. The language partly chosen and partly imposed was Java. The author of this report was rather familiar with the language, it s object-oriented and it has a good reputation. However developing for mobile phones didn t give much of a choice, as the most common mobile phones on the market today only support Java third party applications. Therefore the mobile client would be programmed in Java. 26 Chapter 6 : Choice of technology In sum, using only one programming language is easier. Not only is it easier, but the knowledge of it is also fairly good. 6.4 Web server for database and web services It will be necessary to set up a web server for the clients to connect to. The one chose was Apache web server as it s a well-known, free and has a good reputation. The author had also some previous knowledge of it. It will also run Tomcat which is a servlet container for running Java Servlets and Java Servlet Pages (JSP). This was chosen due to the fact that it is developed by the Apache group, who makes the Apache web server. It was also familiar to the author. Apache eXtensible Interaction System (Axis) will be needed to run web services and for handling SOAP requests. The system will also need a database to store data, such as user profiles, chat logs, poll history and event logs. mySQL is a popular database system with a good reputation. All these last few choices of technology were chosen in cooperation with and by the recommendation of Telenor R&D. 27 Radio module for increasing listener experience 7 Overall explanation of the system One can look at the system from two angles. The listener s angle and the production side of it. The users will access the system through a Java client on their mobile phones. The radio show host will get access through a web interface. This project will only produce a very limited prototype. Figure 7-1: Physical overview of the system The figure above shows the general physical overview of the system. There will be a web server running a web service to which all the users will connect. The listeners through using the client they ve downloaded to their mobile phones. The mobile phones will connect to the Internet using either GPRS or UMTS. SOAP calls to the server will connect the client to the application running. The people in the studio will connect to the application through a web interface on a regular computer connected to the internet. The application running on the server will automatically receive data which updates the song currently being played, next song to be played, artist information and album covers. This is done through an XML interface. The application will also have access to the Telenor Positioning Middleware System through an XML/SOAP interface which will enable the program to retrieve the location of the users. On the server there will also be a database which will log events on the radio show, the public chat and poll history. 28 Chapter 8 : System requirements 8 System requirements This chapter will describe the functional requirements of such a system described above. A part of this project has been to determine functional requirements for a full working application and as how these can use presence information and location of the users. The results are presented in the following sections. There would normally be a section of nonfunctional, but it has been neglected so far. There hasn t been enough time to experiment with some of the features that will appear to give reasonable estimates to define numbers on the non-functional requirements. This will have to be done prior to start development on a fully functional system. 8.1 Functional requirements The functional requirements relate to the functionality that the system will contain. A functional requirement is often implemented as a subsystem or a group of components, and is traceable in the system architecture. There are general and specific functional requirements. The general requirements are something that affects the system as a whole. The specific requirements are on the other hand directly related to a certain part of the system as to how it will perform a task. 8.1.1 General functional requirements F1 Offer a system for interaction between a radio listener and the radio host The system shall provide a way for a listener to interact with the host(s) of a radio show and have the possibility to influence show he s listening to. F2 The system shall take advantage of the location The location of the users shall be looked up when it required. F3 Users must be registered to download and use the system Only registered users shall have access to down load the client for their mobile phone. Registering for the service will happen through a website and it will create a personal user profile. F4 Users must be logged in to use the system The users shall have to provide a user identification to use the system. F5 Users shall have a user profile which includes some preferences settings The user s profile should contain some information about the user. Some information may be required to put in, some not. The profile shall also contain some preferences settings which will affect the use of the system. of the users 29 Radio module for increasing listener experience F6 Users shall be able to update their personal user profile As users might want to change their user profile as they want to change some setting or want to edit information about themselves, it shall be possible to edit their user profile. 8.1.2 Specific functional requirements There are three actors in this system. There are the listener, the radio show host and the management. The following section will describe each of the actors requirements in this system. Listener s requirements Listener is a user who s downloaded and installed the client to his or her mobile phone and is now logged in during a radio broadcast. F7 The listener shall have an availability status, which they can change The listener shall have a status saying if they are available (meaning that they can be contacted) or unavailable. The status shall be able to be changed by the user as their availability changes. F8 The listener shall be able to cast a vote in the currently open poll If there s a poll open to be voted on, the listener shall, provided that he hasn t voted before in the same poll, have the possibility to submit his vote on the subject currently in the poll. F9 The listener shall be able to look up further information about the artist who performs the song currently being played On request by the listener information about the artist whose song is currently being played shall appear on the listeners screen. F10 The listener shall be able to look up and have an image of the album cover from which the song currently being played is picked from On request by the listener his or her mobile phone client should have an image of the album cover where the song currently being played appears. F11 The listener shall be able to look up information about the radio show host If the listener requests to get more information about the host of the program he or she is currently listening to it shall appear on the listeners screen. F12 The listener shall be able to look up information about the radio program On listener request, the information about the show shall be looked up and displayed on the listener s screen. 30 Chapter 8 : System requirements F13 The listener shall be able to submit and receive messages between the listeners and the hosts from the show s public chat Listeners shall be able to contribute to the public chat of the show by submitting their own messages. Receiving messages submitted to the chat by other users should happen automatically so the listener won t have to do anything specifically to receive messages from the public chat. F14 The listener shall have the possibility to create a private chat with other listeners, who have agreed to that they can be contacted by other listeners. A listener can try to initiate a private chat by requesting a list of other listeners that are open for listeners to contact them. Such a list can be compiled from various criteria, such as location or common interests. F15 The listener shall be able to make a call or set up a teleconference by selecting from a set of listeners A listener can call one or more persons logged in listening to the show. Only persons who have agreed that other listeners can call them will appear in a list of possible targets for a call. Radio show host s requirements The radio host is a person on the broadcasting side of a radio show. This host is the one managing the program and doing most of the talking. F16 The host shall be able to create a new poll The host can create a new topic to which the users can vote on. The options that will be possible to vote on will also be specified by the host. F17 The host shall be able log an event An event could be for instance the hosts of the show ask the listeners opinions about an issue, asking a question for a competition or want the listeners to make questions for a guest they have visiting in the studio. Therefore such an even should be logged for purposes of the management. F18 The host shall be able to submit and receive messages between the listeners and the hosts from the show s public chat Hosts shall be able to contribute to the public chat of the show by submitting their own messages. Receiving messages submitted to the chat by other users should happen automatically so the user won t have to do anything specifically to receive messages from the public chat. F19 The host shall be able to moderate the incoming messages to the public chat To any chat available there will be a number of messages that are not suitable to send to all the listeners. This could be foul language or racism for instance. Submitting very personal information should not appear in the listener s client. Therefore the host will remove the messages that are not acceptable and accept the messages that are fine. 31 Radio module for increasing listener experience F20 The host shall be able to update the current song and artist information manually, if needed In case the automatic song title and artist name feed should fail, the host can type in the data. F21 The host shall be able to update the next song and artist information manually, if needed In case the automatic song title and artist name feed should fail, the host can type in the data of the next song to be played. F22 The host shall be able to update the radio show information The host will have the opportunity to update information about the show and what will be on today s show. F23 The host shall be able to have the location of the users displayed This host can have the location of the users that have agreed to allow polling for their location displayed. It could possibly be displayed on a map Management s requirements The management is the management of the owner of the system. The management can include people that are responsible for marketing. F24 32 The management shall be able to run through the back logs of the system The management will through a web interface have the possibility to run through the backlogs of chats, polls and events. Using particular searching criteria the management will have statistics and such from the logs available Chapter 8 : System requirements 8.2 Use cases The functional requirements presented in the previous section have been mapped into use cases in the system. They are displayed graphically in the figure below. Figure 8-1: Use case diagram 33 Radio module for increasing listener experience 9 Software architecture and design This chapter presents a first draft of the architecture and design of the application. 9.1 Class diagram The ServiceController class is the main application class. This is running on the web server and handles listener requests, the database and connection to PMS. Figure 9-1: Class diagram 34 Chapter 9 : Software architecture and design 9.1.1 Class description This section briefly describes the different classes are. ServiceController This class contains the main method and is considered to be the controlling class of the system. It will create and handle responses to messages that the system receives. Other classes and objects will be used to perform the tasks. Client This class represents the client that will be run on a mobile phone. This will create the graphical interface towards the user and handle requests from the users in the appropriate way. WebInterface This class represents the web interface through which the hosts will communicate with the system when they are in the studio. Poll This is a class to represent the polls. It will consist of methods for updating the poll count, and retrieve the poll count. DatabaseManager This class handles requests towards the database. It will execute and handle queries to the database. PositionLocator This class will handle requests about the location of the mobile users. User This class represent a general user of the application. It contains common methods and variables of the actors in this system; listener, host and management. The user-class is a super class of these three actors. Listener This is a class to represent the methods and variables that are specific to the listeners. Host This class represents a host, and the methods and variables that are specific to the hosts. ManagementUser This class represents a user with management privileges, and the methods and variables that are specific to the people in the management. 35 Radio module for increasing listener experience 9.2 Sequence diagrams Sequence diagrams are used to graphically show how the different objects collaborate during an operation. The sequence diagrams represent each use case more specifically. The following diagrams show the flow of control. They are a bit simplified in the drawings, attribute and return types are not displayed in the drawings. 36 Chapter 9 : Software architecture and design 9.2.1 User registration This diagram visualises the interaction between the objects when a user registers for this service. Figure 9-2: Registration sequence diagram The diagram shows a user registering for the service, after the user s supplied the required information and preferences it will be stored in the database. 37 Radio module for increasing listener experience 9.2.2 Logging in on the system This diagram visualises the interaction between the objects when a user logs into on the system using his mobile phone. Figure 9-3: Log in sequence diagram This will create a connection between the client on the mobile and the system. User will identify him- or herself typically by typing a password. The system will verify the identification with the data stored in the database, if it s ok. A user object will be created and the location of the user will be determined, if the user as agreed to let the system find his or her location 38 Chapter 9 : Software architecture and design 9.2.3 Updating user profile This diagram visualises the interaction between the objects when a user updates his profile using the client on his mobile device. Figure 9-4: Updating user profile sequence diagram The user will ask to update his profile, the client will then ask for the system to retrieve the user profile from the database. Then the user will edit the profile and save it to the database if there are any changes. 39 Radio module for increasing listener experience 9.2.4 Setting availability This diagram visualises the interaction between the objects when a user changes his availability. Figure 9-5: Setting availability sequence diagram The user will request his status to be changed, which will make the system update the user s availability. 40 Chapter 9 : Software architecture and design 9.2.5 Submitting a vote This diagram visualises the interaction between the objects when a user submits a vote to the currently open poll. Figure 9-6: Submitting a vote sequence diagram The user will cast his vote and the vote count on the option he chose will accordingly be updated. If the user has agreed to allow his location to be used, it will be determined and then it will along with the vote be logged. 41 Radio module for increasing listener experience 9.2.6 Looking up information about the radio host This diagram visualises the interaction between the objects when a user requests the host s public information, which the host has entered. Figure 9-7: Looking up radio host information sequence diagram The system will return the information available. 42 Chapter 9 : Software architecture and design 9.2.7 Looking up information about the radio program This diagram visualises the interaction between the objects when a user requests information about the radio program currently on. Figure 9-8: Looking up radio show information The system will return the information available. 43 Radio module for increasing listener experience 9.2.8 Submitting message to public chat This diagram visualises the interaction between the objects when a user submits a message to the public chat. Figure 9-9: Submitting message to public chat sequence diagram The user will send his or her message to the system and then it will be moderated. If it s accepted, it will be published so that anyone can read it. Whether the message is accepted or not, it will be logged in the database with the location as well. 44 Chapter 9 : Software architecture and design 9.2.9 Initiating a private chat This diagram visualises the interaction between the objects when a user wants to create a private chat. Figure 9-10: Initiating private chat sequence diagram The system will retrieve a list of users logged in and matches some search criteria, such as hobbies or location. From those logged in, the listeners who don t want to be contacted will be removed. Then there will be created a private chat. 45 Radio module for increasing listener experience 9.2.10 Initiating a call or a teleconference This diagram visualises the interaction between the objects when a user wants to create a teleconference or make a call to one of the listeners who are logged in. Figure 9-11: Initiating teleconference sequence diagram The system will retrieve a list of users logged in and matches some search criteria, such as hobbies or location. From those logged in, the listeners who don t want to be contacted 46 Chapter 9 : Software architecture and design will be removed. Then the call or teleconference will be set up. The turn of action is very similar to the private chat. 9.2.11 Creating a poll This diagram visualises the interaction between the objects when a host creates a new poll. Figure 9-12: Creating a new poll sequence diagram The system will close the currently open poll and store it and its results in the database. Then a new poll will be created with the new subject to be voted over and the alternatives. 47 Radio module for increasing listener experience 9.2.12 Logging an event This diagram visualises the interaction between the objects when a host logs an event. Figure 9-13: Event logging sequence diagram The system will add an event to the logs in the database. 9.2.13 Submitting a message to the public chat - host This is very similar to the diagram for the listeners described in section 4.2.8., apart from that it will be through a web interface rather than a mobile client. 48 Chapter 9 : Software architecture and design 9.2.14 Moderating a chat This diagram visualises the interaction between the objects when a host moderates the incoming messages to the public chat. Figure 9-14: Moderating a chat sequence diagram When a message is received, it will be placed in a queue waiting to be accepted or rejected before being sent to all the users. If a message is rejected it will follow the same sequence as an accepted message, only it won t be published, but deleted instead. It will still be logged in the database. 49 Radio module for increasing listener experience 9.2.15 Updating song title and artist This diagram visualises the interaction between the objects when a host will have to manually type in the title of the song and name of the artist. Figure 9-15: Updating song title and artist sequence diagram The input will be stored in the system. This is identical for updating the title and name of the artist of the next song, only that a different variable will be set. 50 Chapter 9 : Software architecture and design 9.2.16 Updating the show information This diagram visualises the interaction between the objects when a host updates the information about the radio program. Figure 9-16: Updating show information sequence diagram The input will be stored in the system. 51 Radio module for increasing listener experience 9.2.17 Displaying the locations of the logged in users This diagram visualises the interaction between the objects when a host request to have the locations of the logged in listeners displayed. Figure 9-17: Displaying locations of logged in users sequence diagram The system will poll for every logged in users location and then display them on the screen. Having them displayed on a map would be a possibility. 52 Chapter 9 : Software architecture and design 9.2.18 Generating statistics from backlogs This diagram visualises the interaction between the objects when a member of the management request some statistics to be generated from a give set of criteria. Figure 9-18: Generating statistics sequence diagram The person will through the web interface select the criteria that he or she wants to be matched. The system will then go through the backlogs and return the results to the user. Results will be presented to the user requesting the data. 53 Radio module for increasing listener experience 10 Results 10.1 Demonstration of prototype The implementation of a small prototype was the goal of this project. Towards the end of the project two weeks were set to do this. 10.1.1 Starting mobile client There can be more than one application in the downloaded package, therefore one will have to choose which to start. Figure 10-1: Starting the client 54 Chapter 10: Results 10.1.2 Main screen When the clients loaded it will open the main screen. In a full working version it will connect to the server and gather some information before the main screen will be displayed. Each screen will have a set of actions that can be performed. Some of these actions may send requests to the server. Figure 10-2: The main screen Figure 10-3: The menu options available in the main screen In this prototype the actions on the menu will bring you to another screen which will display some other information. 55 Radio module for increasing listener experience 10.1.3 Poll screen The poll screen will display the poll currently open to votes. On the menu of the poll screen you will be able to choose the option you want to vote for. When the vote s been submitted the screen will update with the current distribution of votes. Figure 10-4: The poll screen Figure 10-5: The poll menu where you can choose which option to vote for This prototype does not contact or post votes to a server. 56 Figure 10-6: The updated poll screen Chapter 10: Results 10.1.4 Artist information screen The screen where the users can look up information about the artist whose song is currently being played. Figure 10-7: The screen displaying information about the artist currently being played This is how it would look for a user requesting about an artist, but again this doesn t access a server to gather the information. 57 Radio module for increasing listener experience 10.1.5 Radio host and radio program screens These screens will display the public information about the radio program host and about the radio program itself. Again, these screens will not access a server to retrieve this information. Figure 10-8: The radio show host information screen 10.1.6 Figure 10-9: The radio show information screen Evaluation on the prototype One goal of this project was to create a prototype of the system. The prototype should provide a graphical display of how some of the requirements would be implemented. It does fulfil that in some ways. However it was a goal to establish a connection between the client and a web server to look at how information was exchanged. Some technical issues made the time spent and wasted, as it didn t work, increase a whole lot. The web server seemed to be working fine. The problem was however Tomcat and Axis for 58 Chapter 10: Results running the server-side service. The Tomcat engine only sometimes starts up. Therefore there were some problems installing web service in Axis, as the test pages to see if the installation of test versions of the web service had been installed correctly only sometimes worked. As the development happened towards the end of the project, and there was still plenty to do on the report, installing this successfully seemed cost more, time-wise, than it would contribute to make a good prototype. As you can see from the screenshots, the user interface is rather boring. In addition, to access some of the most common actions, such as voting in the poll, you will have a new screen displayed with all the possible actions. This is by using the Java Wireless Toolkit simulator provided by Sun. However, running on a rather new mobile phone with a colour display and a different implementation of displaying commands it will look different and better. I ve seen the BuddyList, which also is an application developed for mobile phones, running both in the simulator and on a Sony Ericsson P800. Using the P800 mobile phone gives a much better user interface and the commands are represented as buttons on the normal screen. 10.2 Knowledge of technology As the name of the subject of which this project is a part of suggest, it s called Software Engineering, Specialization . This is meant to give an even deeper knowledge of software engineering with respect a certain aspect of it. This project considers some issues related to cooperation technology. In this project context it would therefore be obvious that privacy and use of location domains to be explored. This project has given an introduction to location based systems and services. And also systems taking advantage of the user s location. It has also influenced the functionality of the first design of a system aimed a client, as the use of location has given inspiration to the functionality of this system. During this project it s been shed some light on privacy issues which arise when doing design for the system. It s provided me with knowledge on what s legal and what s not. And even it things are legal, it may not be morally correct so some guidance as to how to do this properly has been needed. This has been valuable input which will be kept in the back of my mind for the full implementation. 59 Radio module for increasing listener experience 11 Conclusion There is a lot to do on this project still. This is just a first version of design and the very first version of a prototype. It is very difficult to foresee everything that will have to be considered when doing a first design of a type of system that one s not very familiar with. So I m sure there will be changes before a fully working system will be implemented. It will also be necessary to do some testing on how the system will work before doing more. These tests will also give some information as to how the performance of the system is and can be expected of it. This will be essential for doing the non-functional requirements. As for what the implementation goes there is a lot to do, both on the client and on the server side. An important thing is setting up the web server correctly so that web services can run without any problems and be accessed. Obviously, as the current version is only a prototype, on the client more of the functional requirements will have to be implemented. It s essential to implement the procedures for contacting the server to retrieve information stored on it. On the server side, the controller which will handle the requests will have to be developed. There s basically no implementation done so far. The various functionalities for the system are yet to be implemented. Then the interfaces to the database and the PMS will have to be created. 60 Chapter 12: Bibliography 12 Bibliography [AWD01] Mark S. Ackerman, Trevor Darrell and Daniel J. Weitzner, Privacy in Context, Human-Computer Interaction, 2001 [axis] http://ws.apache.org/axis/, Accessed October 2003 [Cla99] http://www.anu.edu.au/people/Roger.Clarke/DV/Intro.html, Accessed October 2003 [esa] http://www.esa.int/export/esaSA/GGGMX650NDC_navigation_0.html, Accessed October 2003 [gsm-world] http://www.gsmworld.com, Accessed October 2003 [gulesider] http://www.gulesider.no, Accessed November 2003 [Hel02] Sumi Helal, Pervasive Java, Pervasive Computing 2002 [Her02] Arild Herstad, Telenor R&D, Buddylist 2002 [hia] http://siving.hia.no/ikt02/ikt6400/g03/PROSJEKTRAPPORT.htm, Accessed October 2003 [MFD03] Ginger Myles, Adrian Friday and Nigel Davies, Preserving Privacy in Environments with Location-Based Applications, Pervasive Computer 2003 [NRKI03] NRK Internal News Paper, 2003 [raider] http://raider.muc.edu/~mcnaugma/Topographic%20Maps/latitude_and _longitude.html, Accessed October 2003 [pats] http://www.pats.no, Accessed October 2003 [sesi] http://www.sesi.co.uk/kb/papers/0102_ambulance.html, Accessed October 2003 [spaceandtech] http://www.spaceandtech.com/spacedata/constellations/glonass_consum.shtml Accessed October 2003 [standpunkt] http://www.nrk.no/programmer/tv/standpunkt/, Accessed November 2003 [sun] http://java.sun.com, Accessed October 2003 61 Radio module for increasing listener experience [sun-j2me] http://java.sun.com/j2me, Accessed October 2003 [svisj] http://www.nrk.no/programmer/tv/svisj/, Accessed November 2003 [telenormobil] http://www.telenormobil.no, Accessed October 2003 [umts-forum] http://www.umts-forum.org/servlet/dycon/ztumts/umts/Live/en/umts/Home Accessed October 2003 [w3-schools] http://www.w3schools.com/wap/default.asp, Accessed October 2003 62 Chapter 13: Glossary 13 Glossary A B C CDC CLDC D E F G GLONASS GPRS GPS GSM H HTML HTTP I ICT J J2ME JAD JVM K L LAN M MMS N NRK O P PATS PDA PMS Q R S SMS SMSC SOAP T Telenor R&D Connected Device Configuration Connected Limited Device Configuration Global Navigation Satellite System General Packet Radio Service Global Positioning System Global System for Mobile communications Hyper Text Markup Language Hyper Text Transfer Protocol Information and Communication Technology Java 2 Micro Edition Java Application Description Java Virtual Machine Local Area Network Multimedia Messaging Service the Norwegian Broadcasting Company Program for Advanced Telecom Services Personal Digital Assistant Telenor Positioning Middleware System Short Message Service Short Message Service Centre Simple Object Access Protocol Telenor Reserch and Development 63 Radio module for increasing listener experience U UML UMTS V W WAN WAP WML X XML Y Z 64 Unified Modelling Language Universal Mobile Telecommunication Service Wide Area Network Wireless Application Protocol Wireless Markup Language eXtensible Markup Language Appendix A: Java source code Appendix A: Java source code This appendix is the Java code for the client prototype. Radio.java is the class which creates the client on the mobile phone. Radio.java import import import import import import javax.microedition.midlet.MIDlet; javax.microedition.lcdui.Display; javax.microedition.lcdui.Command; javax.microedition.lcdui.CommandListener; javax.microedition.lcdui.Displayable; javax.microedition.lcdui.Form; import java.util.*; import java.io.*; /** *Radio mobile client MIDlet. **/ public class Radio extends MIDlet implements CommandListener { private CommandListener listener; private Display display; private private private private private private Form Form Form Form Form Form mainscreenForm; pollForm; editPreferencesForm; artistInfoForm; albumCoverForm; hostInfoForm; // // // // // // // // standard radio screen poll screen edit preferences screen artist information screen album cover screen programhost information screen program information screen // // // // // voteBCommand; // // artistInfoCommand; // // albumCoverCommand; // // hostInfoCommand; // // programInfoCommand; // // exits program goes to the mainscreen goes to the poll screen votes for option A in the poll votes for option B in the poll goes to the artist information screen goes to the album cover screen goes to the host information screen goes to the program information screen private Form programInfoForm; private private private private Command Command Command Command private Command private Command private Command private Command private Command exitCommand; mainscreenCommand; pollCommand; voteACommand; 65 Radio module for increasing listener experience public Radio() { // Initialize the display. display = Display.getDisplay(this); listener = this; } // initiate all the commands being used in this program private void createCommands(){ exitCommand = new Command( Exit , Command.EXIT, 1); mainscreenCommand = new Command( Hovedskjerm , Command.SCREEN, 1); pollCommand = new Command( Avstemning , Command.SCREEN, 1); voteACommand = new Command( Stem A , Command.SCREEN, 1); voteBCommand = new Command( Stem B , Command.SCREEN, 1); artistInfoCommand = new Command( Artistinfo , Command.SCREEN, 1); albumCoverCommand = new Command( Albumcover , Command.SCREEN, 1); hostInfoCommand = new Command( Programlederinfo , Command.SCREEN, 1); programInfoCommand = new Command( Programinfo , Command.SCREEN, 1); } // create the default radio screen ( private void createMainscreenForm(){ mainscreenForm = new Form( Nettradio ); mainscreenForm.append( Velkommen til Nettradio\n\n ); mainscreenForm.append( Spilles nå:\nTom McRae \ Bloodless\ \n ); mainscreenForm.append( Neste sang:\nU2 - \ One\ ); mainscreenForm.addCommand(exitCommand); mainscreenForm.addCommand(pollCommand); mainscreenForm.addCommand(artistInfoCommand); mainscreenForm.addCommand(albumCoverCommand); mainscreenForm.addCommand(hostInfoCommand); mainscreenForm.addCommand(programInfoCommand); mainscreenForm.setCommandListener(this); } // create the poll screen private void createPollForm(){ pollForm = new Form( Nettradio - Poll ); pollForm.append( Spørsmål:\n ); pollForm.append( Slår Norge Spania i EMkvalifiseringen?\n ); pollForm.append( JA! : 60%\n ); pollForm.append( NEI!: 40% ); pollForm.addCommand(exitCommand); pollForm.addCommand(voteACommand); pollForm.addCommand(voteBCommand); pollForm.addCommand(mainscreenCommand); pollForm.addCommand(artistInfoCommand); pollForm.addCommand(albumCoverCommand); pollForm.addCommand(hostInfoCommand); pollForm.addCommand(programInfoCommand); 66 Appendix A: Java source code pollForm.setCommandListener(this); } // create artist information screen private void createArtistInfoForm(){ artistInfoForm = new Form( Nettradio - Artist ); artistInfoForm.append( Tom McRae\nFødt: 1974 i Suffolk, England\n ); artistInfoForm.append( Utgivelser: \ Tom McRae\ (2001) & \ Just Like Blood\ (2003) ); artistInfoForm.addCommand(exitCommand); artistInfoForm.addCommand(mainscreenCommand); artistInfoForm.addCommand(pollCommand); artistInfoForm.addCommand(albumCoverCommand); artistInfoForm.addCommand(hostInfoCommand); artistInfoForm.addCommand(programInfoCommand); artistInfoForm.setCommandListener(this); } // create album cover screen private void createAlbumCoverForm(){ albumCoverForm = new Form( Nettradio - Album cover ); albumCoverForm.append( Her skal bilde av albumcovere bli vist! ); albumCoverForm.addCommand(exitCommand); albumCoverForm.addCommand(mainscreenCommand); albumCoverForm.addCommand(pollCommand); albumCoverForm.addCommand(artistInfoCommand); albumCoverForm.addCommand(hostInfoCommand); albumCoverForm.addCommand(programInfoCommand); albumCoverForm.setCommandListener(this); } // create programhost information screen private void createHostInfoForm(){ hostInfoForm = new Form( Nettradio - Programlederinfo ); hostInfoForm.append( Din programleder er: Jørgen Bakke.\n ); hostInfoForm.append( Om meg: blablabla ); hostInfoForm.addCommand(exitCommand); hostInfoForm.addCommand(mainscreenCommand); hostInfoForm.addCommand(pollCommand); hostInfoForm.addCommand(artistInfoCommand); hostInfoForm.addCommand(albumCoverCommand); hostInfoForm.addCommand(programInfoCommand); hostInfoForm.setCommandListener(this); } // create program information screen private void createProgramInfoForm(){ programInfoForm = new Form( Nettradio - Programinfo ); programInfoForm.append( Du hører på Det Fantastiske Radioeventyret.\n ); programInfoForm.append( Her tar vi opp de siste nyhetene og kommentere dem. ); programInfoForm.addCommand(exitCommand); programInfoForm.addCommand(mainscreenCommand); 67 Radio module for increasing listener experience programInfoForm.addCommand(pollCommand); programInfoForm.addCommand(artistInfoCommand); programInfoForm.addCommand(albumCoverCommand); programInfoForm.addCommand(hostInfoCommand); programInfoForm.setCommandListener(this); } // -------------------// startApp starts application // -------------------protected void startApp() { Form splash = new Form( Nettradio ); splash.append( Nettradio\n\nStarter... ); display.setCurrent(splash); //create Commands createCommands(); //create Forms createMainscreenForm(); createPollForm(); createArtistInfoForm(); createAlbumCoverForm(); createHostInfoForm(); createProgramInfoForm(); //viser hovedskjermen display.setCurrent(mainscreenForm); } // -------------------// pauseApp pauses application // -------------------protected void pauseApp() { } // -------------------// destroyApp exits application // -------------------protected void destroyApp(boolean u) { notifyDestroyed(); } // destroyApp // -------------------// commandAction responds to when a command is selected // -------------------public void commandAction(Command c, Displayable d) { if(c == exitCommand) { destroyApp(false); } else if(c == mainscreenCommand){ handleMainscreenCommand(); 68 Appendix A: Java source code } else if(c == pollCommand){ handlePollCommand(); } else if(c == voteACommand){ handleVoteACommand(); } else if(c == voteBCommand){ handleVoteBCommand(); } else if(c == artistInfoCommand){ handleArtistInfoCommand(); } else if(c == albumCoverCommand){ handleAlbumCoverCommand(); } else if(c == hostInfoCommand){ handleHostInfoCommand(); } else if(c == programInfoCommand){ handleProgramInfoCommand(); } } // commandAction private void handleMainscreenCommand(){ display.setCurrent(mainscreenForm); } private void handlePollCommand(){ display.setCurrent(pollForm); } private void handleVoteACommand(){ // sends vote to server } private void handleVoteBCommand(){ // sends vote to server } private void handleArtistInfoCommand(){ display.setCurrent(artistInfoForm); } private void handleAlbumCoverCommand(){ display.setCurrent(albumCoverForm); } 69 Radio module for increasing listener experience private void handleHostInfoCommand(){ display.setCurrent(hostInfoForm); } private void handleProgramInfoCommand(){ display.setCurrent(programInfoForm); } } // Radio-class 70