Home
FinalPaper_Kate - Repository TU Delft
Contents
1. Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12 Figure 13 Figure 14 Figure 15 Figure 16 Figure 17 Figure 18 Figure 19 Figure 20 Figure 21 Figure 22 Figure 23 Figure 24 Figure 25 Figure 26 Figure 27 Congestion leads to loss of time and money and imposes In the Sensor City project IT is usedto influence travelers Three ways to influence a journey Tripcast travel time prediction HTC device running on Android Samsung Galaxy Tab is the largest smart phone available Acceptance Testing is the final stage of the test phase The importance of methods of interaction The most important demand on a route OnTime appointment screen Market share in Smartphone sales February April 2011 Expected market share in Smartphone sales in 2015 Emulator in Android SDK showing the settings of Kate Robolectric is a unit test framework designed for Android Total commits on Kate withn SVN Total lines of code of Kate generated by SVNstat Overview of Kate Part of the Class Diagram Back Office Class Diagram XML interface declaration XML tab definition Example of Tab interface and the Tab interface of Kate Part of Preferences XML Part of the Check Android OS method Part of the Internal Calendar Reader Kate notifications Kate debug Window Appendix C list of tables Table 1 Defined phases of this project Table 2 Golden rules of Interface Design Table 3 Mo
2. to benefit both that user and the collective as a whole Kate 43 Kate 44 A ni Conclusion The central question in this project was How can an Android device be used to influence the departure time of a journey the user has to make Kate makes it possible to influence the departure time with the alerts trying to make the user leave at the right time Field test will eventually show if and how real people will let their journey times be affected by a mobile app The requirements in the problem definition have been realized 1 TNO wants a running prototype that advises the user of the best departure time for the next journey The prototype must function on the Android platform Kate is a running Android prototype The advices Kate gives have been tested they take delay times into account suggesting a departure time which will ensure just in time arrival The application has been delivered to TNO as apk package and as source code 2 Byexamining the calendar of the user the app must know what journeys the user will have to make However the app should also be prepared to be able to work with another source for journeys like a travel prediction algorithm The app communicates with the Android Calendar This Calendar can be synchronized to a Google Calendar very easily It resolves any trips found in the agenda stating a arrival place and arrival time Departure place is resolved as the place of the last meeting or the curr
3. 2011 by the Ministry of Infrastructure and Environment An important issue to keep in mind with predicted travel times is reliability It is common knowledge that travelers prefer the shorter travel duration However when it comes to reliability they prefer the longer but more reliable travel time over the shorter but less reliable one 12 The way to ensure higher reliability depends on the way reliability is defined If we would define reliability as the probability that a particular part of road can be achieved within a certain travel time then better reliability could be ensured by reducing the speed limits or by limiting the amount of traffic on the roads These solutions would however probably not be accepted by society A possible solution might lie with the demand side in this If we would introduce road pricing travelers would be forced to reconsider their departure times This is an interesting view because of the possibilities thatlie within applications as Kate For example by offering an alternative departure time which would result in a shorter travel time 2 4 Similar Applications When Problem Analysis and Design was complete the project group found an app for the iPhone that had just been released This American app OnTime offers comparable functionalities as Kate and will be released on the Android platform in the future 13 The project group decided to pause the coding phase and research OnTime After analyzing it we con
4. a couple of milestones we had set When planning this phase we divided the system up to three main categories which are the graphical user interface the back office and calendar handling Having four persons in this team this seemed optimal This way we could assign end responsibility for each of these categories to a team member and have one team member left to bear the responsibility of gluing all components together and for the integration 5 2 Process Before we started the programming phase we first worked on the design of the system We started off by creating use cases class diagrams and sequence diagrams which we extracted from our MoSCoW model This way we all had a clear idea of the way we wanted to structure the implementation We used these designs to start the implementation by implementing a skeleton that adhered to the design specifications So in the first few days we had already implemented all of the classes of the UML diagrams however without most of the functionality Having comprehensively defined the MoSCoW made it easier for us to set daily and weekly milestones to work towards After setting up the skeleton for the code we started adding functionality on the basis of the MoSCoW When we started adding functionality we realized that even though we had planned everything carefully and thoughtfully we would have a hard time sticking to the original planning Four weeks of programming seemed to be insufficient
5. a working andfully integrated prototype Soon it became clear that we could not stick to it While we had good ideals and planning delays in getting the right resources and the lack of working space resulted in the loss of several production days It took several weekends to get back on track When a team member was not available for some days because of personal problems and another team member became ill at the end of the project Kate started to get on our nerves That resulted in some disagreements between members but we managed to resolve most of the different points of view Another important issue may have been resource availability We were not assigned a stable work place and had to work with variable working places around the campus While software is available on these computers for Android programming it is preferable to have system admin rights For instance in order to install or debug our app on a physical device appropriate drivers must be installed The alternative to this is to use emulators they are however limited in the functionality they offer compared to the actual device Calendars for example are not available in the emulator which meant that we could not properly test our main functionality using the campus computers We were able to do testing by having one team member bring his own computers and delegate any required test work to this member At first a weekly meeting with our professor seemed too much However we soon l
6. designers and programmers wouldn t make mistakes then testing really would not be necessary But since they are human they will make mistakes 43 6 1 Test Planning The project group executed the coding and testing in a combined phase This agile approach ensured that when code was written it was tested to compile Only code that could be compiled would be committed After the system tests which took most of the time in this phase severalother tests were administered before the acceptance test finally led to accepting the application by TNO Table 4 shows the planned test activities It is a part of the test plan The test strategy is explained in this plan The starting point of this strategy was to test as soon as possible to be able to detect errors fast Testing was divided into five test parts Table 4 Planning of Test Activities o uie A Performance test 13 06 t m 17 06 8h Android Devices load test volume test 13 06 t m 17 06 Test on speed capacity Android platform 13 06 t m 17 06 4h Test execution on at least tw o Android platforms with m e diterenprcesrspnd er EE test Rb i 06 t m 17 06 internal Android OS SQLite ORMlite and GData and external TNO BackOffice me nd In most software development projects testing will take up 1096 of the available time In this project 7 of the available time was allocated for testing This deviation comes from the fact that the project group are students th
7. gmail com Kate 3 Acknowledgements Group This thesis is the final Bachelor result for the project group Itis the summary of a three year study although some of us did not complete it within three years This project was completed in cooperation with TNO department Mobility Gratitude to Bjorn Heijligers project leader at TNO Above all we would like to thank Leon Rothkrantz TU Delft and Paul van den Haak TNO for their help and guidance in this project Without them Kate would never exist Loubna These last couple of months have been exceptionally difficult for me First with my sick younger brother and then in the last phase of this project getting ill myself Would it not have been for the understanding and support of these amazing group members I would probably have given up halfway Jozua Randy and Marco much gratitude for pulling me through this We were a rather unconventional group but we made it work Ayyoub little brother thank you for being so strong I hope you come home soon so you can meet Kate Marco Finally after all these years I can close this chapter in my life Thank you Loubna Jozua en Randy for your optimism and understanding I really needed it in some dark periods I guess our cooperation was meant to be Big thanks to my mother and my mother in law for the never ending support Thank you Marvin Gavin and Caithlin you re such wonderful kids Without you this would never have happened Monique than
8. is visualized in figure 3 Kate 8 3 Driving Behavior Intelligent Sensors Infra structure influence on travelling N l T 1 Mobility Demand a 2 Routing Travel assistance Fastest Shortest TomTom Traffic Jam rerouting Vehicle Figure 3 Three ways to influence a journey First the Mobility Demand The personal device can inform the user with information from the infrastructure and can support the journey decision making process For instance when heavy congestion is noticed by the infrastructure the advice could be to work at home for a couple of hours use the public transport system or leave early to be able to arrive on time This way the demand to be mobile can be changed Second on trip routing Navigation systems within the vehicle can help the traveler take the best fastest or shortest route to the destination The traveler can even be rerouted to avoid a traffic jam Third the driving behavior Intelligent sensors within the infrastructure can interact with the vehicles driving by For instance sensors can regulate the speed of a vehicle or make the vehicle break in case of a detected accident further up the road Also traffic lights can be influenced when the sensors measure road load is too high Kate 9 1 1 Problem Definition This project is part of the Sensor City Assen program within the theme Mobility of TNO and is set up under responsibility of the work group Price
9. manage to finish the project before the deadline but it has cost Kate some functionality We did not implement all the should haves and could haves when we were actually planning to do so I think this group was rather strong in resolving issues that arose when members would have disagreements and problems that occurred with or between group members We always solved any issues that occurred to the satisfaction of all group members The lesser part of this project was the organizational aspect We did not have any workspaces so we were sometimes forced to work separately This wasn t so bad for the first couple of weeks because a lot of work could be done separately However we all agreed that we should at least work in the same space when we were in the implementation phase So during the last weeks we worked wherever we could find enough place for us all to sit and sometimes we had to move halfway through the day because the room was reserved This was very disturbing Marco At first working with three students half my age seemed accident prone Four people with different backgrounds cultures ages and future plans this was failure waiting to happen However it wasn t like that at all I have learned so much from the other team members I enjoyed every part of the project We were particularly good in problem analysis learning new technologies and delivering just in time I did not like the fact that a place to work as a group was not to
10. sensors act like the artificial sense organs of a model which adapts real time to all information 5 Oy Sensome ity Figure 2 In the Sensor City project IT is used to influence travelers Within Sensor City there are two subprojects Sound and Mobility The subproject Sound tries to measure and understand urban sound patterns Sensors register sounds and identify it With this sound map applications are developed to reduce noise pollution For example microphones were installed in a nightlife area that trigger aggression camera s at a certain level of noise that indicates a fight 6 The basic idea of the subproject Mobility is to make journey information available from and for the travellers in the country It focuses on three goals 1 generating reliable floating car data with measurements from the sensor grid mobile devices and in car systems 2 travel time predictions based on that data and traffic models 3 creating technology for future information services and nationwide travel paying systems TNO has targeted the end of the year 2014 to achieve the goals for this subproject Within the first goal mobile devices are of great important because the smart phones of today are widespread amongst travelers and are packed with sensors and computing power With this personal device that the traveler has combined with systems within the vehicle and in the infrastructure influencing a journey can be achieved at three levels This
11. service from the Travel Time Predictor TTP at TNO The app can be divided into seven main parts 1 The Main Activity 2 The Appointment Manager 3 The Trip Manager 4 The Alert Manager 5 The Logging Manager 6 The Report Manager 7 he Database Manager The relations between these parts are visualized in figure 17 The Main Activity is the starting point of the app It starts up all the processes and monitors the outcome It builds up the GUI and sends it to the OS for further handling It activates the Appointment Manager Kate 27 The Appointment manager listens to the calendar of the user When a new appointment is detected the Appointment manager will try to resolve the arrival information for that appointment If not successful the user will be asked details about the appointment If successful the appointment data will be sent to the Trip Manager SSS G Figure 17 Overview of Kate The Trip manager is the central point of intelligence of the app It controls the entire process except the reporting When the Trip manager receives appointment data it will communicate with the TTP in the TNO BackOffice to determine travel time and will then calculate best departure time This is sent to the logging manager forlogging purposes The appointment data is then communicated with the Alert Manager to create alerts The interface with the TTP from Tripcast is a XML file request service Communication is done b
12. then Kate would no longer be able to read the Android Calendar In the past the calendar content providers have been changed Figure 24 shows the method to tackle this issue by detecting which version of Android it is running to determine what content providers to use for reading the internal calendar Itis possible that other changes have been made in the content provider but we only resolved one of the changes since the internal calendar is only being used to read events if Build VERSION RELEASE contains 2 2 Android 2 2 or higher contentProvider com android calendar Android 2 1 or lower contentProvider calendar Figure 24 Part of CheckAndroidOS method In the calendar component the AppointmentManagerService class is tasked with the duty to manage all interactions with the Android Calendar It asks the InternalCalendarReader to extract the events from the Android Calendar and convert them into appointments which are then placed in a schedule These appointments are also stored in Kate s internal database The schedule consists of appointments that will take place today and tomorrow The AppointmentManagerService is run as a thread to ensure that it can act independently from other activities or services and periodically requests that the schedule and database be updated to real time changes in the internal calendar With the observable pattern used in our implementation any changes made in the schedule will immedi
13. 79591959 5757 MOM ow OM MON M OM M M MOM MOM MOR MOM MOM M M M ON ON OM Ww oS M M amp M OM S OM M 8 8d 8 8 8 8 8 9 8 8 8 8 8 8 8 9 8 8 9 8 9 8 8 8 8 Fs 8 9 9 8 8 9 9 8 N N N N N RR R OR RRA NRR QUON OR B Commits i y a A Figure 15 Total commits on Kate within SVN SVNstat generates summaries of SVN usage 31 Automatically generated graphs and charts show commit activities and other useful information This will also help to improve planning capabilities ofthe project group members Figure 16 shows the total lines of code of Kate The dip in the endis the reaction to the comments from SIG SIG suggested some alterations on the code resulting in the deletion of some obsolete code This is explained in more detail in the chapter Implementation Lines of Code 10 000 9 500 9 000 8 500 8 000 7 500 7 000 6 500 6 000 5 500 5 000 4 500 4 000 3 500 3 000 Lines 2 500 2 000 1 500 1 000 500 0 May Jun 5 Jun 7 Jun 9 Jun 11 Jun 13 Jun Jun 17 Jun Jun 1 21 Jun 23 Jun 6 gt 5 9 28 Apr O Apr 2 Ma 4 Ma 6 May 8 Ma 10 Ma 12 Ma 14 Ma 1 18 Ma 20 Ma 22 Ma 24 May 26 Ma 28 Ma O Ma 1 Jun 3 1 3 Date Figure 16 Total lines of code of Kate generated by SVNstat With Eclipse and SVN as tools for this project it is possible to use Subversive an Eclipse plug in that integrates SVN into Eclipse With Subversive SVN can be used within the Eclipse environmen
14. Kate KATE The Keen Android Travel Extension Rien ne sert de courir il faut partir point Delft University of Technology Faculty EEMCS Bachelor Project group IN3405 Loubna Aammari 1550756 Marco Hazebroek 9313504 Jozua Sijsling 1308319 Randy Tjin Asjoe 1304593 5 2 TU Delft 5 Jean Fontaine in Fables 1668 running won t do the trick just leave at theright time June 23 2011 Thesis Committee Chairman Prof Dr Drs L J M Rothkrantz B Sc Coordinator Drs P R van Nieuwenhuizen Company Supervisor Ir P van den Haak TNO zz for life Kate Preface To complete the Bachelor education students at TU Delft have to execute a complete software development project in the final quarter of year three This is a project for 15 ects 420 hours in which students have to perform an external internship in a project group consisting of four persons This project group has chosen a project at TNO a major innovation organization in the Netherlands in the spring and the summer of 2011 The group was bound by a common interest in the Android platform and the belief that this platform will see an substantial growth in the near future both in market share and in functionalities At the same time TNO was looking for students to help them gain more knowledge of Android app making as a means of supporting their vast traffic management knowledge This is the final report IN 3405 for the Bachelor of
15. RIM BlackBerry OS 23 Apple iOS 26 Figure 11 Market share in Smartphone sales February April 2011 www Nielsen com Worldwide Smartphone Operating System 2011 and 2015 Market Share and 2011 2015 CAGR listed alphabetically 2011 Market 2015 Market 2011 2015 Operating System Share Share CAGR Android 39 5 45 4 23 8 A BlackBerry 14 9 _ 13 7 17 1 OS 15 7 15 3 18 8 Symbian 20 9 0 2 65 0 _ _ gt gt Windows Phone 7 Windows Mobile 5 5 20 9 67 1 Others 3 5 4 6 28 0 Total 100 0 100 0 19 6 L Ll Figure 12 Expected market share in Smartphone sales in 2015 www Nielsen com Kate 19 The main features of Android are 14 15 16 e Application Framework enabling reuse and replacement of components e Dalvik Virtual Machine optimized for mobile devices e Integrated browser based on the open source WebKit engine e Optimized graphics powered by a custom 2D graphics library 3D graphics based on the OpenGL ES 1 0 specification hardware acceleration optional e SQLite for data storage e Media support for common audio video and still image formats MP3 AMR Mpeg4 JPG PNG GIF e Default use of camera GPS compass accelerometer Bluetooth GSM and WIFI on Android device hardware dependent Supported by the Open Source world Android has quickly become the mobile platform primary choic
16. Reader TripcastReader sends an HttpRequest for the travel time to the Tripcast predictor and reads the result Kate 31 CommunicationManager MAX_CONNECTIONS Integer CommunicationManager Communication Manager getinstancel unspecified run interface IRequestHandler handle in data unspecified getReply unspecified TravelTimeRequestHandler Hprocess in data TravelTimePredictioncontroller TravelTimePredictionReader getTravellnformation unspecified read unspecified LN HsetUp close androidid Stri getSession unspecified ve installationid String TRIPCAST HOST ADDRESS String TRIPCAST PORT Integer hostAddress String portNumber Integer read in departure in arrival in time Date unspecified getUrl in departure in arrival in time Date String getTravellnformation in inputStream unspecified parseXml in inputStream unspecified readValues in document unspecified uses D get in url String unspecified post in url String in post String unspecified readFromiin url String in post String unspecified Figure 19 Back office class diagram Kate 32 While designing the user interface Android gives the developer many possibilities to present data on the screen Vocal control was ruled out because the alerts had to be discrete For instance wh
17. Science education in Computer Science for the section Man Machine Interaction department Mediamatics faculty Electrical Engineering Mathematics and Computer Science EEMCS The complete project documentation has been included in Dutch as appendices of this report In Chapter 1 table 1 these documents are explained This Thesis consists of nine chapters Chapter 1 describes the context of the problem and requirements to possible solutions In chapter 2 related work and results of the research is covered Chapter 3 is a summary of the used tools and methods in this project In chapter 4 the transformation from problem to solution is visualized with the architecture of the app Chapter 5 describes the implementation phase Testing is crucial in every software engineering project this subject is explained in chapter 6 The conclusion is given in chapter 7 including a list of future work References anda list of definitions can be found in chapter 8 and 9 respectively We have realized this project with great enthusiasm and we hope that you will enjoy reading about it in this report No specific knowledge about the Android platform is needed to comprehend this report The font used for this report is Droid Serif the obvious choice for reports about Android Delft June 2011 Loubna Aammari Loubna Aammari gmail com Marco Hazebroek Marco Hazebroek gmail com Jozua Sijsling Jozua SijslingO gmail com Randy Tjin Asjoe RTjinasjoe Q
18. ab interface and the Tab interface of Kate After trying out the possibilities that Android gives for the user interface the Tab layout was chosen for Kate This is the most user friendly layout that Android offers Many famous apps use the same layout like Phonebook Whatsapp or Movie finder The main advantages are e Very simple navigation through the functionalities e Information can be found by clicking only one button all menus are only one level deep e Actions are represented by symbols instead of letters It is based on recognition not remembering the functionalities e Itis scalable adding or deleting a tabis very easy making it easy to add a tab for debugging or a new functionality made by TNO for example We tested the tab interface of Kate with the project members as selected users After that two people that were not project members got the app and tried to work with it The conclusion was that the learning curve was very small mainly because of the easy layout of functionalities Within minutes all the involved were able to work with the app and get alerts for journeys they planned Kate 34 Implementation 5 1 Structuring The implementation phase of a project has often proved to be the most intense and time consuming phase With this wisdom in mind we attempted to reduce the stress factor in this stage by making a strict planning We started out by planning two sprints of both two weeks in which we would work towards
19. an application that calculates the travel time between two places If we would ignore all the factors that affect the traffic passage this would not have been a very difficult task However not considering factors like traffic jams accidents and the current traffic flow would have us ending up with an idyllic travel duration This duration would probably be shorter than the actual travel duration and we would not want that What we wanted was a dynamic travel time predictor TTP A lot of research has been done in designing dynamic TTP s There are numerous methods one could use to achieve this goal Radu 11 describes three approaches for this The first approachis to use mean historical data in combination with current traffic and upstream traffic Another one was to use time series analysis Time series analysis is a popular way to predict travel times because of its great potential for online implementation The third approach she describes is by way of artificial intelligence Neural Networks have been proven to be quite suitable for this job Kate 17 All these approaches or a combination of them could have been used to design a dynamic TTP but given our time span this would be quite a challenge Fortunately we did not have to build our own predictor TNO provided us with a route planner that could do just what we needed This route planner Tripcast was developed by Model It and has been awarded the title of best travel time predictor
20. and Information stimulation The central question in this program is how can travel behavior be influenced so that the individual and collective interest will be served The problem we must face in this project is How can an Android device be used to influence the departure time of a journey the user has to make 1 TNO wants a running prototype that advises the user of the best departure time for the next journey The prototype must function on the Android platform 2 Byexamining the calendar of the user the app must know what journeys the user will have to make However the app should also be prepared to be able to work with another source for journeys like a travel prediction algorithm 3 The app must communicate with the Travel Time Predictor TTP from Model IT Tripcast to determine the most probable time to complete the journey However the app should also be prepared to be able to work with a TTP from another supplier 4 Knowing the time to complete the journey the app must calculate the best time to leave for that journey and advise the user about that with alerts 5 The app must log all travel data in a database This data must be synchronized at least daily with a TNO server TNO will use this data to improve the quality of Service of TTP s 6 The development must be documented properly because of future expansion plans or integration of the functionalities within other projects A TTP can make a reliable pr
21. as well Another benefit is that users would not be required to give their username and password to Kate to gain access to Google Calendar making the support for it rather redundant The issue of forward compatibility will still linger until Google decides to make the Calendar API public For the time being we have attempted to fix the issue by letting Kate check which version the Android device is running to determine which content providers to use This solution allows Kate to use the Android Calendar for Android version 3 0 or lower Kate 25 3 5 Data Storage An important goal of Kate is to log certain information of the user to a central database which in Kate s case was based on a TNO server For reasons of efficiency and battery life we chose to build two databases One would be internal and the other on the server Instead of having to send a request to the server every time this logging information becomes available we just save up data on the internal database for a little while and send it all at once Another great advantage of this strategy is that we don t lose any data if the server goes offline or the internet connection disappears In these cases Kate would just collect all the logging information and store them locally until the server becomes reachable again For external data storage we did not yet know which database engine TNO would work with so we chose to use MySql However we wanted to make it rather easy for TNO to switc
22. atabase Manager handles all communication with the internal database An internal database is used for collecting necessary journey data The usage of in internal database besides the log database at the TNO BackOffice will reduce employment of capacity from the battery and cpu A possible user story is that of the business man with lots of appointments today Our businessman awakens and grabs his phone Both he and his secretary has made appointments for today five in total He presses the Kate icon on his phone After displaying the TNO logo for three seconds Kate will resolve the appointments from the calendar It calculates the expected travel times for each appointment making sure that the journeys are executable The businessman arrives at the office in Delft checking his email and talking to his colleagues Then his Android phone starts to vibrate He know this is the first alert from Kate to let himknow he has to leave in 15 minutes for his meeting in Rotterdam The first alert is earlier than he expected so he knows that the journey will take more time than usual He continues the conversation with a colleague about a problem in a project Then there is a vibration from the phone in his pocket again The second alert from Kate indicates that he should make himself ready to leave He finishes the conversation and starts packing for the meeting Later on during that meeting the vibration starts again Kate alerts him about the next appoint
23. ately be notified to all observers such as the user interface and the TripManagerService Figure 25 shows how the InternalCalendarReader reads the calendar events from an Android device Some of the limitations to using this code are that there is no clear way to retrieve a unique event ID making it difficult to uniquely identify appointments Recurring events all have the same event ID which makes changing certain event properties such as location easier but detecting whether an event has changed almost impossible Kate 37 List lt Appointment gt appointmentList new ArrayList lt Appointment gt Read events from selected calendars Uri Builder builder String projection new String event id title eventLocation begin end String sortingOrder startDay ASC startMinute ASC for String id calendarIDs Specify the time span builder Uri parse content contentProvider instances when buildUpon ContentUris appendId builder beginRange getTime ContentUris appendId builder endRange getTime Query the calendar for events String selection Calendars id id Cursor eventCursor contentResolver query builder build projection selection null sortingOrder For a full list of available columns see http tinyurl com yfbg76w while eventCursor moveToNext appointmentList add createAppointmentFromEventCursor eventCursor id r
24. avadoc necessary in this project to prove to TNO that the code is maintainable 26 Itis also easier to configure and can generate more kind of graphs and PDF s 27 3 2 Test Environment A good programmer will always test the fresh source code Getting rid of bugs at the beginning of the development process is the most time efficient method Testing should therefore be executed as close to the development as possible Testing atomic snippets of code is called Unit Testing Unit Testing in Java is almost always done with JUnit The Android SDK has a built in JUnit functionality However running tests in the Android emulator is very slow Building deploying and launching for one unit test will often take more than a minute This is not suitable is you re performing dozens of test daily Kate 22 299 ROBOLECTRIC Figure 14 Robolectric is a unit test framework designed for Android A much faster way to perform unit testing in an Android environment is to use Robolectric Robolectric is a unit test framework that runs directly in the desktop Java Virtual Machine and handles most tests within seconds 28 It is uniquely designed for the Android platform and handles almost identical as JUnit so the learning curve is minimal A part of functional testing and integration testing is code coverage Code coverage is a measurement of the part of the code that is executed while the test was run This way it will be clear which snippets of code
25. be found so we had to do a lot of work individually at home Perhaps if there was a work place we could have reached more goals That would also have resulted in better adjustment of the individual tasks Now too much time was lost waiting for results of other team members With a limited knowledge of Java I focused on testing the code of others My project management and documentation skills came in handy Jozua As stated in the acknowledgements at first I wasn t quite excited by this project at all However because of my experience with Android Java and application development as development lead I was right where I needed to be Some unfortunate circumstances heavily delayed our implementation phase and for that reason I d like to reflect on the implementation phase Preparation for the phase was good proper planning and communicating lead us head strong into a stage of development on a platform none of us feel absolutely comfortable with Android has solid constraints on its applications that require some unique coding patterns Because of this one of the plans we made which was to divide tasks such that in theory everyone could work solo for the majority of the entire development cycle in the end may have been a mistake Integration of components require a good understanding of Android s IPC inter process Kate 57 communication framework When one component is delayed our integration was automatically delayed and that may have b
26. bile Interface Design guidelines by Gong and Tarasewich Table 4 Planning of Test Activities Kate o oo 12 12 14 16 17 18 19 19 22 23 24 24 28 30 32 31 32 32 34 37 38 40 42 13 15 16 41 60
27. bservers 1 detectParse rrors CalendarParseErrorResolver tl ialize TAG String l HonCreate in savedinstanceState showPopUp appointments List lt Appointment gt appointmentsAdded List lt Appointment gt l intmentsRemoved ListcAppointment addObserver in observer AppointmentObserver on F removeObserver in observer AppointmentObserver id tsChanged List lt Appointment gt l getAppointmentsForTodayl List lt Appolntment gt erun r getAppointmentsForToday List lt Appointment gt lgetAppointmentsForTomorrowl List lt Appointment gt keepSynchronized getAppointmentsForTomorrow List lt Appointment gt I toStringlin dao sort in ap unspecified rupdate in appointmentsList ListcAppointment removeMissingAppointments in appointmentsList List lt Appointment gt List lt Appointment gt getAppointment in appointment Appointment Appointment H T l A ee UMCETS interface l IScheduleReader getAppointmentsForToday List lt Appointment gt getAppointmentsForTomorrow ListcAppointment I gt gt compare in obj1 in obj2 Integer I java lang Exception CalendarReadException wb nl tudelft mmi kate controller CalendarReader InternalCalendarReader nl tudelft mmi kate controller CalendarReader GoogleCalendarReader username String TAG String passwor
28. bsite Android visited at June 13 2011 http developer android com sdk eclipse adt html 25 website Wikipedia visited at June 13 2011 http en wikipedia org wiki Doxygen 26 website Doxygen visited at June 13 2011 http www stack nl dimitri doxy gen manual html 27 website Stack Overflow visited at June 13 2011 http stackoverflow com questions 22544 7 doxygen vs javadoc 28 website Robolectric visited at June 13 2011 http pivotal github com robolectric 29 website EclEmma visited at June 13 2011 http www eclemma org index html 30 website Subversion visited at April 25 2011 http subversion apache org 31 website SVNStat visited at April 25 2011 http svnstat sourceforge net 32 website Subversive visited at April 25 2011 http www eclipse org subversive 33 website Trac visited at April 25 2011 http trac edgewall org 34 website Google Data Protocol visited at April 25 2011 http code google com apis gdata docs de velopers guide html 35 website Google Calendar Data API visited at April 25 2011 http code google com apis calendar data 2 0 developers_guide htm1 36 website Jim Blacker Accessing the internal calendar database inside Google Android applications visited at April 25 2011 http imblackler net blog p 1 51 Kate 50 37 website SQLite visited at June 13 2011 http www sqlite org about html 38 website Android visited at June 13 2011 http devel
29. ch for travel information Kate will already present it Kate uses an external Travel Time Predictor TTP with access to historical and actual traffic data to determine the most probable travelling time The TTP is accessed via a BackOffice Server at TNO The same server is used to log all travel data from which TNO can gather vital information about travel behavior and delays So the user gets predictions for free and in return sends back travel data to improve those predictions That can help to improve predictions from TTP s so the collective will benefit from the actions of the individual Kate will calculate the ideal departure time and will warn the user several times when leaving is almost imminent The app can generate weekly and monthly reports about the journeys made by the user Kate is a working prototype that shows that an app can assist a traveller in the travel decision process Kate is built up from modules the source of travel data now the calendar and travel time prediction now Tripcast from Model IT can easily be switched to another source which will require only the change of one module Adding a new language to the app is just as easy Kate 5 Contents Pra A ee ee ee 3 Acknowledgement aia 4 ADM a enn tenet Renee 5 Contents c i Capt A ae eet Sed net ee ee 6 A I 7 Lal Problem DEMO sneen ttr hee e ORE el E Pee PORE ERU ere Weena 10 1 2 Used Methodology irit cote en ane e
30. chelor projects at TU Delft Kate 13 Requirements Design When four people are to program on the same application simultaneously agreeing on the requirements will help to create a solution thatis shared by all people involved project group TNO and TU Delft When the outline of the application is designed it is critical to have the same view of the chosen best possible solution The design drawings are based on UML the default modeling language To describe the quality characteristics of the application in the requirements the standard 1809126 is used 7 In the Requirements Document this is included Implementation Testing The most time demanding phases will be partially integrated in this project as an agile way of software engineering Rules of software engineering will be held strictly e After each code update the programmer will test the code When no compile errors appear the code will be released by a commit e Class names are clear and uniform e All issues will be tracked in a track wiki e Eachclass will have explaining comments in the code this will be checked with a doc generator e There will be no deviations from the chosen design patterns e The Test plan describes the way testing will be executed a significant amount of time will be reserved for the testing phase The results will be summarized in a document called Test Results Documenting This will not be a stand alone project within TNO The docum
31. cluded that it targeted a slightly different user OnTime has more functionalities like a navigator system Itis half like Kate and half like TomTom We concluded that OnTime posed no threat to our bachelor project Some functionalities are presented identical like the push message alert system while the app runs in the background OnTime differs from KATE in that it features functionalities that are not currently present in KATE such as multi modality for driving and walking changing the locations for an arbitrary appointment by looking up addresses and managing separate calendars can all be done in the application itself However it should be noted that OnTime does not have a reporting system and the TTP system cannot be adjusted Kate on the other hand can generate weekly and monthly reports and can work with any TTP AT amp T 10 59 AM 4 100 E st AT amp T 3G 6 03 PM 4 100 E uL AT amp T 11 00 AM 4 100 E Cancer Address Lookup Events Schedule Events jen Upcoi Events Two Moeung a gt eT OFF 4362 Baldwin Rd Auburn Hills MI US Lookup December 15 2010 5 30 PM a more games R Banes a pm OB gt Monday Meeting Gameworks Newport games gt cu ro December 16 2010 6 30 PM Conference Room 436 n Rd Auburn Hill Gameworks Auburn Hills January 24 2011 10 00 AM 4362 B Rd Auburn Hills MI US Get Directions Social Check In Figure 10 OnTime GUI Kate 18 In f
32. d String ContentResolver read List lt Appointment gt ContentProvider String queryDateRangelin min Date in max Date in feedUrl String checkAndroidOs appointmentFromCalendarEventEntry in entry Appointment tread List lt Appointment gt getContentProvider String getContentResolver unspecified Figure 18 Part of the class diagram 30 Kate Figure 18 shows the links between the classes that deal with the calendar The main class in this subsystem is the CalendarController This class is responsible for ensuring that everything that has to do with reading the appointments from the calendar is dealt with properly The CalendarController has a couple of inner classes that support it in its tasks These inner classes are e AppointmentDataComparator This class is a custom comparator for Appointmenta Used for sorting Appointments by date in ascending order e Binder The Binder class provides a simple functionality of synchronous method invocation e CalendarControllerThread This is a thread class for CalendarController so that it can run separately from other services This class will ensure that everything to do with the calendar will be synchronized e Schedule This class will contain and manage the appointments read from the calendar The CalendarReader classes deal with the actual reading of the calendar CalendarReader is a superclass that has two subclasses The first one GoogleCale
33. demand on a route is to have the shortest traveling time as seen in figure 9 It seems logical to optimize the journeys in our application for the shortest time According to this research most people want to have a suggestion for an alternative activity from the agenda when delay time came over an hour Kate 16 Cost associated with traveling Bl To have the shortest traveling time Bl To benefit of the cheapest route To drive on the shortest distance even if there are congestions Bi To drive through the nicest sights Figure 9 The most important demand on a route In conclusion Radu makes the following recommendations for PITA functionalities e Interact with the agenda of the user e Fase of use The user just wants to travel from A to B and wants to be notified of any changes in the travel plan e Automatically update the software e A calculator for the total journey cost time money and environmental impact e Interact with a database of speed trap camera s e Interact with the car stereo for possible sound overlap e A possibility to contact alarm services Some of these advices will form the base of the application for instance interacting with the agenda of the user but due to time limits some will be left out for instance the automatic software update 2 3 Travel Time Prediction A very important aspect of Kate is to calculate the expected departure time for each appointment For this we needed
34. e since its launch in 2008 17 Main research companies predict that Android will have a 4596 smart phone market share in the year 2015 18 2 6 Conclusion The research has given new insights to the project group about mobile application development and the science of traffic behavior The development of the user interface will be done with the golden rules in mind Actions will be icon based and intuitive the app will not rely on the memory of the user and it will work in the background ready to react on the user s demand The research has shown that making a TTP on our own was not feasible so it was ruled out The Tripcast TTP has won many prizes for being the best available TTP We will use it as an information service It is clear that the majority of people normally would want the shortest route possible for their journey However they favor a longer but more time reliable route over a faster but uncertain one On Android there are no similar applications There is a comparable application available for Apple iPhone This App OnTime tries to integrate PITA functionalities with a navigator like TomTom Kate 20 Tools Selecting the right tools is extremely important in this software development project because the short amount of time available forces the project group to develop the product as fast as possible The tools can either cost a lot of time to learn or help to gain a lot of time automating standard project jobs like tes
35. e a user when to leave in order to arrive on time for an appointment In essence our application acts as a personal secretary Brainstorm project group April 2011 We did not use a formal software design method for this phase Instead we formulated our own plan to design this app since we all had a certain image of it in our head The plan consisted of four steps e A brainstorm to make these images in our head clear for the other members this led to several drawings of the app and certain parts or screens e A requirements definition meeting in which we assembled all possible requirements e A MoSCoW analysis MoSCoW helps to make clear what requirements the group agrees on that are necessary or not for the app e Drawing the UML graphs Class Diagram Use Cases and Sequence Diagram After the first brainstorm it was clear that the app we were creating would act like a Personal Intelligent Travelling Agent As stated in the chapter Research a PITA is an advanced travel information system which has potential to induce a shift towards a more efficient use of the existing transportation systems Known PITA s aimat offering services that combine traffic and public transport information static and dynamic information pre trip en on trip information and personalize this information 42 The focus for our app is on two main subjects to provide accurate departure times for the Android user and to provide journey logging information to improve the
36. e members are still learning and some project time was allocated for competence development of members Because this is a university project more time is allocated for documentation of the project as more documents have to be completed Kate 41 6 2 Test Results To ensure that we build a proper application we performed a couple of tests on it These tests can be divided in four major categories which are system tests usability tests performance test authorization test and acceptance test In the remainder of this chapter we will discuss the results of these test 6 2 1 System test During implementation we made sure to test the individual objects by means of JUnit testing This resulted in some unexpected results on some tests which alarmed us to adjust the code Eventually we made unit tests for every class except the classes in the back office Those classes depend on a connection with the database and with Tripcast which made them hard to test separately with unit tests We implemented all the requirements that we discussed in the requirements document Some of the requirements were however eventually implemented and or designed differently than we at first thought we would These changes have primarily been a result of the lack of understanding we first had of the Android Platform The system was integrated continuously so the integration testing also was somewhat done constantly This resulted in the fact that we were quick to find e
37. earned that the weekly meeting was a great result booster and helped to make the deadlines We underestimated the amount of work that the final report required The iterations between the professor and us improved the report vastly and the feedback was returned very fast but the process consumed loads of time With the experience we now have we would definitely plan this project more strictly with an extra week at the end for delivering the final report Kate 56 Individual reflection Loubna Working on Kate has been a delight I ve learned more from this than I thought when we first started On this program I was assigned responsibility on the functionalities in the Back office server Not having as much experience with programming as the average computer science student this made me a little nervous about having the responsibility about this part However having some great programmers on the team who are willing and patient enough to help and steer when needed made the programming experience one of the best so far I have learned a lot from this experience especially how to build a maintainable system since Jozua was always pushing to keep that in mind Since we had set a strict deadline for ourselves we had made a strict planning from day one This planning did not last long though We updated the planning frequently because we would have encountered unexpected problems or we just did not plan enough time for a part We eventually did
38. ediction by combining traffic patterns with weather data and actual congestion information Making a TTP is not part of this assignment The Tripcast TTP made by Model IT is shown in figure 4 The difference between a static Google and dynamic Tripcast TTP is shown to the right of the figure The dynamic TTP accounts for an extra 22 minutes travel time because of expected congestion Kate 10 gt Routeplanner met actuele reistijd en reistijdverwachting Windows Internet Explorer g E bripcaz nl Edo Edt Mew Favorites Toos Heb We Favores y Routeplanner met actuele cestijd en restij vermaci ng vite x Wu le MED OG mc Pager safety Toos TRIPE CAST X Routeplanner Uw mening Sneimenu Printversie Van Naar O gouda ede Tijdstip Vandaag 22 jui 17 00 Aankomst Zekerheidsmarge Verwachte reistijd Rextebeschniing aldnukke naar toro 2000 Toe Ain woensdag overdag gouda 1 Vertrek in zuidwestelijke richting op de Lage Gouwe naar Vissteeg 2 Sla linksaf bij Nieuwehaven 3 Sla rechtsaf bij Hoge Gouwe 4 Ga verder op Nieuwe Gouwe O Z Flauwe bocht naar rechts om op de Nieuwe Gouwe O Z te blijven 6 Ga verder op Goudse Poort 7 Sla linksaf en voeg in op de A12 richting Utrecht Vertrek 15 44 0 5 km 23 m 0 1 km 1 8 km 0 1 km 0 8 km 67 8 km Uw reistijd Vertrek 15 44 Reistijd 1 vur 16 min Afstand 79 8 km Aankomst 17 00 Relstijdverwachting Voor B4 va
39. een our biggest mistake since we ended up delaying our integration until almost the last week Of course without integration it s very difficult to test the workings of the system as a whole and for developers inexperienced in dealing with such bottom up approaches it is simply a cause for increased concern increased delays and gradual loss of control over the entire situation as time goes on If we had used SCRUM in the way we had planned it may have improved the flow a little bit as this would urge our team members to stay aware of the status of other components More important than staying aware is to keep a tight schedule to plan the integration process After we had found that our weekly sprints were not feasible integration became the least of our worries and we focused instead on completing our own components This choice was obvious because each member feels mostly responsible for their own components but we failed to remember that integrating components and getting even 10 of our targeted systemto workis a major motivation boost On top of that building intermediate prototypes is equally important for the client who can then comment on the system What I think we should have done following finding out that our deadlines were too difficult to keep is simply adjust our deadlines to ensure that integration and prototype development maintain a very high priority Randy At the start of this project was I rather eager to work on an applicatio
40. ely be the dominating mobile platform before the spring of 2012 Kate 47 7 3 Recommendation The project group has learned valuable lessons while making Kate We would like to make the following recommendations for future bachelor project groups e Take into account that learning to develop for the Android platform will take approximately two weeks extra to get an understanding of the Android dialect Compared to normal Java programming programming Java on Android is comparable with a person from Holland trying to speak the Limburg dialect technically it is identical it looks identical but it feels as something completely different e Use specialized development tools designed for the Android platform Using Android ADT Robolectric and EclEmma has given us a substantial time advantage while the learning curve for these tools was surprisingly short e GPS emulation in the Android SDK is not working properly Use a realdevice to test GPS functionality in an app e Develop for Android 2 0 and higher Lower versions are used by only 4 4 and decreasing of Android users 44 and require a lot of extra work because some libraries are not backwards compatible e Make clear agreements with the product owner about the boundaries of the project and secure this in a fixed document within the first two weeks Decide on the best methodology to use and discuss it with the project mentor Planning is crucial in such a short project Make a planni
41. ements Document ments make sure that the right result is created Design the best possible solution Design Document Imple Coding to realize the solution Code and Javadoc pa Testing Test the implementation for quality Test Plan and Test Results Document Documen Write documentation to enable future User Manual Developer Manual Final ting development and prove capability of Paper Presentation Trac data project group to assessors Plan a proper planning will help to deliver the product at the right time In the plan of approach expectations of the involved people are defined and a weekly planning with targets is listed It contains a list of products to be delivered It also contains a list of dependencies the project has on resources made available by TNO and TU Delft like server access and work environment The plan will have to be approved by the assessors of TNO and TU Delft The format of the plan is based on Prince2 a method for project management This phase was supposed to be executed in a week however the document was approved in the fifth week Research trying to create a state of the art application requires a lot of research both in the field of Travel Time Prediction and in Mobile App making On top of that learning the finesses of the Android platform and selecting the right Android tools required extra examination The research will also be published in Dutch separately as Orientation Document a mandatory step in ba
42. en you are in a meeting the vibration alert for the next appointment will be preferred over a voice saying that you have to leave main xml lt xml version 1 0 encoding utf 8 gt lt TabHost xmins android http schemas android com apk res android android id android id tabhost android layout_width fill_parent android layout_height fill_parent gt lt LinearLayout android orientation vertical android layout_width fill_parent android layout_height fill_parent android padding Sdp gt lt Tab Widget android id android id tabs android layout width fill parent android layout_height wrap_content gt lt FrameLayout android id android id tabcontent android layout_width fill_parent android layout_height fill_parent android padding 5dp gt lt LinearLayout gt lt TabHost gt Figure 20 XML interface declaration The main screen uses a tab interface which makes sub screens accessible via tab buttons The XML code in figure 20 does not declare anything in regards to interface contents it just tells Android that it will use tabs in this interface The code that controls the main screen adds tabs by linking sub activities to the Tab Host and configuring their tab buttons see figure 21 Use of a tab interface gives the user great control over what part of the application he or she would like to see and having the interface specified in this way gives great control and flexibility to the p
43. ent location The Appointment manager part of the code has been built modularly the class designed for the Android Calendar can easily be switched with another class 3 Theapp must communicate with the Travel Time Predictor TTP from Model IT Tripcast to determine the most probable time to complete the journey However the app should also be prepared to beable to work with a TTP fromanother supplier The app can send a trip request to the Tripcast TTP via the server It receives a XML file containing all necessary data to determine journey time The Trip manager part of the code has been built modularly the class designed specifically for Tripcast van easily be switched with another class 4 Knowing the time to complete the journey the app must calculate the best time to leave for that journey and advise the user about that with alerts Journey times and last possible departure time have been determined by the Trip manager after communicating with the TTP Based on the user settings about the times between alerts and the last possible departure time alerts are pushed on the Android alert stack The user receives those alerts with a vibration from the phone 5 Theapp must log all travel data in a database This data must be synchronized at least daily with a TNO server TNO will use this data to improve the quality of Service of TTP s Kate 45 The app logs data like longitude and latitude of the user at a certain time Also trip
44. entation is needed to further develop the application or use its functionalities in other projects The documentation will also be used to prove the competence of the project group to the thesis committee The documents will also include a presentation and a demonstration movie Dilbert com DilbertCartoonist gmail com 821 40 2010 Scott Adams Inc Dist by UFS Inc Figure 7 Acceptance Testing is the final stage of the test phase Kate 14 T l Related Work 2 1 User Interface Design To influence users an application must help a user in his her activities and must be nice to use This requires a simple and intuitive GUI knowing that desktop GUI demands are different from mobile GUI demands The Golden Rules of Interface Design of Schneiderman 8 are a good starting point for interaction design However these rules were not specially designed for mobile devices Gong and Tarasewich 9 have extended these Golden Rules so they can be used for mobile devices The result is shown in table 2 Gong and Tarasewich also stated additional guidelines which can be found in table 3 Itis clear that our application will have to be service oriented low on user attention functioning in the background with little comprehension needed to function Table 2 Golden rules of Interface Design Enable frequent users to use The desire to reduce the number of interactions and to increase the Offer informative feedback For every user action th
45. ere should be some system feedback jemen Design dialog to yield closure Organize actions into groups with a beginning middle and end give informative feedback at the completion to give the user a sense of accomplishment Support internal locus of control Give users the sense that they are in charge of the system Design the system to make the user the initiator of actions Strive for consistency Interaction should be platform independent the user might use an STONA spin miseris e n Reversal of actions Allow a user to undo actions this will encourage exploration of OT leak e Error prevention and simple error Small buttons are easily pressed on wrongly so design the system Reduce short term memory load In a mobile environment a user has to deal with more distractions than on a desktop computer and users often perform other primary tasks besides the device so trust on recognition of icons instead of memorization of commands Kate 15 Table 3 Mobile Interface Design guidelines by Gong and Tarasewich Design for multiple and dynamic With other activities and distractions around the user allow Design for small devices Mobile platforms will continue to shrink make buttons large OO APA Design for limited and split Mobile users are frequently multitasking so be prepared that the attention user will not have a full focus on the application Design for speed and recovery Users need to quickly save work and resume it later with
46. eturn appointmentList Figure 25 Part of the InternalCalendarReader 5 4 Manifest The Android Manifest is an extra step in implementing software on the Android platform The manifest presents essential information about the application to the Android system Android must process this information before it can run the application The contents of the Manifest is e Package name for the application r e Components of the application activities services broadcast receivers content providers These declarations let Android know what the components are and under what conditions they can be launched e A declaration of the permissions the app must have in order to access protected parts of the API and interact with other apps including the minimum level of the Android API that the app requires e A declaration of the libraries that the app must be linked to Any permissions necessary will be asked to the user on installment Kate 38 5 5 Pseudocode Although it is difficult to explain briefly and clearly how the program is implemented it usually is useful for outsiders to have some knowledge about this process For this reason we designed pseudo code which roughly describes the structure and functioning of the system As the pseudo code is written for better human understanding details of the program which don t contribute to that better understanding are omitted do initialize while program is running if ph
47. h to a database engine of her choosing For this reason we created an abstract layer for the Java code to approach This was achieved by using a technique thatis called Object relational mapping ORM creating an abstract layer for the Java code to approach Since in a Java environment Hibernate is the default ORM software on desktops and because Hibernate supports a wide range of database engines we used the Hibernate framework For internal data storage the Android SDK has built in support for SQLite The SQLite engine is ideal for mobile phones since it uses only 180 Kb of memory and demands little processor capacity 37 Other engines like MySQL Oracle or PostgreSQL are much heavier on resources and have no Android support as of May 2011 38 The SQLite query syntax differs slightly from the MySQL syntax with which the project group has worked before For the simple operations only needed for this project the project group expects no problems in compatibilit y There is always a type mismatch between a traditional relational database like SQLite and an object oriented programming language like Java As mentioned before Hibernate is the default ORM software on desktops in a Java environment However it has no default Android support as of May 2011 so it is difficult to configure on an Android system it requires a lot of tweaking and it is very demanding on resources making it awkward to use on Android 39 ORMLite is a lightweight fra
48. his protocol we would limit ourselves to the Google Calendar Data protocol which provided sufficient documentation for implementing this service into the application 35 The key reason behind this first choice is that internal Android Calendar does not have a public API and isn t part of the Android SDK thus making it difficult to integrate it with Kate 36 A common issue is the lack of forward compatibility which is due to the changing of the content providers in Android version 2 2 or higher 36 The content providers are essential for reading events stored in the internal Android Calendar Considering our inexperience with programming for the Android platform this seemed as the easiest way However during the early stages of implementation it was discovered that the Google Calendar Data protocol does not work well with the Android platform We were put in quite a predicament seeing as some time has been put on the Google Calendar Data protocol After domg some further research into the matter the decision was made to use the internal Android Calendar instead since it provided many more benefits over the Google Calendar Data protocol Some of the benefits are that Kate does not require an internet connection to read the calendar thereby reducing the consumption of battery life Support for Google Calendar also exists within the Android Calendar Android users can sync their devices with a Google account and in the process sync their calendars
49. ies that are necessary to develop applications on Android devices 23 Eclipse integration Debugger Error handler Syntax checker and Emulator The Android SDK is available on Windows Mac OS X Apple and Linux However the project group only has access to Windows computers so Android SDK for Windows 7 will be used Figure 13 shows the settings tab of our application running in the emulator Kate 21 Wi 5554 base 2 2 Vas E SO system settings Enable disable r le da Jase Ize cl Co E caedis Bes W epic lew Te Choose PD wold Figure 13 Emulator in Android SDK showing the settings of Kate Working with Eclipse and Android SDK makes it possible to use the powerful Android ADT These Android Development Tools are a set of plugins for Eclipse that turn the IDE into a fully integrated Android development workbench The tools help to test and debug code design the specific Android GUI use localization manage resources with XML and export apk files to distribute the app 24 Delivering maintainable and scalable source code is a vital requirement for TNO As part of the developers manual reference documents for the source code must be present Javadoc is the standard tool for this task However the group has chosen the tool Doxygen Like Javadoc Doxygen is a tool for writing reference documentation from within the code and can cross reference documentation and code 25 Doxygen can generate better abstracts than J
50. igure 10 one can get an impression of how OnTime looks from left to right are shown the Events Event and Address Lookup menu The Events menu gives an overview of all upcoming events The Event menu contains all relevant information about an event it also offers the possibility to indicate whether to use the event or not to give directions and change the location of an event In the Address Lookup menu the user searches for an address which gives a list of possible addresses and also sets that address to an event 2 5 The Android Platform TNO has specifically requested an app for the Android platform This new platform is a software stack for mobile devices that includes an operating system middleware an key applications The Android SDK provides the tools and API s necessary to develop applications on the Android platform using the Java programming language Android is still in development the common release as of April 2011 is 2 3 In December 2011 the new 4 0 version will be released Within a few years Android has become the market leader in sales today In figure 11 the market share of mobile operating systems as of April 2011 is shown As illustrated in figure 12 it is expected that Android will account for almost half the sales in the year 2015 Smartphone Share eb Apr 2011 Nielsen Mobile Insights National Windows Phone 7 196 Symbian OS 296 HP WebOS 296 Palm OS 196 Windows Mobile 996 Android OS 36
51. ing XML as default export the app has XML support necessary for communication with TTP s but the logging uses direct SQL database communication With XML export the generated data could be used more general e More reports the app makes default weekly and monthly reports for the user More research can be done in the need for specific reports 7 2 Discussion In this project we were facing a difficult software engineering challenge within very strict time limits There were several difficulties in this project like the unavailability of a work environment both at TNO and at TU Delft This resulted in extra responsibilities but also in a kind of freedom that made the project very pleasant to do The lack of documentation of some of the essential Android code has made an extra challenge The biggest problem however was the opposite over documentation because of the many systems to implement something For example communication between Activity interface and Service background process can be done by a Binder a Messenger or using AIDL script Within each of these solutions there are several possibilities to implement the system Apparently this is inherent to working on a platform that is still under construction The project group has sufficient Java knowledge but implementing Java on the Android platform required an extra twitch during coding It is clear that Android is a promising but not quite ready platform that will definit
52. ity Boston 2009 10 L Rothkrantz Dragos Datcu and Martijn Beelen Personal Intelligent Travel Assistant a Distributed Approach TU Delft 2005 11 A A Radu Personal Advanced Traveller Assistant TU Delft 2010 12 H van Lint H J van Zuilen and H Tu Altijd zondag Transumo 2005 13 website OnTime visited at May 12 2011 http www ontimemobileapp com index html 14 website Android developers visited at June 19 2011 http developer android com guide basics what is android html 15 website Webkit visited at June 19 2011 http planet webkit org 16 website Packet Video visited at June 19 2011 http www packetvideo com products android index html Kate 49 17 website Marketing Charts visited at June 19 2011 http www marketingcharts com direct android claims 1 smartphone platform position 15695 18 website IDC visited at June 19 2011 http www ide com getdoc jsp containerld pr U S22871611 19 website SourceForge visited at June 13 2011 http eclipse cs sourceforge net 20 D Abbott Embedded Linux Development using Eclipse Newness 2008 21 website InfoWorld visited at June 13 2011 http www infoworld com d developer world sdk shoot out android vs iphone 074 22 website Android visited at June 13 2011 http developer android com guide developing index html 23 website Android visited at June 13 2011 http developer android com sdk index html 24 we
53. k you for 21 years of support of believing in me I love you this is all for you Jozua Thanks go out to Randy Loubna and Marco They are good teammates much more than I had anticipated I wasn t very excited to go into this project at first I did not like the constraints of full time work for no pay at all On top of that I d be working with a team of students I didn t know at all Fortunately our team ended up being very capable and very flexible Marco especially was able to spark some of my leadership qualities his enormous enthusiasm was rather contagious and I really have to thank him for that Loubna and Randy great work on the code you ve surprised me at times and I m really glad to say that helped me appreciate the team even more Randy It has taken me longer than expected to finally reach this part of my bachelor study This could not have been possible without the loving support of my parents who have always been there in my time of need A special thanks to my friend Erno who has been very encouraging throughout these past years Of course last but not least my thanks to Jozua Marco and Loubna for working together into making this a fruitful and memorable project Kate 4 Title Building Kate a Bachelor project IN3405 at TNO June 2011 Students Thesis Committee Delft University of Technology Loubna Aammari 1550756 Chairman Prof Dr Drs L J M Rothkrantz Marco Hazebroek 9313504 BSc Coordinator Drs P R van Nieuwe
54. may make it easier to remove the code later For Unit Size SIG looked at the percentage of code that was above average long In our system we had some methods that were too long For these methods such as read in the InternalCalendarReader class we were advised to look for separate pieces of functionality to find out what we could refactor to separate methods Kate 39 Their final words of wisdom regarded the unit tests We had already made a good start on automation testing but it wasn t yet a permanent part of our developing process SIG recommended to integrate this to ensure that future adjustments to the current functionality is working In these last couple of days we tried to implement all the feedback into our project The adjusted Android Platform Source Code has been removed and it s functionalities have been replaced The long methods have been cut into shorter pieces and hash codes have been used in classes as Appointment java We integrated the unit tests and with this completed the automation tests With all the comments from SIG taken care of plus the positive feedback that accompanied those comments we expect a maximum rating of five stars for the second review Q Notifications Clear amp Amy s Birthday Party x Your estimated travel time is 12 08 AM USB debugging connected Select to disable USB debugging m r 1097 minutes to depart Figure 26 Kate Notification Kate 40 Testing If
55. ment in Amsterdam Due to accidents Kate has calculated that the journey will take 35 minutes more than usual so thanks to the vibration the businessman will now work this meeting to a finish to be able to arrive in time for the next appointment Before when Kate did not exist he would depart at a regular time and conclude with loads of anger and frustration on the road that he would never reach the next appointment in time A complete overview of all the classes included in the application can be found in the class diagram that is delivered on a CD as a Visio document along with the use cases and the sequence diagrams Parts are shown here but the entire diagram is too large to print The initial class diagram has been designed prior to the implementation of the system and contained a total of 21 classes In the mean time it has developed and expanded to include almost 70 classes The class diagrams of two of the more important main parts of the system are shown in figures 18 and 19 Kate 29 uses AAA AAA S CalendarController TAG String uses binder Binder observers schedule Schedule from Dat CALENDAR_POLL_TIME Long Pubs i onBind in intent Binder 7 TIYIDTET TTE I tonStartCommand in intent in flags Integer in startid Integer Integer 0800 at call tryUpdateSchedule tryReadCalendar unspecified tryUpdateDatabase notifyO
56. mework designed to work on mobile devices it has built in Android support with limited resources 40 Itis easy to learn and will help to reduce the time needed to realize the data storage code While a relational database is used to store internal data XML is used for other forms of data interchange like GUI components string resources for easy localization and communicating with the Tripcast TTP It is not certain that all TTP s will use XML as means of communication with clients but it is likely that most will offer such functionality because the easy to learn XML format is the default data format on the Internet 41 The user manifest see chapter Implementation on Android must also be written in XML Kate 26 i t One can get an idea of the concept behind this app by the following illustration Imagine having to Design travel fromplace to place for appointments you have with clients and you are currently in a meeting But you would like to know when the appropriate time is to end your current meeting and leave for the next one These days you re left with no choice but to figure this out for yourself and this could be time better spent on something else This is where this new application comes in It is designed to read an agenda or calendar of the user in order to extract appointments and other useful information such as their current location Based on user preferences and travel information the application will advis
57. n deze route is relstijdhistorte beschikbaar De kans dat u voor 16 41 aankomt is circa 5 De kans dat u na 17 31 aankomt is circa 5 De reistijd volgens Google is 54 min de door Tripcast berekende reistijd is 22 min langer Reistijd op dit moment De actuele reistijd op dit trajoct is 54 min 13 55 Snel een nieuwe berekening uitvoeren Uw berekening herhalen met een andere zekerheidsmarge Gegevens van een nieuwe rit invoeren Gebruik het formulier in de linker kolom Actuele files Er zlin op dit moment 4 meldingen met bd Figure 4 Tripcast travel time prediction kterret dar Kiem This assignment does imply several research challenges Will a user give personal travel information in exchange for advice about the best departure time In fighting congestion it is difficult to predict the behavior of a traveller in terms of the conflicting interest between the individual and the collective For instance carpooling is in the interest of the collective whena substantial part of travellers will do it all will benefit with much shorter travel times However carpooling still is not common in the Netherlands Another research challenge will be to develop an application on the Android platform which is still in development Some features have not yet been standardized other features lack documentation The final research challenge we face is the user interface of a mobile device With the training at TU Delft co
58. n that needed to be developed for the Android platform The positive testimonials may have caused some of my eagerness Itis as always a unique experience working with people from different backgrounds it is comforting to know that we all have a common goal The lack of workplaces during the early stages ofthe project was rather worrisome At the time it didn t seem to be much of an issue but as time passed it started to get in the way of our progression Luckily we managed to be resourceful at finding a place to do our work The design phase went without much trouble during which I really wanted to start programming As soon as the implementation phase started it became clear how much I underestimated Android It was very easy to receive error or get stuck trying to figure out how to implement something This lead to delays in development that could have been avoided had there been sufficient documentation for the implementation of the calendar component Testing on the Android device I received from TNO was hampered by the lack of internet access to Eduroam This resulted in having to ask a sim card from the other teammates in order to continue working on my tasks Although we have only been able to implement the Must ha ves and some of the Should haves from the MoSCoW model we should be happy to have accomplished this much in a short amount of time It is possible that if we made use of SCRUM in how it is meant to be applied it might have led us to pr
59. ncentrating on development for desktops the project group will have to cope with the specific demands a mobile touch screen imposes on the developer Several screen sizes and resolutions are available The three inch HTC in figure 5 has a resolution of 240 by 320 The massive seven inch Galaxy Tab in figure 6 has a resolution of 1024x600 Kate 11 enn O vodafone Google Figure 6 Samsung Galaxy Tab is the largest smart phone available Kate 1 2 Used Methodology The project will be executed in seven phases In table 1 all phases are explained together with the documents that were the result of that phase Although this resembles a waterfall model the phases are not strictly separated a phase can start when the previous one is not finished yet This will prohibit losing time in the first weeks of the project when a phase takes more time than planned To monitor the progress a formal meeting with the TU Delft assessor is planned weekly A meeting with the TNO assessor is planned once every two weeks For the BSc coordinator two weekly progress reports and a timesheet are written Table 1 Defined phases of this project Pee DJ Documents Plan Plan the project to ensure that the results Plan of Approach will be delivered on time Research Research the field to be able to create a Orientation Report state of the art solution 1 1 5 1 5 1 4 1 1 Require Define the demands on the system to Requir
60. ndarReader reads the online Google calendar that is connected to the Google account of the user InternalCalendarReader reads directly from the calendar on the Android phone When reading from a calendar an exception might occur for example due to inaccessibility to the calendar These exceptions have been classified as CalendarReadExceptions Another problem that might occur when reading appointments from a calendar is the problem of incorrectly entered appointments or incomplete appointments appointments missing a place etc CalendarController detects these errors and passes them to CalendarParseErrorResolver to appropriately deal with them Figure 19 shows the class diagram of the back office package The back office handles incoming requests from the application These requests are either requests to store the log data in the main database or to calculate the travel time for an appointment The CommunicationManager listens for such requests When it detects a request an instance of the CommunicationServer class is asked to read this request and write back a reply The CommunicationServer determines the type of the request and sends the request to the appropriate RequestHandler Depending on the request type the DataStorageRequestHandler either stores the data in the database or the TraveITimeRequestHandler calculates the travel time This is done by using an instance of TravelTimePredictionReader In the current state that will always be Tripcast
61. ng in week 1 and take into account that implementation will take longer plan to cope with a delay time of a week at the end of the project Planning will be changed during the project be prepared Kate 48 References 1 Rijkswaterstaat Profiel van de spitsrijder Wie rijdt er in de spits Rijkswaterstaat Adviesdienst Verkeer amp Vervoer 2006 2 website Rijksoverheid visited at May 20 2011 http www rijksoverheid nl documenten en publicaties kamerstukken 2009 07 02 20092606 aanpak multimodale reis informatie html 3 website TNO visited at May 25 2011 http ww w tno nl content cfm context overtno amp content overtno amp item id 30 4 website Blik op Nieuws visited at June 7 2011 http www blikopnieuws nl bericht 10941 1 Miljoenensubsidie voor sensorstad Assen html 5 website TNO visited at May 5 2011 http ww w tno nl content cfm context overtno amp content nieuwsbericht amp laag1 237 amp laag2 69 amp item_id 2010 03 16962009 48 55 0 amp Taalz1 6 website Sensor City visited at May 5 2011 http sensorcity nl pagina 4 content 3 7 E van Veenendaal The testing practitioner Tutein Nolthenius uitgeverij 2004 8 B Schneiderman Designing the User Interface Strategies for Effective Human Computer Interaction Addison Wesley 1998 9 J Gong and P Tarasewich Guidelines for handheld mobile device interface design College of Computer and Information Science Northeastern Univers
62. nhuizen Jozua Sijsling 1308319 Company Supervisor Ir P van den Haak Randy Tjin Asjoe 1304593 Abstract Road congestion causes a lot of problems for the Netherlands Time and money is lost due to the high traffic load on Dutch highways The unexpected extra travel time will cause travellers to arrive late at appointments There are severalstrategies to reduce road congestion one of which is the use of IT The Dutch government is investing money to provide good travel information to every traveller in the year 2015 anytime anyplace so that the traveller can make an optimal and conscious choice based on actual and reliable nationwide door to door travelinformation both pre trip and on trip The government cooperates with TNO the Netherlands Organization for Applied Scientific Research TNO has a vast knowledge of traffic management TNO researches Intelligent Travel Systems to benefit both the individual traveller and the collective Mobile devices will become increasingly more important as platform for such systems The department Mobility wants a proof of concept that the mobile Android platform can actas a personal travel assistant to its user The project group has made Kate the Keen Android Travel Extension This Java based Android app can determine the journeys to be made by the user today and tomorrow by reading appointments from the Android Calendar Kate is a personal digital assistant When the user is busy and has no time to sear
63. nment A way of assigning priorities to project requirements according to the following rules Must haves must be implemented in this project Should haves should be implemented if time allows it Could haves would be nice to have now or in the future Won t haves will not be done this version and are left for the next group of developers Open Database Connectivity a standard programming interface for accessing a database The time during the journey Object relational mapping converting data between a relational database and an object oriented language Personal Intelligent Travel Assistant Portable Network Graphics a mobile image format 53 Pre trip SIG Smart Working SQL TNO TIP XML Kate The time before the time to depart Software Improvement Group a department of the TU Delft that checks source code from students for quality and efficiency The flexible use of labor time and production environment instead of a fixed nine to five pattern at the office Structured Query Language a language for communicating with databases and altering database structure Netherlands Applied Scientific Research Organization Travel Time Predictor an automated service that predicts the time needed to travel between a departure and an arrival location given a departure or arrival time Extensible Markup Language a markup language used to describe data 54 Appendices A Process Evaluation B List of Figure
64. ogress much faster Overall it was memorable experience to work on this project and my teammates have been a source of inspiration through these past 10 weeks Kate 58 Strengths and Weaknesses The project group consists of four students who have never worked together at a project before At the start of the project the group had a meeting to determine the strengths and weaknesses of each member and the opportunities to gain more experience from this project This resulted in an formal allocation of the project tasks However this was not strict as some roles were switched between group members alternately for a week or two Loubna Strengths research analysing Weaknesses programming brainstorming risk management presenting Opportunities agile project development project management making user manual Marco Strenghts project management agile development presenting design Weaknesses Java programming testing research analysing Opportunities English language testing reporting Jozua Strenghts Java programming databases testing research Weaknesses planning time estimation risk management Opportunities presenting agile project development communication Randy Strenghts programming English language research Weaknesses presenting reporting communicating with the customer Opportunities agile project development testing Kate 59 Appendix B List of figures Figure 1 Figure 2 Figure 3
65. one calendar adjusted update appointments in Kate end calculate travel information if time to alert show notification end log longitude latitude id date save travelinformation to local database save log data to local database If connection to server available flush log data from local database to server database end end 5 6 Feedback from SIG After our first sprint we had the opportunity to send our code to the Software Improvement Group SIG and only a couple of days later we received feedback on it The feedback was primarily focused on maintainability Our code scored almost five stars on their maintainability model which means that the code has above average maintainability The reason why the perfect score of five stars was not achieved was the lower score on Interfacing Unit and Unit Size For Unit Interfacing SIG looked at the percentage of code units with an above average number of parameters Usually this indicates a lack of abstraction and it leads to confusion in calling the method and in most cases to longer and more complex methods However SIG did not recommend to change these classes because they were classes that were adjusted from the Android Platform Source Code Adjustments to these type of codes would make it harder for bug fixing and was therefore not recommended Instead we were advised to properly document the what changes have taken place on which version of the Android Platform Source Code so that this
66. oper android com guide topics data data storage html 39 website TouchTech visited at June 13 2011 http www touchtech co blog ormlite for android 40 website ORMLite visited at June 13 2011 http ormlite com sqlite_java_android_orm shtml 41 website IBM visited at June 13 2011 http www ibm com developerworks opensource library x android 42 Prof Dr H J P Timmermans NWO research programme Gedragsaspecten van PITA 2007 43 M Pol Testen volgens TMap 2nd edition Tutein Nolthenius Uitgeverij 1999 44 website Platform Versions visited at June 13 2011 http developer android com resources dashboard platform versions html Kate 51 Kate 52 ADT AIDL AMR App CVS GPS GUI IDE MoSCoW ODBC On trip ORM PITA PNG Kate Definitions and Abbreviations Android Development Tools Android Interface Definition Language Adaptive Multi Rate a variant on MP3 for mobile devices Application for a mobile device Concurrent Versions System a management system for source code that keeps track of changes made to the code and allows for easy recovery of older versions Global Positioning System a system to determine the longitude and latitude of a device Graphical User Interface the interface through which the user interacts with the program the graphical view thatis manipulated by the touch screen and buttons on the mobile device Integrated Development Enviro
67. out loss Design for top down interaction Present information through a multi level mechanism and let the user decide to zoom into detail Allow for personalization Mobile devices are personal users will setthem to their own preference Design for enjoyment Although functionality and usability are key elements users want an aesthetic user interface 2 2 Travel Assistance Rothkrantz 10 describes a Personal Intelligent Travel Agent PITA as an application running ona handheld device providing communication between a traveler and traffic information sources It guides the user with an up to date personalized advice about the way of transportation based on current and historic travel data A PITA relieves the user of having to find the best route and travel opportunity to the destination Radu 11 has examined the user requirements for a PITA Since this project will result in an application with PITA like functionalities the results of the research of Radu will be relevant for this project In figure 8 the importance of methods of interaction is shown The research states that interaction should not be handled by a traditional keypad 90 00 Interaction modalities 77 42 80 00 70 00 60 00 E Insignificant 50 00 9 41 346 Bi Neutral 40 00 2 38 E Important 30 00 E UE 20 00 3 20 EN fm 0 00 Touch screen GUI Figure 8 The importance of methods of interaction The most important
68. plementing Kate version 1 0 we have had a lot of ideas for version 2 0 In decreasing order of importance we advise the following extensions to the app e Travel prediction based on the historic travel scheme of the user predict which journeys the user will probably make today and suggest them to the user This will make the app more independent from usage of the Google Agenda e Integration of other means of transport the app makes the assumption that the user will be travelling by car Integrate the usage of public transport bicycle or carpooling e Manual input of a journey when the user wants to demonstrate Kate or just wants to know at what time he should depart without making an appointment in the Android Calendar he should be able to manually insert a trip in the Kate queue e Integrate the app with navigator systems like TomTom send the information about the arrival place and arrival time to the navigator app and start it just in time e Platform Independence the app is only available for the Android platform With two out of three people using another platform in April 2011 usage of the app will grow faster when the app is available on other platforms like Apple Os and Windows Mobile however this will not be easy because the device handling is different and the platforms use different development languages Apple uses Objective C Windows uses NET while translation tools between the three platforms are not yet common e Us
69. ra On cie Ee be Cen Dt e demand 13 2 Related Work 5 cda ote dl dei 15 SES HEC 21 3 1 Sottware Development peint aie a RE a 21 3 2 T st Enyironment p wiener tea Re d ene ii Ere d Eas eee ea ea 22 3 3 REVISION Control i ore et rete t Eb tunm eo te PPS 23 3 4 Internal Android Communication ausis oinean e eee eneen rr rre menn emere 25 3 5 DELE He CO LTE 26 ADEN rt UR TE 27 5 implementa tomers ananena a a iter e o e tb iain deut reip mete Erbe ro ER 35 Sel Structuring xit oot ei e c e era te du Colb Pe E I Pe dada 35 25 2 O vn et RED 35 DOE M MM RM px M pe CU 36 5 4 Manitest rn semen T er DP ee eee sl i at aen FETU ERE Ey Ou 38 5 9 Pseudo E iii 39 2 0 Beedback roni MG 39 To 41 6 1 Test NA RE dpt ent RT pe dp en gee le cud Ree tet 41 6 2 Test Results boxe ER tbt MR a RE reet n RAE a DUREE 42 TCC SION ws cocta et me e t vem ve oem te e iau c fre i tael 45 eL PUEDES WO ES etia o dett A e de C MIC EE ar cedat bennen 47 7 2 Discussion cano Ede E RR Et RU EE RE EE 47 13 Reeommendation ir e dte eR pe ea 48 REIETENCES A EP 49 9 Definitions and Abbreyiations iet Ex Ee VR e TRE HERREN NE RR heetten ea XR e tees 53 10 Appendic s 232 re od een ee nda e Rae eee au 55 Kate 6 Fons ie Introduction Congestion don t we all hate it The Dutch road system is heavily used travellers need to take into account that travelling will usually take more time than could normally be expected Traffic demand has increased yearl
70. requests are stored at the server With this useful data TNO will better understand individual travel patterns and delays and can better predict future travel times on particular journeys 6 The development must be documented properly because of future expansion plans or integration of the functionalities within other projects Along with the application the following documentation is delivered to TNO Requirements Document Design Document with UML Testplan Test Results User Manual Developer Manual including Doxygen Javadoc and Trac data Although the project group has lost more than two weeks waiting for resources and learning the finesses of the Android platform the application has been delivered on time and was accepted by TNO so it is safe to say that the project has been a success A comparable app with PITA Personal Intelligent Travel Agent functionalities already exists on the Apple platform but Kate is available on Android before the Apple OnTime app Besides that OnTime is more of a navigator than a travel agent Several ideas are stated for future development of Kate to gain commercial value for the app like integrating other means of travel besides automobiles or availability on other platforms than Android Android is a promising platform that is set up to support the Java developer by supplying tons of useful libraries and making it easy to use the sensors within the device Kate 46 7 1 Future Work When im
71. rogrammer to create and add more tabs Figure 22 shows an example of a tab interface of a popular social app with four tabs On the right is the Tab interface of Kate normally with four tabs but with the debug option on now with five tabs The tab shown in the figure displays all the upcoming appointments that occur today or tomorrow HomeActivity java abbreviated version public void specify TabInterface specify the tabs Resources res getResources TabHost tabHost getTabHost TabHost TabSpec settings TabSpec tabHost newTabSpec settings we setIndicator res getDrawable R drawable ic_tab_settings setContent settings Intent add the specifications to the tab host tabHost addTab settingsTabSpec Kate 33 p Friends Shows Social G4 Interactive 506 viewers 2 m On EE SHE TV 310 viewers Title Meet up with Frank Departure Time 2011 06 26 08 17 Arrival Time 2011 06 26 09 00 Estimated TravelTime 42 Delay 6 Title Shopping at Bijenkorf Departure Time 2011 06 26 13 17 Arrival Time 2011 06 26 14 00 Estimated TravelTime 42 Delay 6 Title Visit Rijskmuseum B Real Departure Time 2011 06 26 10 50 139 viewers Arrival Time 2011 06 26 11 30 Estimated TravelTime 39 Delay 5 A SamProof j Title Amy s Birthday Party Departure Time 2011 06 26 17 26 2011 06 17 20 A 5150fm com 120014 62 nee um Figure 22 Example of a T
72. rrors that wouldn t pop up from the unit tests To see what is happening within the system when running an integration test we implemented a Debug tab in Kate All output on what the system is doing would be shown there In figure 27 Kate has a new tab build for debugging purposes This functionality is primarily aimed at developers that want to know which background operations are being performed and if they have succeeded It also provides the developers the flexibility to testif the GPS logging services is working to expectations while not being confined to the PC In the regular app this tab would be deleted which is very easy in the tab layout of Android However this is a proof of concept and TNO requested this tab so it was left in the final version 23 54 27 561 AppointmentManagerService Calendar thread has notified observers 23 54 27 455 AppointmentManagerService Calendar thread has read events 23 54 19 205 PositionLoggingService User position was logged 23 54 19 105 LocationReaderService best estimate found gps 5 207179e 01 4 325007e 00 23 54 19 103 pollLocation Yes GPS found 11 54 pm 6 MO se Um Figure 27 Kate Debug window Kate 42 Usability test We put the usability to the test by asking persons who were not involved in the design of Kate to test the usability and by testing it ourselves The content and navigation and interaction of the application seemed to be fine The recovery test
73. s C List of Tables D Assignment Description Dutch E Plan of Approach Dutch F Orientation Report Dutch G Requirements document Dutch H Design Specification including UML Dutch I Testplan Dutch J User Manual Dutch Appendix A B and C are required parts of this document by standards of the faculty and are included in this document The other appendices are the documents that were created during the project They are delivered on a CD as a supplement to this document They are only available in Dutch Kate 55 Appendix A Process Evaluation Group reflection Looking back at eleven weeks of cooperation we are proud of the final result Maybe if we had taken a week longer more fancy functionalities could have been added but we realized that would not add to the core of Kate so we sticked to the original plan Time has flown by so fast At first there was some doubt about the group composition with diversity in study length experience and background Trying to make an application with a software engineer a researcher an information analyst and a manager required extra time to learn to work together As part of our initial planning we would adopt an agile approach which would take elements from Scrum m a developmental method or framework as the main method of group consult Our tight plan included weekly coding sprints in which we would set tight deadlines hold a short daily meeting and end the week with
74. so we added an extra week to the first sprint This summed up to a total of five weeks of full time programming The increase in time was needed because we didn t take into account that the learning curve of developing on an Android platform would take so long Also the documentation on Android is not optimal yet so we had to figure out many things ourselves During implementation we kept updating the design specifications because many things had to be implemented differently because of the Android interface or because the functionality ended up more complex than we initially thought it would be Eventually we ended up having implemented all of the must haves and most of the should haves we defined in the MoSCoW model Kate 35 5 3 Coding Implementing an application on the Android platform required more than just the understanding of Java and the Android API We had to code specific parts of the system in XML One of these parts was the preferences settings Figure 23 shows a part of the file preferences xml in which some of the settings and the poll rate are defined lt xml version 1 0 encoding utf 8 lt PreferenceScreen xmlns android http schemas android com apk res android gt lt PreferenceCategory android title string preference category user android visible false gt lt EditTextPreference android key username android visible false android title string preference username android summary string preference
75. t everyone wishes for easier access of the highway system in the Netherlands especially in the morning and late afternoon Kate 7 The government cooperates with The Netherlands Organization for Applied Scientific Research TNO TNO is a knowledge institute that converts science into applications It provides services for governments businesses and public organizations The mission statement is TNO connects people and knowledge to create innovations that boost the sustainable competitive strength of industry and well being of society 3 TNO is set up around seven research themes e Healthy Living e Industrial Innovation e Defense Safety and Security e Energy e Built Environment e Information Society e Transport and Mobility Within the research theme Transport and Mobility TNO is looking for ways to make traffic more reliable safer cleaner and quieter In cooperation with government and industry the research focuses on technological innovation as well as the influence of human behavior The program Sensor City is a good example of successful use of technological innovation Sensor City Assenis a project in which a large scale measuring network is constructed in the Dutch city of Assen 4 Several hundred sensors were placed throughout the city These sensors collect data about traffic loads temperature sound or air quality The use of sensor system technology creates new insights by combining all data from the sensors The
76. t so that Eclipse project control and task management is integrated with version control 32 Kate 24 As four programmers with a different amount of coding experience are working on the source code simultaneously it is only natural that bugs will appear Also a programmer can discover a issues in the code of another programmer that should be corrected To keep track of these issues and bugs an issue tracking system is used The logical choice is Trac an open source web based issue tracking system designed to interface with SVN 33 Trac offers simple to use issue tracking and a Wiki environment for documentation This is a necessary feature as TNO has planned to further develop the app with another project group to add other functionalities Trac will offer insight into development of the app and will reduce the learning curve for the future development team 3 4 Internal Android Communication During the design phase of the project it was debated over what would be the best method to acquire information regarding the calendar of a user The two options that came up were to make use of the internal Android Calendar or an external one such as Google Calendar Our initial research into these two choices had revealed that using an external calendar was the most viable option Integrating an external calendar with KATE could be realized by using the GData protocol that provides many services such as Google Maps and Google Calendar 34 Within t
77. ting and generating Java statistics The project group has done research to select the right tools for this project and decided to use the following tools 3 1 Software Development Using Java was added as an extra requirement by TNO because it is the default programming language at the organization That posed no problem because the Android platform is entirely based on Java Java programming could be done with just a Notepad and a command line compiler However an Integrated Development Environment IDE will support the software engineering process substantially for instance with refactoring auto completion quick navigation automatic access to helpdocs and the possibility to work on the code as a team so Notepad was quickly ruled out Choosing an IDE for Java is difficult because of the large amount of choices BlueJ JDeveloper NetBeans JBuilder Greenfoot and Eclipse are all used in our work field However nowadays Eclipse is the leading IDE 19 and has become the de facto standard for non desktop Java development 20 21 Eclipse is the only IDE that can directly invoke the Android development tools within the IDE 22 The project group has unanimously worked with Eclipse for the last three years so there will be no learning curve a vital aspect in this short project Therefore the open source packet Eclipse will be used as IDE for Kate Developing for the Android platform requires the Android SDK It provides tools and librar
78. username summary gt lt EditTextPreference android key password android visible false android title string preference password android summary string preference password summary android password true gt lt PreferenceCategory gt lt PreferenceCategory android title string preference category system gt lt CheckBoxPreference android key alerts enabled android title string preference alerts enabled android summary string preference poll rate summary android defaultValue 100 gt lt PreferenceScreen android numeric integer android title string preference time to alert screen summary android summary string preference time to alert screen summary lt ListPreference android id tid preference time to alert 1 android key time to alert 1 Figure 23 Part of Preferences XML Kate 36 One of the defining features that Kate would have is the ability to give travel information based on the user s calendar In order to perform this task it becomes paramount to have a component in Kate that interacts with the calendar of an Android device and processes it into something useful for Kate At first it seemed straightforward to simply read the events calendar from the device but as mentioned in paragraph 3 4 Android does not have a public Calendar API The risk of using a non public API is that should Google decide to change the Calendar API for later versions of Android
79. was fine as well Kate could handle wrong input lost connections with the server or GPS and sudden shut down Performance test We tested Kate on the Eclipse emulator two different Android phones and an Android Tab Kate worked on all of these devices in a similar manner One of the disadvantages of Kate seemed to be the battery life When implementing the system we implemented all methods as efficient as possible to minimize battery usage However since TNO required Kate to send log data to the back office every minute and every time the user s GPS location would differ ten meters from its previous location this requires quite a lot battery usage When running Kate the battery life tends to decrease threefold Authorization test The greatest part of the authorization tests was already covered by the integration test We tested the use of all external sources and Kate had the correct setup and right to work with them Acceptation test The acceptation test was run several times in the last couple of days The first time we let an outsider use Kate and Kate seemed to work fine but the interface wasn t optimal yet Since we were trying to influence the user s behavior by Kate this was a big issue Kate had to be user friendly We adjusted the interface a couple of times to the wishing of several test subject until they were all satisfied with the ease and use of Kate Itis now up to TNO to prove that an app can influence the behavior of the user
80. will not have been tested EclEmma is the open source code coverage extension for Eclipse The tools inspects the code directly and is very fast 29 EclEmma will give an insight into the quality of the code and will help to prepare the project group for code inspection by SIG 3 3 Revision Control Revision Control is the management of changes in the code This way a team of developers is able to work on the program at the same time The revision control system tracks and controls changes to the source code The client server development approach in this project restricted the number of choices for a revision control system Systems like GIT and SVK are primarily focused on distributed software development Proprietary client server systems like Microsoft TFS were not an option financially The Dutch initiative CVS developed in 1986 and very popular in the past century is outdated Apache Subversion abbreviated SVN is the most commonly used open source revision control system 30 SVN offers user friendly code sharing and revisioning The project group already has some experience working with SVN so there is virtually no learning curve at the start of the project Figure 15 shows the distribution of all commits in the implementation phase Kate 23 Total commits in output sun_log xml Commits AER 9222957332379 597552 PEE SEE ET PER TG T An an 5 Pe 4 nan A A A A v 4 y 4 y y 6 B y B 6 y B y 992999999299299999799292999995999
81. y and will do so for the next years Especially in the Randstad area when an accident happens on a highway travelling time in the entire road system will usually increase substantially This leads to increased costs in extra fuel used and environmental concerns for the extra CO2 emission On top of that a lot of production time is lost since 68 of the congested traffic consists of commuters going to or coming from work 1 The Dutch government is trying to gain control of the situation by using several strategies such as promoting Smart Working carpooling public transport and tax friendly purchase of bikes The latest strategy is using innovative technology to fight traffic congestion The Ministry of Traffic has reserved 25 million euro for the project Aanpak MultiModale reisinformatie with a main goal to provide good travel information to every traveller in the year 2015 anytime anyplace so that the traveller can make an optimal and conscious choice based on actual and reliable nationwide door to door travel information both pre trip and on trip 2 This will result in a Personal Intelligent Travel Assistant PITA a mobile IT solution which will help the user in his her travelling pattern Fighting the congestion is of great social relevance since it affects most of the Dutch inhabitants This does make projects about Travel Assistants interesting to participate in Social relevance of this project is obvious almos
82. y sending a standard XML file to the server as a request The Tripcast TTP interprets the XML for a departure location destination arrival time and some parameters that are set default in our case like the parameter use an automobile is always setto on Tripcast sends back a XML file containing all necessary data Kate filters out the 95 reliable travel time Thatis the time with which 9596 of the journeys on that route can be made in time The Alert manager will calculate the right alert times based on the user settings and trigger the alerts before the departure time is imminent Alerts are handled like Android notifications and put on the notification stack via the Android OS The Logging manager logs the trip data into the internal database Once a day it tries to connect with the log server in the TNO BackOffice If successful it will flush the data to the BackOffice If not successful it will try again the next day Kate 28 The Report Manager makes an abstract of the data in the internal database and generates weekly and monthly reports about the journeys In Kate the user can get a weekly or monthly report of how much hours have been spent on travelling from appointment to appointment the distance traveled in kilometers and the amount of times the user has arrived late for an appointment This information can be beneficial to a user that might be concerned about fuel consumption wishes to reduce tardiness or travel time The D
Download Pdf Manuals
Related Search
Related Contents
AKG Acoustics 3052H00040 User's Manual IBM ThinkPad i Series 1500 User's Manual Sony RM-PP505 User's Manual Ver/Abrir User-Manual - B&H Photo Video Digital Cameras, Photography MANUAL DE INSTRUCCIONES Yamarin 68 Cabin OWNER`S MANUAL 1980 Suzuki GS850GT Stator Replacement – by BassCliff - O-ring User Guide Version 6.2 - RWTH Aachen University Aastra AVS 5150 User's Manual Copyright © All rights reserved.
Failed to retrieve file