Beruflich Dokumente
Kultur Dokumente
Jiahao Liu
Masters thesis at Communication Systems School of ICT Stockholm, Sweden June 2011
ii
Abstract
Mobile data traffic is expected to continue growing at an almost exponential rate in the next five to ten years. Contributing to this trend are video streaming services, e.g. YouTube and Netflix, which are currently consuming significant portions of the available bandwidth and are likely to remain very popular services. In order to meet future traffic demands, mobile operators can either continue with the current approach consisting of proportionally increasing the infrastructure deployment, or adopting some alternative and opportunistic paradigms for content delivery, capable of exploiting the temporal and geographical traffic variations while optimizing the amount of resources invested in content delivery. While the former approach is likely to have only very limited economic feasibility, due to substantial increases in OPEX and CAPEX, the latter is instead very promising but require experimental validation and new software tools for performing more informed resource allocation decisions. A series of initial experimental investigations have been performed within the COSEM project to assess the feasibility of context-aware content pre-fetching in mobile networks. The initial results showed that an unprecedented increase in user experience, together with terminal energy cost reduction and increased network resource utilization can be achieved with pre-fetching, provided that future content requests can be predicted with some certain degrees of reliability. In order to understand to what extent content can be predicted and how to utilize user context information for increasing the reliability of the predictions, this project proposes an innovative monitoring approach, in which a software application, running "on the background" of mobile devices, is designed for collecting information on both the user context and her interactions with the mobile device and the various running services." The results show, with one of the methods chosen, for the YouTube application running in Android System and without any direct interaction, 90.51% of the transition between states and 95% of the internal states can be monitored. The 9.49% of the transition between states that cannot be monitored corresponds to showing the keyboard on the screen, which has minimal importance; the 5% of the non-monitored internal states corresponds to the change on the settings of the application, which can be monitor with other methods. Furthermore, in order to improve the universality of the information obtained, making it easily shared between companies, all the data are saved in RDF format, which contains a uniform resource identifier (URI) to make each resource unique in the world. Keywords: Mobile data traffic, Mobile operator, video traffic on Internet, COSEM, YouTube, Android, Monitor process, Resource Description Framework
iii
iv
Acknowledgements
First of all, I want to thanks to my supervisor Pietro Lungaro, who has guided me during all the process. Without him, this project wont be possible. Secondly, I want to tanks to my examiner, who has been reviewing this project in very important moments. After them, I am very graceful with Cristobal Viedma, my friend and college of office for these 6 months. Thanks to his review, important issues of this project have been fixed. I want to thanks to my friend Luis Martinez also, who has introduced me into the Communication System and who has helped me to establish the first contact with my supervisor and my examiner. For the part of RDF, I want to thanks especially to Wu Dan, who has reviewed the structure of RDF database and who has given me her point of view. My friends Paolo Pettinato, Urko Serrano and Thinh Lee, whom are also producing very good project at the same time with me, were very helpful for very important moment. Finally, I want to thanks to my family, my parents, my sister and specially my wife LiLiang Cheng for their understanding and support. Stockholm, June 2011 Jiahao Liu
Table of contents
Abstract Acknowledgment Table of contents List of figures List of tables Glossary ii v vi ix xi xii
1. Introduction 1 1.1 Background ..................................................................................................................... 1 1.1.1 The future tendency of Internet ............................................................................. 1 1.1.2 Main sources of video traffic on Internet ............................................................... 1 1.1.3 Internet video dissection ........................................................................................ 3 1.2 Problem description .........................................................................................................4 1.2.1 The actual mobile operators situation and future prediction ..................................4 1.2.2 Possible solutions ..................................................................................................5 1.3 Aims and goals ................................................................................................................ 6 1.4 Methodology ................................................................................................................... 6 1.5 Limitations ...................................................................................................................... 6 1.6 Project outline ................................................................................................................. 7 2. Problems description 9
3. Market study 11 3.1 Smart phone market ....................................................................................................... 11 3.2 Video sharing services ................................................................................................... 11 4. Software environment 13 4.1 Android System ............................................................................................................. 13 4.1.1 General view ....................................................................................................... 13 4.1.2 Components ........................................................................................................ 14 4.1.2.1 Activity .................................................................................................. 14 4.1.2.2 Service ................................................................................................... 14 4.1.2.3 Intents .................................................................................................... 15 4.1.2.4 Broadcast receiver .................................................................................. 15 4.1.2.5 Content providers ................................................................................... 15 4.1.3 Shared preferences .............................................................................................. 16 4.1.4 Android Manifest file .......................................................................................... 16 4.1.5 LogCats .............................................................................................................. 16 4.1.6 Sending and receiving messages in Android ........................................................ 16 4.2 Analysis of the YouTube application ............................................................................. 17 4.2.1 YouTube application use cases ......................................................................... 17 s 4.2.2 YouTube application in detail ............................................................................. 19 4.2.2.1 Overview ............................................................................................... 19 4.2.2.2 Transition between states, general statuses, modes and invocation of parallel actions........................................................................................ 20 4.2.2.2.1 General rules .............................................................................. 20 4.2.2.2.2 Transition between states............................................................ 20 4.2.2.2.3 Switch general statuses ............................................................... 24 4.2.2.2.4 Choose a mode ........................................................................... 24
vi
4.2.2.2.5 Invocation of parallel actions ...................................................... 24 4.3 Resource Description Framework .................................................................................. 25 5. Software Implementation 27 5.1 Tool utilized for the implementation .............................................................................. 27 5.2 Implementation.............................................................................................................. 27 5.2.1 Interface .............................................................................................................. 27 5.2.2 Application installed in the Android device ......................................................... 28 5.2.3 General overview ................................................................................................ 28 5.2.4 Running the program........................................................................................... 30 5.2.4.1 Starting the monitor process ................................................................... 30 5.2.4.2 On location changed ............................................................................... 30 5.2.4.3 Monitoring the user actions .................................................................... 31 5.2.4.4 Stopping the monitor process ................................................................. 31 5.2.5 The RDF database ............................................................................................... 32 6. Evaluation and analysis 33 6.1 Settings .......................................................................................................................... 33 6.2 Single state evaluation ................................................................................................... 33 6.2.1 Test implementation ............................................................................................ 33 6.2.2 Results and analysis ............................................................................................ 33 6.3 Complex states evaluation ............................................................................................. 34 6.3.1 Introduction ........................................................................................................ 34 6.3.2 Evaluation 1 Play a video ................................................................................. 35 6.3.3 Evaluation 2 Play a video extended .................................................................. 35 6.3.4 Evaluation 3 Record and upload a video ........................................................... 36 6.3.5 Evaluation 4 Search a video ............................................................................. 36 6.3.6 Evaluation 5 Upload a video............................................................................. 37 6.3.7 Evaluation 6 See the information about the user account .................................. 37 6.3.8 Evaluation 7 See information about a video ...................................................... 38 6.3.9 Evaluation 8 Rate a video ................................................................................. 38 6.3.10 Evaluation 9 Read comments about a video .................................................... 39 6.3.11 Evaluation 10 Set a video as favorite .............................................................. 39 6.3.12 Evaluation 11 Set a video as unfavorite ....................................................... 40 6.3.13 Evaluation 12 Share a video ........................................................................... 40 6.3.14 Evaluation 13 Flag a video ............................................................................. 41 6.3.15 Evaluation 14 Delete a video .......................................................................... 42 6.3.16 Evaluation 15 Subscribe a channel ................................................................. 42 6.3.17 Evaluation 16 Unsubscribe a channel ............................................................. 43 6.3.18 Evaluation 17 Play more than one videos per time .......................................... 43 6.3.19 Evaluation 18 Change the settings .................................................................. 44 6.3.20 General analysis of all complex evaluations ...................................................... 45 6.3 Conclusion .................................................................................................................... 45 7. Example of usage of the application 47 7.1 Introduction ................................................................................................................... 47 7.2 Scenario 1 - The relation between the data rate and the Quality of Experience ............... 47 7.3 Scenario 2 - Geographical usage and access to a concrete category ................................ 48 7.4 Scenario 3 Better QoS for a concrete user ................................................................... 49 7.5 Scenario 4 Probability of usage of YouTube through the day ...................................... 50 7.6 Scenario 5 Prediction of the favorite videos of the user ............................................... 51 7.7 Conclusion .................................................................................................................... 53
vii
8. Conclusions and discussions 55 8.1 Goals and goals dissection ............................................................................................. 55 8.1.1 Video sharing programs description and analysis ............................................... 55 8.1.2 User interaction monitoring ................................................................................. 55 8.1.3 Description of possible scenarios ........................................................................ 55 8.2 Contributions ................................................................................................................. 55 8.3 Discussions .................................................................................................................... 56 8.4 Conclusion .................................................................................................................... 56 8.5 Future works.................................................................................................................. 56 8.5.1 New version of YouTube .................................................................................... 56 8.5.2 Other video sharing programs ............................................................................. 56 8.5.3 RDF data analysis ............................................................................................... 57 Bibliography Appendices A Description of the YouTube Application information s 59 63 63
B Device information obtained 69 B.1 Device information obtained when the application starts monitoring process................. 69 B.1.1 Software information .......................................................................................... 69 B.1.2 Hardware information......................................................................................... 70 B.1.3 Language and country ........................................................................................ 71 B.1.4 Cell connected information ................................................................................. 71 B.1.5 Data connection .................................................................................................. 71 B.1.6 Mobile network information ............................................................................... 71 B.1.7 SIM Subscriber Identity Module ...................................................................... 72 B.1.8 Screen information ............................................................................................. 73 B.1.9 General Network information ............................................................................. 74 B.1.10 Wireless network information ........................................................................... 74 B.2 Device state change monitor ......................................................................................... 76 B.2.1 Cell information ................................................................................................. 76 B.3 Additional information related with the device information obtained ............................. 76 B.3.1 Android system API Level Table ........................................................................ 76 C Keywords used to monitor logs 79 C.1. Keywords used to detect the states, general status, modes and parallel actions.............. 79 C.1.1 States.................................................................................................................. 79 C.1.2 General Statuses ................................................................................................. 92 C.1.3 Modes ................................................................................................................ 92 C.1.4 Parallel actions ................................................................................................... 93 C.2 Keywords used to detect internal states ......................................................................... 94 D Specific information obtained through logs E Specification of the device utilized for the evaluation 115 140
viii
List of figures
1.1.1 1.1.2.1 1.1.2.2 1.1.3 1.2.1.1 1.2.1.2 3.1 4.1.1 4.2.1 4.2.2.2.2 4.3 5.2.1 5.2.2 5.2.3 5.2.4.1 5.2.4.2 5.2.4.3 5.2.4.4 6.2.2 6.3.2 6.3.3 6.3.4 6.3.5 6.3.6 6.3.7 6.3.8 6.3.9 6.3.10 6.3.11 6.3.12 6.3.13 6.3.14 6.3.15 6.3.16 6.3.17 6.3.18 6.3.19 6.3.20 7.2 7.3 7.4 7.5.1 7.5.2 7.6.1 Global consumer Internet Traffic. 2010 2015 ............................................................... 1 Peak period aggregate traffic composition North America: fixed access ....................... 2 North America, fixed access, peak period, top applications in Downstream by Bytes ......3 Consumer Internet video. 2010 2015 ............................................................................ 3 Pricing models in US, UK, Singapore and Australia ........................................................ 4 The root challenge for the traditional telecommunication companies ............................... 5 Smart phone analysis. Quarterly shipment data. Q4 2010 .............................................. 11 Android software stack.................................................................................................. 13 Use cases of YouTube 1.6.20 (E) on Android System ................................................... 18 General state diagram for YouTube 1.6.20(E) on Android System ...........................22-23 Semantic web layer cake ............................................................................................... 25 The interface of YouTube monitor ................................................................................ 27 YouTube monitor application installed in Android System ............................................ 28 YouTube monitor programs general overview ............................................................. 29 Starting the monitor process sequence diagram ............................................................. 30 On location changed sequence diagram ......................................................................... 30 Monitoring the user actions sequence diagram .............................................................. 31 Stopping the monitor process sequence diagram ............................................................ 31 Single state evaluation ................................................................................................... 33 Evaluation 1 Play a video ........................................................................................... 35 Evaluation 2 Play a video extended ............................................................................ 35 Evaluation 3 Record and upload a video ..................................................................... 36 Evaluation 4 Search a video ....................................................................................... 36 Evaluation 5 Upload a video ....................................................................................... 37 Evaluation 6 See the information about a user account ............................................... 38 Evaluation 7 See information about a video ................................................................ 38 Evaluation 8 Rate a video ........................................................................................... 39 Evaluation 9 Read comments about a video ................................................................ 39 Evaluation 10 Set a video as favorite .......................................................................... 40 Evaluation 11 Set a favorite video as unfavorite ...................................................... 40 Evaluation 12 Share a video ....................................................................................... 41 Evaluation 13 Flag a video ......................................................................................... 41 Evaluation 14 Delete a video ...................................................................................... 42 Evaluation 15 Subscribe a channel ............................................................................. 43 Evaluation 16 Unsubscribe a channel ......................................................................... 43 Evaluation 17 Play more than one video per time ....................................................... 44 Evaluation 18 Change the settings .............................................................................. 45 General analysis of all complex evaluations .................................................................. 45 Relation between data rate and QoE .............................................................................. 47 Video played in Kista since 2011.06.23.12.49 to 2011.06.23.12.50 ............................... 48 Video traffic of a concrete user from 2011.06.23.10.30 to 2011.06.23.11.30 ................. 50 Number of sessions per hour for a concrete user in one month....................................... 51 Probability of starts a session per hour for a specific user .............................................. 51 States where the video played comes from .................................................................... 52
ix
7.6.2
List of tables
1.1.3 7.3 7.4 Consumer Internet video. 2010 2015 ............................................................................ 4 Video played in Kista since 2011.06.23.12.49 to 2011.06.23.12.50 ............................... 48 Video traffic of a concrete user from 2011.06.23.10.30 to 2011.06.23.11.30 ................. 50
xi
Glossary
Base station In wireless communication system, a base station is a wireless station installed in a fixed location to communicate with the mobile devices such as mobile phones. OPEX It stands for Operational Expenditure and it is the ongoing cost of running a product. In the context of this project, OPEX is the cost for the mobile operators to maintain the existence infrastructure. CAPEX It stands for Capital Expenditure and it is the counterpart of OPEX. It is the expenditures to create future benefits. In the context of this project, CAPEX is the inversion needed to create infrastructure necessary to maintain the QoS and the QoE. QoS The Quality of Service measures the capacity of the vendors to offer a concrete service. In the context of video streaming service, it could be the level of acceptable defects on a service. QoE The Quality of Experience used in this project refers mainly to the perception of the users about the experience received with the mobile devices. In contrast with QoS, it is subject to the user and different user can experiment different QoE in the same situation. Exabytes It is a unit to measure the computer storage and it is equal to 1.000.000.000.000.000.000 Bytes. Petabytes It is a unit to measure the computer storage and it is equal to 1.000.000.000.000.000 Bytes CARG It stands for Compound annual growth rate and it measures the smoothed annualized gain of an investment over a given time period. Internet PVR It is one of the categories that Cisco has grouped the Internet video. It is the recorded live TV content for late view. Ambient video It is used to group one of the types of videos in Cisco predictions. It contains all the persistent video streams such as pet cams, home security cams and nanny cams. Average Revenue per User (ARPU) It is a term used for companies who offers subscriptions to the users and it measures the revenue generated by one customer over the time, typically each month or each year. OMS It is a variant of Android system created for the Chinese market. It stands for Open Mobile System and it is supported by the Chinese company China Mobile Ltd. Tapas It is an OS derived by Android system launched by the ex-president of Google in China. It is modified to support Chinese social networks, Chinese e-books and other services that are not related with Google. Device ID (IMEI for GSM phones and MEID for CDMA phones) IMEI stands for International Mobile Equipment Identify and MEID stands for Mobile Equipment Identifier. Both of them are usually unique to identify the mobile devices, but not subscribers. For example, IMEI is used to reduce the effect of mobile phone theft, by stopping the mobile device with a stolen IMEI to access to network.
xii
Software fingerprint Generally, a device fingerprint contains compact information about the hardware and the software. In the case of Android, it collects the software fingerprint which uniquely identifies the software build. Android ID It is a 64-bit number randomly generated when the Android devices is booted for the first time. It should remain constant for the lifetime of the device. URI Uniform Resource Identifier is a string of characters that enables the unique identification of a resource on Internet. It could act as URL (Uniform Resource Locator), URN (Uniform Resource Name) or as both. The URI is frequently used in markup languages such as HTML, XML or XLST to point to other resources. URL Uniform Resource Locator is a Uniform Resource Identifier that specifies the location of a well-known resources and the mechanism to retrieve it. This is possible because the syntax specifies a schema which could be used to identify the process method of the URL.
xiii
xiv
Chapter 1 Introduction
In this chapter, first of all, the future tendency of Internet and the main sources of video traffic on Internet are presented, along with the actual situation of the mobile operators and the problems that they are facing and possible solutions. Secondly, the aim and goals of this project will be introduced. In order to achieve those aim and goals, a specific methodology is described. Finally, the limitation of this project and its structure could be finding. 1.1 Background 1.1.1 The future tendency of Internet Since Sir Tim Berners-lee invented the web on 1989, the traffic on internet has been growing. Recently, the forecast published by Cisco shows the future tendency of traffic on Internet [22]. It predicts that the global IP traffic will continue growing, reaching 966 Exabytes by the end of 2015.
Figure 1.1.1 Global consumer Internet traffic. 2010 2015. Source [22] As the graph shown, the type of data which increase most is Internet video. The study of Cisco point out that on 2010, the Global Internet video traffic has surpassed global file sharing. It wills growth from 40 percent of consumer internet traffic in 2010 to reach approximately 62 percent of global consumer traffic by 2015. That is, on 2015, the video traffic on internet will reach 33,620 PetaBytes per month, which means that the among of video that will across global IP networks every second in 2015 would need 5 years to be watched. Due to this huge growth, the following sections are going to focus on the video traffic on Internet. First of all the main sources of video traffic on Internet is going to be analyzed. 1.1.2 Main sources of video traffic on Internet Nowadays, with such big amount of data traffic on Internet, it could be hard to know the rank of most accessed web pages on Internet with accuracy. Thanks to Alexa, a subsidiary company of Amazon, this information is easily obtained and daily updated. According to this global rank, YouTube is the thirst most popular web page globally, only behind Google and Facebook. [19] Created on February 2005 and acquired by Google Inc. on November 2006 [14], YouTube is a worldwide service portal where the user can upload, share and watch videos.
Based on the official information on the web of YouTube, it is localized in 23 countries across 24 different languages, which make it receives 2 Billions of views a day and 24 hours of videos to be uploaded to it every minute [32]. With such amount of traffic and such good position in Alexa rank, it seems YouTube is the most important source of the video traffic on Internet. But Internet is a place where the things can change very fast, looking at the best one at the present could not be enough, the potential to grow of its competitors is also important. In this sense, the Global internet Phenomena Report: Spring 2011 provided by Sandvine advice the reader to the rapid growth of Netflix. [26] Netflix is an American provider of Video-on-demand Company in United States and Canada. It provides both physical rental service (United States) and internet-based streaming service (United States and Canada). By the year 2010, it has 19.7 millions of subscribed and a revenue of 2.16 billion. [24]
Figure 1.1.2.1 Peak period aggregate traffic composition North America: fixed access. Source [26] This graph of Peak period aggregate traffic composition in North America regarding the fixed access shows the increase of the Real-time entertainment between 2009 (29.5%) and March 2011 (49.2%), which is almost 60%. Furthermore, Sandvine forecasts the Real-Time entertainment category will represent 55-60% of peak aggregate traffic by the end of 2011.
Figure 1.1.2.2 North America, fixed access, peak period, top applications in Downstream by Bytes. Source [15] The reason behind this heavy growth is the domination of Netflix in the video traffic market, which represents 29.7% of peak downstream traffic in North America, as the figure 1.1.2.2 shows. This peak downstream traffic makes possible Netflix becomes the largest source of Internet traffic overall in North America. [26] Once the two main sources of the actual video traffic on Internet are presented, the future tendency of Internet video and its components will be analyzed. 1.1.3 Internet video dissection In the same study provided by Cisco, the forecast of the Internet video between 2010 and 2015 is also provided, which is extracted to build the graph and the table below [22]
Consumer 2010 2011 2012 2013 2014 Internet Video 697 931 1254 1665 2208 Short form 2936 4984 6932 9255 11980 Long form 838 1626 2786 4165 Internet video 342 on TV 777 1185 1754 2477 Live internet TV 480 93 258 521 860 1207 Ambient video 40 78 134 237 387 Internet PVR Mobile video 85 213 493 1028 1933 4672 8079 12146 17583 24357 Total Table 1.1.3 Consumer Internet video. 2010 2015. Source [22]
CARG 2010-2015 34% 40% 77% 48% 75% 71% 108% 48%
Based on such study, the Internet video traffic will have a compound annual growth rate (CAGR) of 48% since 2010 to 2015, which will growth from 4672 PetaBytes on 2010 to 33620 PetaBytes on 2015 (719%). Among them, the one which has the highest CAGR value is the mobile video, which wills growth from 85 PetaBytes on 2010 to 3333 PetaBytes on 2015. By the end of 2015, the Cisco study predicts that the mobile video traffic will surpass Internet PVR, Ambient video, short form and it will be almost the same as live internet to TV. With such among of traffic within 5 years, are the mobile operators prepared for it? The next section will analyze the actual situation of the mobile operators and the problems that they are facing. 1.2 Problem description 1.2.1 The actual mobile operators situation and future prediction
Figure 1.2.1.1 - Pricing models in US, UK, Singapore and Australia. Source [18] The graph above shows the actual pricing models (March 2011) in US, UK, Singapore and Australia. [18] It groups the price model of those four country in Per MB, which means the final price depending on the traffic used; < 5GB(per month), a flat fee with a limitation less than 5GB of data traffic per month, and >5GB (per month), a flat fee with limitation more than 5GB of data traffic per month. It is very clear that in all those countries, the flat fee with a limitation more than 5GB is the price model which dominates the market. This is especially clear in US, where 84% of the user has a relatively unrestricted price model.
4
The flat fee was introduced to make the mobile data prices more attractive for the users, who can easily translate their behavior from the computer to mobile devices. It has advantages and disadvantages. At the same time that the mobile operators are gaining more users, the flat rate could become a problem because it decreases the Average Revenue per User (ARPU) and increase the data traffic. This is, by one hand, the incoming of the mobile operators will be decreased and by another hand, the mobile operators are forced to make more investment in CAPEX and OPEX if they want to maintain the actual level of QoE and QoS.
Figure 1.2.1.2 The root challenge for the traditional telecommunication companies. Source [17] The graph above shows that, once the data traffic exceeds the voice traffic, the actual situation can greatly influence the revenue of the mobile operators, making the traffic growth not anymore correlated with revenue growth. With such big problems, the mobile operators should find solutions to make the situation more sustainable. 1.2.2 Possible solutions The easiest solution could be the end of the flat rates. In June of 2010, AT&T signaled the end of flat-rate data tariffs for iPhone users in United States. Instead, a model where owners could be up to 2 gigabytes of data per month on standard contracts will be used. [2] Also in United States, Verizon Wireless is going to charge new users by how much data they consume in July 2011, finalizing the end of all-you-can-eat mobile Internet plans. [3] However, because the contract that the final users have signed has a concrete duration of services, until it get expires, this solution wont be effective. Meanwhile better solution should be proposed. A good solution could act both preventing the rapid growth of traffic cost and increasing the value or the revenue of the mobile operators [17]. For the first part of the solution, prevent the rapid growth of traffic cost, the mobile operators could try to manage the resources more efficiently, share infrastructures and making more efficient deployment. To reach the aim of increase the revenues, the mobile operators could try to exploit existing infrastructure more effectively and improve the user experience, for example by extending the battery life of mobile devices [17].
5
1.3 Aims and goals Because the long time required and wide knowledge needed to finish all the smaller solutions, this project is going to focus one of them: exploit existing infrastructure more effectively. Mainly, this solution requires two types of information at the same time: The utilization level of the existing infrastructures and how they are going to be explored (User behavior) From the point of view of the mobile operators, the first type of information is not so hard to know because the infrastructure is under their control. The hardest part to more efficiently exploit the existing infrastructure is to know the user behavior, which represents a constant destination of data that is always moving. Because the preferences and the needs of each person are not equal, this movement could be viewed as a constant challenge for the mobile operators to drive correctly the traffic to the right infrastructure when it is needed. Fortunately, the human behavior is predictable, by knowing the previous actions of a specific user, her future behavior could be determined with a certain level of probability. Driven by this idea, the aim of this project is to build a program to explore the possibility to monitor the user behavior with a video sharing program through a mobile device already on the market. In order to fulfill this aim, several goals are set: Describe and analyze the behavior of a video sharing program running in a mobile device already on the market. Utilize the tools available to monitor the interaction of the user with the program. Describe different scenarios where the data obtained could be useful. 1.4 Methodology In order to fulfill the aims and the goals described in the previous section, this project has been developed following a specific methodology. First of all, because the large number of types of platforms and video sharing programs, a market study should be done. In this market study, a concrete mobile device platform and a concrete video sharing program should be chosen. Once it is done, in order to make the results of monitor available for most of the customers and make it easy sharable, a lecture review has been carried to choose the best data representation format. After it, the device platform and the video sharing program are analyzed in detail to explore all the monitoring possibilities and capture as much action as possible. All those knowledge are utilized in the next step, where a prototype which runs in the chosen platform has been implemented. Finally, an extent evaluation has been done running the prototype in order to test the accuracy. 1.5 Limitations The time constraint (20 weeks) has determined most part of the limitations of this project. First of all, as the section 3.1 has demonstrated, there are several platforms in the market. Developing an application on all them could be possible but it requires time. Thus, only the best of them will be used. Through the study done by Canalys [20], It seems Google based platforms
6
(Android, OMS, and Tapas) dominate the market. Among them, a specific version of Android (2.1) has been chosen. In the section 3.2 of the same chapter, YouTube application has been chosen to be monitored. In this sense, because different version of YouTube application could behave differently, only the version 1.6.20 (E) has been analyzed and monitored. There is also a limitation of the monitor process utilized. There could be several ways to monitor an application on Android. The one utilized is based on Logs generated by the application, which cannot monitor all the user actions. Other methods could be utilized in combination with this methods in order to achieve 100% of user actions monitored, but it will requires more time. Finally, more extend evaluation could be done. At time of writing this project, hundred mobile devices compatible with Android has been released. [23, 29] Testing the monitor application on all them by utilizing tools as TestDroid could prove that the monitor application work for all the Android devices, but it will take long time and a lot of resources. 1.6 Project outline In the following sections, the author is going to explain the possible problems that this project could help to answer in the section 2. After it, the first step of the methodology which is market study will be presented in the section 3. The software environment, both YouTube application and Android system will be introduced in section 4. Lately, in section 5, the author is going to explain the functions of YouTube Monitor program implemented, its interface, the general overview, the design of the database and the internal actions when the user runs the program. In the section 6, the author has designed a single test and 18 sets of more complex test in order to evaluate the monitor capacity of the program. The potential and the scenario where this program can be used are shown as example in section 7. Finally, in section 8, the author is going to do a review of the goals and objectives proposed, a discussion about the actual state of the program, as well as the future works. The conclusion, which summarizes the entire project, is also shown in this section.
10
Figure 3.1 Smart phone analysis. Quarterly shipment data. Q4 2010. Source [21] For this reason Google based platform has been chosen to implement the video sharing monitor program and among them, Android system. 3.2 Video sharing services By the video-sharing services side, the section 1.1.2 has shown that YouTube is the biggest video traffic source worldwide and Netflix has very good potential to compete with it, both options could be valid. When the author started the project, on January 2011, there was not program that enable the possibility to access the film database of Netflix through Android System. The actual program was launched on 12th of May, 2011 [25]. This means there were no better options than YouTube. So, YouTube application for Android system was chosen to be monitored.
11
12
Figure 4.1.1 Android software stack. Source [20] The applications which run in Android use Java as main language and XML (eXtensible Markup Language) to build the user interface. With proper user permission and by using the application framework, any application running in Android can take advantage of the device hardware, access location information, run backgrounds services, set notification status bar, etc. Other important features of Android is every Android application runs in its own process, which guarantee the isolation from other applications. This is possible using the Androids own virtual machine called Dalvik Virtual Machine, which unlike the Java Virtual Machine, is register-based.
13
This feature makes the Androids Virtual Machine more efficient [16], enable the possibility to run several Virtual Machines at the same time in the mobile phone. 4.1.2 Components The android applications are building basically by components; each one represents an entry point through which the system can enter the application. Each one of them exists by its own and plays an essential role. There are four different types of application component: Activities, which is what the user see in the screen; Services, which runs in the background; Broadcast receivers, which receive the intents and Content provide, which provide data for the applications. The application built for this thesis is based on the first three components. 4.1.2.1 Activity The activity is one of the most important components in Android. It is prepared to be shown to the user and normally it is related with a user interface file written in XML. The user can specify the interface using the XML files and show it with the proper Java code. In the program made for this project, there is only one activity which the user can decide to start the monitor process, stop it or finish the actual activity. 4.1.2.2 Service Unlike activities in Android, services run silently in background. The priority set in Android regarding the services is the services have lower priority than an active activity but higher than an inactive activity. Because this, it is perfect bind them to the application's component and make the application continue runs and responses the user's action in the background. There are two types of the services: Bounded service and Started service. The main characteristics of a bounded service are: This service will be created when some component bind it. Multiple components can bind the service at once. When no component is binding a service, this service will be destroyed automatically. It is possible to provide a client-server interface. The main characteristics of a started service are: This service will be created when some component start it explicitly. The service will run almost indefinitely, even when the component which has started it has been destroyed. So, it is useful when not result is required. To stop this service, a component could use the stop method or the service itself could stop itself when it considers the goal for which the service has been created has been reached. It is important to clarify all the started service could be also bound. This is, the combination of both type is possible: A service can be started first and then bind it or it can be bind first and later be started. In the extremely low memory case, the service could be killed. But the system will try to restart it again as soon as it has enough memory.
14
There are two services running in the code made for this thesis: DeviceStateServices which monitor the general state of the device and GeneralService, which is responsible of monitor the YouTube application users actions. Both services are started service. 4.1.2.3 Intents Before explain the broadcast receiver, the intents should be described because basically broadcast receiver is a class which receive the intents and process it. The Intents is an abstraction description of operations which are used in Android to perform a concrete one. [11] It contains two primary attributes: action and data. The action attributes contains information about the general operation to be performed. There is several actions existence in Android such as ACTION_VIEW to obtain information or ACTION_DIAL to display the phone dialer. The coder can also set her own actions. The data attributes contains data which is used to operate in the operation, which is expressed in URI format. In addition to the primary field, several secondary attributes such as category or type can be used. The most practical part of the Intents is they have a secondary field called extras. With the method putExtra(), any basic data type such as Boolean or String could be added to intent and being exchanged between processes. In the monitor application, the author has created intents with a unique action in Android System, which are utilized to send the RDF data to the broadcast receiver to be lately saved in the database. 4.1.2.4 Broadcast receiver From the point of view of the order of intent processing, there are two types of the broadcast receivers in Android: Normal broadcast receivers, which run in an undefined order, and ordered broadcasts, which the order of processing could be controlled with the android:priority attribute of the matching intent filter. The broadcast receiver only contains a method called onReceive() and it is only alive when this method is called. When this method finished, the system considers the receiver to be finished. The broadcast received is used in the monitor program made for this thesis in order to receive intents that contain the RDF data to be saved in the database. This makes the code more flexible because as long as any java class has the variable context, which contains the context of the program, it can send the intent with the RDF data to save it in the database. 4.1.2.5 Content providers In Android, the persistent data is saved using three types of resources: Shared preferences, SQLite database and Content Provider. Shared preference is explained in the section 4.1.3. SQLite database is the default relational database that comes with Android. By default, the database is a sandbox. This means its content is only available for the application which has created it. [11] This can be changed using the Content provider, which enable the content available to be shared. Once the default SQLite database is turned to Content provider, any application which has proper permission can add, modify and remove the contents. Because there is no need to share the content of the monitor programs data, the SQLite database where the information is saved, hasnt been turned into the Content provider.
15
4.1.3 Shared preferences Shared preference is the way recommended to save the UI state, user preferences and application settings in Android System.[11] It utilizes the key/value system to save/retrieve data. This is, every single data will have a key which is unique in the shared preferences. By using this key, the value saved previously, even the application has been killed and restarted again, will be restored. In case the value required is not set yet, a default value will be returned. In the YouTube monitor application, the shared preference is used mainly to save the unique id of the mobile device and the previous state reached. 4.1.4 Android Manifest file The Android Manifest file is an XML file presented in the root directory of any Android program which contains all the essential information about the application. Those information could be the java package name which serves as a unique identifier for the application, the description of the components of the application (Activities, Services, Broadcast receivers, contents providers), the permission required to run the application, the minimum level of API that the application requires, (See appendix B.3.1) etc. It is unique in the application and it should be present since the beginning because it indicates the activity of the application which should be run when the application starts. 4.1.5 LogCats LogCats is the method used on Android based devices to show messages or logs which is similar to the sentence System.out.print() of Java. To invoke it, the coders can write the print code in any place of the existence code. It is important to mention that those messages or logs can be captured and handled by any program running in Android, because it is the base of the program implemented for this project. There are 7 types of logs: Verbose, Debug, Information, Warning, Error, Fatal and Silent. All they have different order of importance and they are sorted by it. The Verbose is the less important one, and Silent is the most important one. In fact, Silent is so restrictive that nothing will be displayed. The general pattern to invoke the logs is using the function Log and then the first character of the type of the log. It requires at least two arguments: Tag and Message. Tag is used to classified the log and message is the information which the coder what to display. In Android, there are three buffers where the logs are stored: Main, which is the default buffer and where most of the logs are; Events, where all the events-related logs are stored and radio, where all the radio/telephony related logs are stored. 4.1.6 Sending and receiving messages in Android Beside the broadcast receiver, the other way to communicate in Android is using Messages and Handlers. The main difference between the broadcast receiver method and the sending and receiving message method is, in the second method, the receiver is known forehand, which is set when the message is sent. This receiver has to implement the method called handler. The handler is the process which repeatedly checks the content of the message queue and filters the message which has itself as receiver. Because of this loop, when the handler is not implemented in the activity, it should be implemented in another thread.
16
In the program implemented for this thesis, the messages are used to evaluate the transition between states. Although the main log buffer used for it is the Events, sometime it is not enough. In order to monitor also the logs from the Main log buffer, expecting some specific log to appears, a special class WatchDogPack is implemented. Basically, with this class, the application can add and remove Watchdogs dynamically, when the application is running. If a Watchdog found a log which match with the characteristics set, it will send a message to the handler then the application could act depending on the message. Once the main characteristics of Android System are presented, the author is going to explain how the specific version of YouTube application in Android System works. 4.2 Analysis of the YouTube application In this section, first the author is going to show all the case studies and then, explain all the states, statuses, modes and parallel actions. The version of YouTube application analyzed is 1.6.20 (E) which runs from the version 2.1 of Android O.S. or later. 4.2.1. YouTube application use cases The follow chart shows the use cases of the YouTube application:
17
Figure 4.2.1 Use cases of YouTube 1.6.20(E) on Android System The main functions of YouTube application on Android are manage videos, handler a video while it is playing, manage a channel, manage the user account, get information and change settings.
18
To manage an application, the user can record and upload a video, or upload a video already exists in the Android device, search for a video, play a video, share a video, set a video as favorite, set a video as unfavorite, flag a video as inappropriate, rate a video from 1 start to 5 starts or delete a video which has been uploaded by the user. While a video is playing, the user can pause the video, play the video, backward/forward a video, set the quality of the video (HD on/off), change the scroll of the video or see the captions of a video, if any. In the YouTube application, any user is at the same time a channel that other users can subscribe. A user can also decide to stop subscribing a channel in any moment. YouTube application works with two modes: logged in and logged out. When the user is logged in, she can perform all the actions that are possible when the user is logged out, and she has also opportunities to perform other specific actions. Another function that the YouTube application has is to obtain information. They could be information about a video, about the user account, about the channel or about a playlist. Other information that are possible to obtain are the comment from other users about a specific video, the list of the favorite videos of the user, the list of subscribed channels, the videos of a specific playlist, the list of the videos uploaded by the user and the list of the categories set by YouTube. Finally, the user is allowed to change several settings for the YouTube program. 4.2.2. YouTube application in detail 4.2.2.1 Overview In total, YouTube application has 44 states, 2 general statuses, 2 modes and 2 parallel actions. The states are composed by each one of the screens shown in the application and the moment when the application is looking for a video in the server except the state 6, Start searching, which doesnt have any screen representation. The general statuses are Launched and Finished, which indicates if the YouTube application has been launched or it has been killed by Android System. At the same time, YouTube application can works in both logged in mode or logged out mode. The logged out mode are contained inside the logged in mode in sense that all the states of logged out mode are also reachable from the logged in mode. Finally, there are two parallels actions. They are actions that the YouTube application creates when it has to upload a video to the YouTube server. They are necessary because they are running in background, which enable the possibility for YouTube application to be running at the foreground, being responsive for the actions of the users. The first one corresponds to the action when the YouTube application is uploading a video recently recorded and the second one corresponds to the action when the YouTube application is uploading a video existence in the mobile device. In appendix A there is a short description of each one of the states, general statuses, modes, as well as the parallel actions.
19
4.2.2.2 Transition between states, general statuses, modes and the invocation of parallel actions 4.2.2.2.1 General rules In any Android device, the requirement states that the manufacturers must implement at least four buttons: Home, menu, back and search [12]. The behavior of them should be the same for all the applications. Basically the home button makes the device shows the home screen, the menu buttons make appears the menu and it is context dependent, the back buttons make the application go to the last state and the search buttons open a keyboard where the user can enter any keyword and look for any information related to that keyword. If the user presses the buttons and hold down them 1 or 2 seconds, a new action could be performed: with the home button, the recently used applications (at most 6) will appear; with the menu button, a keyboard will appears where the user can enter any keyword and make search within the phone. Finally, with the search button, the voice search will be launched. The existence of those buttons enables the possibility to the users to come back to the previous state in any moment (Except the state 6. Start searching) by pressing the physical back button or go to the home screen (exiting any application) in any moment by using the physical home button. All the Android system supports the utilization of the touch screen. [28]. This enable the possibility to implement the virtual buttons or buttons which will appears on the screen according the user interface implemented. If the user press on the screen where the buttons are, her action will be captured and the system will act as if the user has press on a physical button. With the use of touch screen, the user also has the possibility to hold down the finger pressed on the screen. This could enable the context menu, which displays a list of possible actions. As the physical buttons, in YouTube application, the virtual buttons are also used both to make the transition between the states and to trigger an internal state. 4.2.2.2.2 Transition between states
20
21
22
23
Figure 4.2.2.2.2 General state diagram for YouTube 1.6.20(E) on Android System. Figure available on http://www.jiahaoliuliu.com/2011/06/master-thesis-youtube-state-chart.html In the State chart above, all the possible transition between the states are captured, as well as all the internal states possible. In order to simplify the chart, some transition between the states is shown inside the source state. Also for simplification, the state 1, Main screen, is shown as also final state. This is, when the user has finished the actions to perform, she can come back to the first state to perform other actions. The other possibility while the user is performing an action is decided to not continue with such action planned and come back to the final state. In this sense, the user can both come back to the first state and press repeatedly on the physical back button, which the user can do in any state or press on the virtual home button which will appear if the user presses on the physical menu button. Because the existence of the physical home button, the user can exists the application in any moment by press on it. In order to make the state chart more understandable, this transition is not shown in the state diagram. Another thing to take account is there are two groups of states which are context dependent. The first group is because they invoke a call to other application, which depending on the applications installed in the system and the system configuration, could trigger an external application. Because the existence of the applications for Android is constantly changing, there is no way to know which application will be triggered when a call is made. This makes impossible to monitor the behavior of them. They states of this first group are: 2. Start recording video 3. Video recording finished 17. Upload video 43. Share a video 44. Flag a video No internal state can be described for them. The second group is because they are depending on the system configuration. In this group there is only one state: 5 Showing keyboard. This state depends on the locale configuration of each machine (The language and the region set on the phone) and also the preference of the manufacturers, because they have the right to modify it to adapt Android System to their preferences. Due this flexibility, this state cannot be monitored easily and it is considered as context dependent. 4.2.2.2.3 Switch General statuses For the generation between the general statuses, because there are only two statuses, launched and finished, a cycle is used. The YouTube application only can go to the status Launched when it is in the status Finished, and vice versa. 4.2.2.2.4 Choose a mode The transition between the two modes, logged in and Logged out, are also cyclic. The user only can go to the mode Logged in when she is logged out and vice versa. 4.2.2.2.5 Invocation of parallel actions Finally, to invoke the parallel actions, specific state of YouTube application should be reached. To invoke the parallel action Start uploading video recorded, the state 4. Fill information about a
24
video recorded should be reached first. Then if the user fulfill all the compulsory data and press on the Upload button, this action will be invoked, running in background, while the YouTube application goes to the state 1, Main screen. The invocation of the parallel action Start uploading video is almost the same as the action Start uploading video recorded; the unique difference is it should be invoked in the state 18. Fill information about a video uploaded. 4.3 Resource Description Framework Resource Description Framework (RDF) is a simple data model for writing down relations, which forms part of the semantic web layer cake.
Figure 4.3 - Semantic web layer cake. Source [27] Designed for knowledge representation, it is the standard model indicated by W3C consortium for data interchange on the Web [31]. There are two main characteristics which make RDF a good standard model: its simplicity and its universality. The first characteristic is because all the knowledge is discomposed into triples: subject, predicate and object. The subject is the one which do the action, the predicate is the action itself and the object is the one which receive the action. For example, a simple knowledge could be John has mother Susan. In this case, John is the subject, hasMother is the predicate and Susan is the object. This simplicity doesnt mean RDF is incomplete. One of the advantages of RDF lies on the invisible links that put the RDF together. Because the RDF data components could be any word, the object in a RDF data could be also the subject of another RDF data. Thus, one by one, all the RDF data could be interconnected if there is any relation between them, creating a more complex structure. The second characteristic, the universality, is possible by using URIs as global name, which guarantees no name collision will be produced between RDF knowledge. Because URI is only a string of characters, infinite URIs could be created based on any URI. This means, by having the
25
control of a URI such as URL, anyone can create an infinite number of URIs for her purpose without worry about the existence of the same URI created by others. For example, in this project, all the RDF data contains the URL of the project COSEM which this project forms part. This is, by knowing that the URL http://www.wireless.kth.se/research/projects/69-cosem is unique in the world and it is controlled by COSEM project, concatenating information after this URL and use them as part of RDF data saved in the database, the universality of the data will be guaranteed. As directly consequence of the universality, if the same URI is found in the components of different RDF data, they are considering the same. This consequence is very important because it allows different parties create different RDF knowledge about the same object without interference between them and making sure that their data will be easily merged only by according on the URI utilized. This is the reason of why RDF is highly scalable. Because of this, RDF is very useful for this project. When the database is created, the monitor program will create a URI with the information of the mobile device where the program is running as the root of the RDF structure. This URI is unique in the world and each time this URI is created on the same mobile device, they will be the same. Lately, this database could be extracted to be merged into a bigger database. By having this unique URI, in this bigger database, the monitoring information obtained from different mobile devices can be merged easily, creating historical monitor information of each mobile device separately by grouping them by the root of the RDF structure.
26
Figure 5.2.1 The interface of YouTube Monitor The interface of the program has been designed as simple as possible. It contains three buttons: Start monitoring, Stop monitoring and Exit. As the names could suggest, the button Start monitoring is used to start the monitoring process, the button Stop monitoring is used to stop the monitoring process and the button Exit is used to exit the application. There are several concepts for the interface that should be clarified: The monitoring process is a simple process. It only has two states: Started or stopped. This means if the user has already started the monitoring process, it cannot start it again. Not two monitoring
27
processes will be running in parallel. By other side, if the monitoring process has been stopped, there is no way to stopped it again. Because the monitoring process runs in background, even when the user has exited the application, it will continue running until the user press the Stop monitoring button or the background process has been killed by Android by other reasons. 5.2.2 Application installed in the Android device
Figure 5.2.2 YouTube monitor application installed in Android 2.1 The Android device has a default application manager, which could be used to check the applications status, or uninstall them. The figures below show the YouTube Monitor application information in the application manager: As the figure shown, the application uses 292 KB of the space. Notices this is the space used when no data has been generated. This means the application has recently installed and it hasnt started collecting information yet. The figure also shows the permissions required by the application. It requires the user location permission, the phone state and identity permission, the network communication permission and the system log files permission. The first three permissions are used by the Device state service to obtain the device information and monitor the user location. The last permission is used by the General Service to monitor the YouTube user actions. 5.2.3 General Overview
28
Here is the general schema about how the monitor application works:
Figure 5.2.3 YouTube monitor programs general overview Basically the monitor application has one Activity and two services. The activity is used to start and stop the services, which is shown as interface in the previous section, while the services are used to obtain the information in background. There are two different services: the device state service and the general service. The device state service obtains most of the information about the device at the beginning of the YouTube monitor program, when the user starts all the services. There is specific information, Cell id and Cell latitude, which shows the base station that the mobile device is connected, which is updated when any change of them occurs. All the possible information that can be obtained is shown in the appendix B. Among them, the most important information is: The phone number The software fingerprint The android ID The device ID They are unique data for any device. In the database they are utilized to make an entrance of RDF data unique in the world. The second service is called General Service and it is used to monitor the user actions. It utilizes the logs generated by the events buffer to identify the actual state of the YouTube Applications. That is, each time a new event log is generated, the Event Log Handler thread created by General Service will analyze the event log to see if it contains any keyword that matches with a new state, mode, general status or parallel action. If the answer is affirmative, the Event Log Handler will notify it to the YouTube Log handler and the Background log handler, then all they will analyze the logs corresponding to a specific buffer in order to get and save useful data. All the keywords are shown in the appendix C.
29
The process of saving database utilizes first a broadcast receiver which receive the intent that could come from any part of the program and which contains the RDF data to be saved. Then the broadcast receiver will interacts with the RDF Database adapter in order to save those data. Because the Intents have a unique identification and it can be sending from any part of the code, it makes the application very flexible. The code doesnt have to worry about where to send or any interactions with the database, it just has to create intent with proper identification and attach the RDF data on it, then finally sends the intent. 5.2.4 Running the program 5.2.4.1 Starting the monitor process
Figure 5.2.4.1 Starting the monitor process sequence diagram As shown in the figure of interface, the monitoring starts when the user press on the button Start monitoring. Then, the YouTube Monitor Activity, which is the interface screen, will create two services: General Service and device state service. Once the services are created, they will create several objects and interact with them. General Service will create the RDF database adapter, the Event log handler filer, the RDF Broadcast receiver, the YouTube log handler and the Background log handler. After the RDF Broadcast receiver has been created, the device state service will try to obtain all the information regarding the actual state of the mobile device and save them in the database by sending RDF intent to the RDF Broadcast receiver. All the information obtained is shown in the appendix B. Once the RDF Broadcast receiver receives the Intent, it will extract the information that it contains and save them in the RDF database by interacting with the RDF Database adapter. 5.2.4.2 On location changed
Figure 5.2.4.2 on location changed sequence diagram The figure above shows the sequence diagram when the user location has changed. The device state service will be always aware about the base station where the Android device is connected. When
30
the users device has changed the base station, the Device state service will notice it and then it will try to obtain the information about the new Base station. Once they are done, this information will be send to the RDF Broadcast receiver as intent, which will be updated in the RDF database including the information about when it has been changed. 5.2.4.3 Monitoring the user actions
Figure 5.2.4.3 Monitoring the user actions sequence diagram The most important function of the program is monitoring the user actions. Once the Event log handler is created by the General server, it will starts to capture all the logs from the event buffer and match each one of them with the keywords. If the Event Log handler detects that the state, the status or the mode of the YouTube application has been changed, it will first save the new state, states or mode in the database. Then it will invoke the methods stateChanged() present both in YouTube Log handler and Background Log handler to notify them the change made. Once they have noticed the change, all them will start to monitor the relevant data and the possible internal states. 5.2.4.4 Stopping the monitor process
Figure 5.2.4.4 Stopping the monitor process sequence diagram As shown in the figure above, if the user wishes to stop the monitor program, she can press on the Stop monitoring button and stop the processes. This button will call first the General Service to start stopping processes running in background and then call the Device state service to stop such service. Once the General Service received the command to stop the service, it will stop all the processes that it has started: Event Log handler, YouTube log handler, Background log handler, RDF Broadcast receiver and the RDF database adapter. Finally, it will stop itself.
31
5.2.5 The RDF Database The design of the database is one of the most important tasks for the software engineer. Because it means the interaction with a physical support, it is the part of the program which consume more time. Due to the YouTube monitor program runs in background, it should be transparent to the user. With this idea on mind, the author has designed a very simple database. The monitor program uses the default SQLite database which comes with Android. It has just one table with four columns, which correspond to Id, Subject, Predicate and Object of RDF data representation. The data type of id is a number, and the rest are String. It is important to clarify that all the RDF data saved in any database is unique in the world because it concatenate several information. First of all, the URL of COSEM project which this project forms part, secondly a unique ID generated by several information unique about the mobile devices, which are the device ID, the phone number if any, the software fingerprint and the Android ID and finally, the time stamp when the user action is performed to differentiate the same actions performed on different time. In order to have the data well organized, the concept of configuration and session has been introduced. When the YouTube Monitor application starts, the device state service creates an extra RDF data which contains a unique timestamp. The mission of this RDF data is creating a new configuration and links it with the mobile object. All the configuration of the device will be directly or indirectly under this RDF data. The concept of session is utilized by the service which monitors the user actions. The aim of it is to classify better the data generated by grouping all the monitor data under a session. A session is considered started when the YouTube application has reached the status Launched. And it is considered closed when the YouTube application has reached the status Finished, in other words, when the YouTube application has been killed by Android. In order to make the RDF database more understandable, an example of it has been generated. Because it is a huge image, it cannot be shown correctly in this project. Rather, it is hosted in www.jiahaoliuliu.com (http://www.jiahaoliuliu.com/2011/07/master-thesis-example-of-rdfdatabase_9279.html)
32
Figure 6.2.2 Single state evaluation As the result shows, almost all the user actions can be monitor examining the logs. There are two groups of states that the monitor application cannot know. The first group is the external states, which only has as member the state 5, Showing keyboard, which shows a keyboard on the screen.
33
There are two reasons why this state is not monitored. The first one is because the logs generated are too generic, leading a big confusion. For example, in any moment the user can hold the menu button to invoke the keyboard, which look for the information for the whole device, not only in YouTube. In this case, there is no difference between the logs generated by both states, so, from the point of view of the logs, they are the same. The second reason is because this state is highly region configuration dependent. Different regions can have implemented different keyboard to adapt to the type of character to enter. Because the time constraint of this project, it is much better focus on the more important features than look for the keyboard of all the regions of the world. The second groups of states that cannot be monitor belong to all the internal states that the YouTube application reaches in the Setting screen, which represents 5 percent of the Internal states. This is because the YouTube application saves the user preferences directly to the internal memory of the device and not generates any log. Then, it is impossible to detect those internal states watching only the logs. 6.3 Complex states evaluation 6.3.1 Introduction Once the single states evaluation is done, more complex evaluations should be done. Due to the nature of the applications, it is impossible to evaluate all the possibilities because for each cycle in the state chart, new actions of the user could be performed. In order to have finite number of evaluations, the author has design a set of 18 tests by consulting the use case chart, which evaluates most of the actions performed by the user. The use cases which are not evaluated belong to the type Get information which is: See all the categories See the videos belong to a category See the subscriptions updates See all the videos recommended See all the most viewed videos See all the most discussed videos See all the top rated videos Because all they have been tested in the single state evaluation, there is no need to do it again. There are also several things to take into account: The author assumes that the YouTube application is not working in Logged in mode. That is, when the user starts the tests, the user hasn logged in previously or, if she has logged in t previously, she has logged out before finish the application. At the end of all the evaluations, the user will go back to the main screen because it is considered as the final state. After it the user will finish the YouTube application by click on the physical home button
The set of evaluation are done by following each one of the actions in the description, one after another. For each one of the actions, the author examines if the action and its corresponding data generated are captured or not by the YouTube monitor program. Once all the actions are done, the author groups the results obtained (detected or not detected) by Transition between states, General statuses, modes, parallel actions, internal states and information
34
obtained. All in the transition between states, general statuses, modes, the invocation of parallel actions and the internal states are shown in the graph 4.2.2.2. All the possible information that could be obtained is shown in the Appendix D. 6.3.2 Evaluation 1 - Play a video This is the first of several tests done. In this test, the user is going to do the follow actions: 1. Launch the YouTube application 2. Select one of the video shown in the main screen to play it 3. Once the video has finished, she will come back to the main screen 4. Finish the YouTube application
Figure 6.3.2 Evaluation 1 Play a video In this evaluation, there are 5 transitions between states, 2 switches between general statuses and 18 types of information are obtained. All they detected correctly. 6.3.3 Evaluation 2 - Play a video extended This is an extension of the evaluation1. In this evaluation, when the user is playing the video, she will perform several actions while the video is playing. The actions are: 1. Launch the YouTube application 2. Select one of the video shown in the main screen to play it 3. When the video has been played 10 seconds, the user forwards the video. 4. After 10 seconds, the user pause the video 5. The user plays the video again. 6. After 10 seconds, the user backwards the video 7. After 10 seconds, the user changes the quality of the video (HD off) 8. After 10 seconds, the user change restores the original quality of the video (HD on) 9. After 10 seconds, the user scrolls the video to the second 10. 10. After 10 seconds, the user enables the captions for the video 11. Once the video has finished, she will come back to the main screen 12. Finish the YouTube application
35
Figure 6.3.3 Evaluation 2 Play a video extended In this evaluation, there are 5 transitions between states, 2 switches between general statuses, 8 internal states and 18 types of information. All they detected correctly. 6.3.4 Evaluation 3 Record and upload a video In this evaluation the user is going to record a video with camera and upload the video recorded. Note the process of record video (step 3) is device dependent. It depends on the application of video recording that each device has. Because of this, this process is not described. The actions are: 1. Launch the YouTube application 2. Click on the Camera button in the top-right corner 3. Record a video and click on Done 4. Fulfill all the information 5. Click on the button Upload. The YouTube application will go to the main screen automatically 6. Finish the YouTube application
Figure 6.3.4 Evaluation 3 Record and upload a video In this evaluation, there are 4 transitions between states, 2 switch between general statuses, 1 parallel action and 3 types of information. All they detected correctly. 6.3.5 Evaluation 4 Search a video In this evaluation the user is going to search the videos by keyword. The result could be empty or not depending on the keyword chosen and the videos in the YouTube server 1. Launch the YouTube application 2. Click on the Search button in the top-right corner 3. Enter a keyword or select one used for previous search. The YouTube application will show the result screen 4. Come back to the main screen by clicking on the Back button 5. Finish the YouTube application
36
Figure 6.3.5 Evaluation 4 Search a video In this evaluation, there are 4 transitions between states, 2 switches between general statuses and 9 types of information. Except the state 5, Showing keyboard, the rest could be detected. This is because the state 5, Showing keyboard is context dependent and the logs that it generates are the same as if the user holds down the physical menu button, which could lead confusion. Then it is not detected in the monitor program. 6.3.6 Evaluation 5 Upload a video The user is allowed to upload any video existence in her device. Note the process of chose a video (Step 4) is context dependent. As the evaluation 3, it depends on the application of video browser that each device has. Because of this, this step is not described. The actions are: 1. Launch the YouTube application 2. Click on the menu button 3. Choose the option Upload 4. Pick any program and choose a video to upload. 5. Fulfill all the information 6. Click on the button Upload. The YouTube application will go to the main screen automatically 7. Finish the YouTube application
Figure 6.3.6 Evaluation 5 Upload a video In this evaluation, there are 3 transitions between states, 2 switch between general statuses, 1 parallel action and 2 types of information. All they detected correctly. 6.3.7 Evaluation 6 See the information about the user account In this evaluation, the user is going logged in into her account and then logged out. 1. Launch the YouTube application 2. Click on the menu button and select My account 3. Enter the YouTube user name and the password 4. Once the user has enter her account, scroll down to see all the information 5. Click on the menu button and select Logout. The YouTube application will go directly to the Main screen 6. Finish the YouTube application
37
Figure 6.2.7 Evaluation 6 See the information about the user account In this evaluation, there are 2 transitions between states, 2 switches between general statuses, 2 modes and 3 types of information. All they detected correctly. 6.3.8 Evaluation 7 - See information about a video In this evaluation, the user is going to see the detailed information about a specific video in the main screen. The actions are: 1. Launch the YouTube application 2. Select the information about one of the videos shown in the main screen 3. Go back to the main screen 4. Finish the YouTube application
Figure 6.3.8 Evaluation 7 See information about a video In this evaluation, there are 2 transitions between states, 2 switches between general statuses and 7 types of information. All they detected correctly. 6.3.9 Evaluation 8 Rate a video In this evaluation, the user is going to rate a video in the information screen. The actions are: 1. Launch the YouTube application 2. Select the information about one of the videos shown in the main screen 3. Click on the Rate virtual button in the screen. 4. A new screen will appear asking for YouTube account. Enter the user name and the password 5. Select one of the five starts 6. Go back to the main screen 7. Finish the YouTube application
38
Figure 6.3.9 Evaluation 8 Rate a video In this evaluation, there are 2 transitions between states, 2 switch between general statuses, 1 mode, 1 internal state and 9 types of information. All they detected correctly. 6.3.10 Evaluation 9 - Read comments about a video In this evaluation, the user is going to read the comments about a specific video in the main screen. The actions are: 1. Launch the YouTube application 2. Select the information about one of the videos shown in the main screen 3. Click on the comment virtual button in the screen to see the comments relatives to the video. 4. Go back to the information screen 5. Go back to the main screen 6. Finish the YouTube application
Figure 6.3.10 Evaluation 9 Read comments about a video In this evaluation, there are 4 transitions between states, 2 switches between general statuses and 7 types of information. All they detected correctly. 6.3.11 Evaluation 10 Set a video as favorite In this evaluation, the user is going to set a video as favorite in the information screen. The actions are: 1. Launch the YouTube application 2. Select the information about one of the videos shown in the main screen 3. Click on the favorite virtual button in the screen. 4. A new screen will appear asking for YouTube account. Enter the user name and the password 5. Go back to the main screen 6. Finish the YouTube application
39
Figure 6.3.11 Evaluation 10 Set a video as favorite In this evaluation, there are 2 transitions between states, 2 switch between general statuses, 1 mode, 1 internal state and 7 types of information. All they detected correctly. 6.3.12 Evaluation 11 Set a favorite video as unfavorite Once the user can enter her account, she can see the videos she set as favorite. 1. Launch the YouTube application 2. Click on the menu button and select My account 3. Enter the YouTube user name and the password 4. Once the user has enter her account, click on View all favorites to see only favorite videos 5. Click on the information virtual button in the right side of any video 6. Click on the Unfavorite virtual button 7. Click on the back button to come back to the favorite videos list 8. Click on the back button to come back to the account information 9. Go back to the main screen by pressing the back button 10. Finish the YouTube application
Figure 6.3.12 Evaluation 11 Set a favorite video as unfavorite In this evaluation, there are 6 transitions between states, 2 switch between general statuses, 1 mode, 1 internal state and 15 types of information. All they detected correctly. 6.3.13 Evaluation 12 Share a video In this evaluation, the user is going to share a video in the information screen. Note that the actions between the step 4 and 5 are context independent. This is because the YouTube application has give the control to an external program, which is totally depending on the applications installed in the device. The actions are: 1. Launch the YouTube application
40
2. Select the information about one of the videos shown in the main screen 3. Click on the Share virtual button in the screen. 4. A new screen will appears with a list of external programs that the user can pick. Pick one of them. 5. Once the video is shared, come back to the information screen 6. Go back to the main screen by pressing the back button. 7. Finish the YouTube application
Figure 6.3.13 Evaluation 12 Share a video In this evaluation, there are 4 transitions between states, 2 switches between general statues and 7 types of information. All they detected correctly. 6.3.14 Evaluation 13 Flag a video In this evaluation, the user is going to flag a video as inappropriate in the information screen. Note that what the YouTube application does is call an external program to open a hyperlink (step 4). Because the application which will response to this call is now know forehand, it is not possible to know why the user consider the video as inappropriate because it is not possible to know which reason has the user selected. The actions are: 1. Launch the YouTube application 2. Select the information about one of the videos shown in the main screen 3. Click on the flag virtual button in the screen. 4. A list of possible reason will appears. Select one of them and click on the Flag this video virtual button. 5. Once the video is flagged, come back to the information screen 6. Go back to the main screen by pressing the back button. 7. Finish the YouTube application
41
Figure 6.3.14 Evaluation 13 Flag a video In this evaluation, there are 4 transitions between states, 2 switches between general statuses and 8 types of information. All they detected correctly. 6.3.15 Evaluation 14 Delete a video For all the videos that this user has uploaded, they can be removed from the YouTube applications. To do this: 1. Launch the YouTube application 2. Click on the menu button and select My account 3. Enter the YouTube user name and the password 4. Once the user has enter her account, click on View all my videos to see only the videos uploaded by the user 5. Press the finger on the screen and hold down the finger for 1 or 2 seconds. A context menu will appears. 6. Click on the option Delete. Once the video is removed, the screen will be refreshed. 7. Click on the back button to come back to the account information 8. Click on the back button to come back to the main screen 9. Finish the YouTube application
Figure 6.3.15 Evaluation 14 Delete a video In this evaluation, there are 4 transitions between states, 2 switches between general statuses, 2 modes, 1 internal state and 10 types of information. All they detected correctly. 6.3.16 Evaluation 15 Subscribe a channel In this evaluation, the user is going to subscribe a concrete channel. The actions are: 1. Launch the YouTube application 2. Select the information about one of the videos shown in the main screen 3. Click on the button on the right side of the video image. The YouTube application will show the channel (the user) which this video belongs 4. Click on Subscribe to subscribe the channel 5. Go back to the information screen by clicking on the back button 6. Click on the back button to come back to the main screen 7. Finish the YouTube application
42
Figure 6.3.16 Evaluation 15 Subscribe a channel In this evaluation, there are 2 transitions between states, 2 switches between general statuses, 1 mode, 1 internal state and 13 types of information is obtained. All they detected correctly. 6.3.17 Evaluation 16 unsubscribe a channel The user can unsubscribe any channel subscribed before in any moment. To do it: 1. Launch the YouTube application 2. Click on the menu button and select My account 3. Enter the YouTube user name and the password 4. Once the user has enter her account, click on View all subscriptions to see the channels that she has subscribed before 5. Select anyone of the channels on the list. 6. Click on the Unsubscribe button in the top-left corner. 7. Come back to the list of subscribed channels by clicking on the back menu 8. Click on the back button to come back to the account information 9. Come back to the main screen by clicking on the back menu 10. Finish the YouTube application
Figure 6.3.17 Evaluation 16 Unsubscribe a channel In this evaluation, there are 6 transitions between states, 2 switches between general statuses, 1 mode, 1 internal state and 9 types of information is obtained. All they detected correctly. 6.3.18 Evaluation 17 Play more than one videos per time Normally the user only can play one videos per time. The unique moment when the user can play several videos per time, one after the previous one, is using playlists. To do it: 1. Launch the YouTube application 2. Click on the menu button and select My account
43
3. Enter the YouTube user name and the password 4. Once the user has enter her account, click on View all playlists to see the playlists that the user has 5. Select anyone of the playlists which has more than one video 6. Click on the Play All button in the top-left corner. The YouTube application will starts to play all the videos 7. Once all the videos has finished, come back to the play list screen by clicking on the back menu 8. Click on the back button to come back to the account information 9. Come back to the main screen by clicking on the back menu 10. Finish the YouTube application
Figure 6.3.18 Evaluation 17 Play more than one video per time In this evaluation, there are 8 transitions between states, 2 switches between general statuses, 2 modes and 21 types of information is obtained. All they detected correctly. 6.3.19 Evaluation 18 Change the settings The YouTube application allows users to change several parameters in settings screen. To do it: In this evaluation, the user is going to set a video as favorite in the information screen. The actions are: 1. Launch the YouTube application 2. Click on menu button and select Settings 3. In the settings screen, uncheck High quality video on mobile option 4. Click on Captions font size and select Extra large option. 5. Click on Clear search history to clear search history 6. Click on Terms of Service to read the terms of service. 7. Go back to the settings screen by clicking on the back button 8. Click back button to go back to the main screen 9. Finish the YouTube application
44
Figure 6.3.19 Evaluation 18 Change the settings In this evaluation, there are 2 transitions between states, 2 switches between general statuses, 5 internal states and 1 types of information is obtained. The internal states are not detected because no logs are generated. 6.3.20 General analysis of all complex evaluations
Figure 6.3.20 General analysis of all complex evaluations Summarizing all the evaluation done, transition between states has been tested 68 times, general statuses 36 times, modes 11 times, parallel actions 2 times, internal states 14 times and 167 times the information obtained. There are also some states that cannot be detected. The 1.45% of the transition between states not detected belongs to the state 5, showing keyboard. The reason, which has been explained before, was because it is too generic and it is highly region dependent. The 26.32% of the internal states not detected corresponds to all the internal states of Settings. The reason is it doesn generate any logs, make them impossible to be detected only watching the logs. t 6.3 Conclusion All the tests went good. In the YouTube application, there are 44 states, 2 general statuses, 2 modes and 2 parallel actions. Only one of the states, 5 Showing keyboard, cannot be detected. Since the function of this state is only show the keyboard on the screen and its propose, searching a video, is correctly monitored, it is not really important to know when the keyboards are shown in the screen.
45
For the internal states, all them, except the internal states related with the Settings are detected, which represents more than 95% of the internal states detected. The internal states related with the settings, which are related to the quality of the video, the size of the captions, the search cache and the terms of service, are not so important and won influence to t the main functions of the YouTube application. If in the future they become very important, new methods of monitoring could be implemented in order to monitor them. Finally, all the possible information in the logs is obtained correctly. This will give to the monitor application a lot of information. However, this information is not complete, because the logs only indicate some property of the object that the logs are related. To have more information, all the data obtained should be analyzed.
46
Figure 7.2 Relation between data rate and QoE In the X-axis, it shows the data rate that a device could have. The unit is Mega bits per second (Mbps) and it goes from 0.1 Mbps to 20 Mbps. This data could be obtained easily through the device. In the Y-axis it shows the percentage of the users who has finish watching completely a video. This data is calculate by using the video Id to obtain the total length of the video and using the time when the user has started watching the video and the time when she stops the video. With this graph, the quality of experience could be easily measured.
47
7.3 Scenario 2 - Geographical usage and access to a concrete category All the videos on YouTube are classified into one of the 15 categories: Cars & Vehicles, Comedy, Education, Entertainment, Film & animation, Gaming, Howto & style, Music, News & Politics, Nonprofits & Activism, People & Blogs, Pets & animals, Science & technology, Sport and Travel & events. Since the id of the videos played by the user is known, with YouTube API, it is very easy to see the category of the videos played by such user. At the same time, the identification and the latitude of the base station that the user is connected is also collected and updated if any change occurs. Because this identification is unique for a given operator, with that data, it is possible to retrieve the geographical information by accessing a global database. Combining that information, a thirst party can obtain the information about the preferences of the users in a concrete region.
Figure 7.3 Video played in Kista since 2011.06.23.12.49 to 2011.06.23.12.50. Image captured from Google Maps Video Id Time Category 8XXQeov980Y 2011.06.23.12.49 Howto & Style rllsDOwdmfA 2011.06.23.12.55 Science & Technology JOD0099UCj8 2011.06.23.12.52 Science & Technology izlXF2Acn2Y 2011.06.23.12.52 Science & Technology TooxpzYQb3s 2011.06.23.12.50 Science & Technology 7wwoasfEqPc 2011.06.23.12.50 Howto & Style Table 7.3 Video played in Kista since 2011.06.23.12.49 to 2011.06.23.12.50
48
A visual example is shown above. In this example, for a technology company concentrated place like Kista, Stockholm (Sweden), the people could prefer the video that comes from the category Science & technology, instead of Pets & Animals. In order to improve the QoE, the base stations could be more intelligent by having an internal memory with them. If the videos from a specific category are repeatedly played for a concrete region, the base station from that region could save the most viewed videos of such category into the internal memory. When another user requests that kind of video, the base station requested could have that video already saved in the internal memory. Hence, the traffic generated will be just between the base station and the final user, the server doesnt have to be involved. This could lead a big amount of bandwidth save depending on the behavior of the user, make the base stations more efficient. 7.4 Scenario 3 - Better QoS for a concrete user. Beside the macro usage of the information obtained, they can be used also to offer better QoS and QoE to a concrete user. For instance, a particular user can be monitored and the mobile operators can obtain information about the base stations that this particular user usually connects. Because all the RDF data saved in the database contains a ID which is unique in the world, the data analysis process could be totally user oriented: Based on the Base station that this user normally connects and based on the category of the video that this user normally watch, the mobile operators can charge a set of videos belong to the most common categories that this user has watched in the internal memory of the Base stations where this user normal connects. The finality of all them is based on the historical information of a specific user, predicts a concrete user behavior and her preferences, have the information that this user could requests already saved before the user request them, hence, offer a better QoS and QoE. Here is a visual example of the video consumption of a specific user:
49
Figure 7.4 Video traffic of a concrete user from 2011.06.23.10.30 to 2011.06.23.11.30. Image captured in the web page of SL (www.sl.se) In this example, the user 1 goes from Professorslingan, Stockholm (Sweden) to Kista, Stockholm (Sweden). While this user is traveling with the public transport, she has watched 5 videos. Video Id Time Category Y85Rd5E61V4 2011.06.23.10.30 Science & Technology 6C-xDCCqJng 2011.06.23.10.40 Education LESROkpWvFA 2011.06.23.11.05 Howto & Style 4bkiGVqqX_U 2011.06.23.11.25 Howto & Style Ya7IhijXYUQ 2011.06.23.11.30 Science & Technology Table 7.4 Video traffic of a concrete user from 2011.06.23.10.30 to 2011.06.23.11.30. As the previous case, if the user behavior doesnt change, the most part of the communication will be just between this user and the base station where this user is connected, and then a better QoS and QoE could be achieved. 7.5 Scenario 4 Probability of usage of YouTube through the day Another important way to improve the QoE and QoS is using the concept of session to know when the user normally watches the videos. A session is considering starts when the user starts the YouTube application after the last session has been finished. And a session is consider finished when the Android system decide to kill the YouTube application. An example of the data collected is shown in the below graph
50
Figure 7.5.1 Number of sessions per hour for a concrete user in one month For this particular user, the data collected in a specific month shows that there are four peaks hours when this user starts a session: between 8 and 9; at 12 oclock, at 19 oclock and at 21 oclock. Having this data, the graph of the probability of access to YouTube application could be calculated:
Figure 7.5.2 Probability of starts a session per hour for a specific user The peak hours shows in this graph matches with the pick graph showed in the previous graph. When it is 21 oclock, it is the hour with highest probability for this user to starts a session (11.24%), followed by 9.47% when it is 19 oclock. Another important peak is between 7 and 8 oclock of the morning, when this user goes to work (7.69% and 8.87%, respectively). This graph can be constantly updated by analyzing the data that this user generates, making sure that the graph will be always accurate. By knowing the probability for a concrete user to starts a session, and also the category of the videos that this user normally plays, it will be easier for the mobile operators to pre-fetch the videos that this user could require in nearly future in the base station that this user normally connects. 7.6 Scenario 5 Prediction of the favorite videos of the user In the YouTube application analyzed, there are a total of 44 states. The user can play video from 29 of them. Therefore, for a concrete user, there could be a ranking of the states where the user normally goes to play a video. For example, the number of video played for a concrete user in one month could be:
51
Figure 7.6.1 States where the videos played come from Based on that information, a percentage graph could be created and constantly updated with new information of the user behavior.
Figure 7.6.2 States where the videos played come from Percentages
52
Using those graphs, specific behavior of the user could be monitor. For example, observing those graphs, it seems that for a concrete month, this user prefer the videos which come from the state Show a category Science & Technology and the videos which come from the state Show a category Howto & Style instead of the videos that come from the state Show a category Cars & Vehicle and the state Show a category Pets & Animals. By knowing this information, the top video played from a concrete state could be pre-fetched inside of the mobile device of the user. Then, when the user wants to watch such video, because it is already in the mobile device, no data connection will be generated. 7.7 Conclusion The information obtained about the user behavior could be useful to better explore the existing infrastructure more effectively. The scenario shown in this section is only few example of its usage. Because an extensive information about the context and the user behavior are collected, new way of exploit this information could be created depending on the need of each case.
53
54
55
8.3 Discussion Although the good results obtained in the evaluation, there are several points that the author want to comment about the evaluation. First of all, the number of device tested, in this case is only 1. In this sense, theoretically, all the YouTube application of a concrete version installed in a concrete version of Android System should have the same behavior, which is independent to the hardware which they are running. It could be better to prove this by running the evaluation in several mobile devices with different hardware to demonstrate this. Secondly, the evaluations done are about the accuracy of the monitor program. For a monitor program, the transparency is also important. The user shouldnt experiment delays when the monitor program is running in the background. To measure it, a big number of tests on most of the mobile devices in the market should be done. Because the constraint of time, this wasnt possible. 8.4 Conclusion To correctly monitor the user actions could play a very important role for the mobile operators in order to implement a smarter, faster and convergent network. In this project, the author has chosen Android system and YouTube to show the possibility to implement a monitor program which is totally transparence to the user. This is possible by capturing the logs that the YouTube application generates. In this sense, the monitor program plays as a detective, who by collecting all the glue that the YouTube application has left, try to figure out what the user have done. As the evaluation has shown, most of the user actions can be monitored. All those data are collected in the local RDF database, which can be shared easily on Internet because they have identifiers which make them unique in the world. Once this possibility is demonstrated, better monitoring tools can be build which are more efficient and more complete. With the data they collect, all the questions in the section 2 can be answered, improving the actual situation of the mobile operators. 8.5 Future works 8.5.1 New version of YouTube At the time we are producing this project, a new version of YouTube can be downloaded in the Android Market. The newest version is 2.1.6 and it only runs in the phones with Android 2.2 or later. It has been downloaded between 50.000 and 100.000 times, which represents a big number of users. The engineers whom have designed it have built everything from the ground. [1] There are also changed in the way the new YouTube program produces logs, which make harder to monitor the user actions. In the future, the viability of continue using this method on new versions of YouTube should be studied. 8.5.2 Other video sharing applications Another big source of video traffic on Internet, Netflix, has launched a program which enables the access to its movie database through Android. [25]. This could mean a new revolution of video traffic on Internet. Because of this, in a close future, the function of this program could be also studied. With those programs, it seems the tendency of the market is each web-sharing service offer her own programs that the user only can watch videos on their portal. Because there are video-sharing
56
services others than YouTube and Netflix, in order to cover more users and have more complete data, other video sharing application should be also studied and monitored. 8.5.3 RDF data analysis As the author has explained in the section of implementation, the YouTube monitor program only utilized the logs generated to capture the states of YouTube application. Those logs are depending on the actual state which the YouTube application is and the information that the coders of YouTube application want to be known. Because of this, they arent complete as it should be. The logs can be utilized to detect the main characteristics of the states and the transition of the states, but some detail information which could be essential is not obtained. This issue is especially severe when the user is using context menu in the video list. This is, in a video list, the user selects one of the elements and keeps holding down the finger on the screen, then a new menu called context menu will appear. Although all the options that the user chooses in the context menu can be detected, there is no way to know which element in the video list the user has selected. This is why the data should be analyzed once captured. The analysis could link past states with the actual state, discovering hidden relations and making the information more complete.
57
58
Bibliography
[1] Doronichev, Andrey, December 2010, YouTube 2.1 App Now. Available on Android [online], Google Mobile Blog. Available from: http://googlemobile.blogspot.com/2010/12/youtube-21-appnow-available-on-android.html [Accessed 21 June 2011] [2] Halliday, Josh and Arthur, Charles, August 2010, Mobile operators signal end of flat-rate data traffic as app use grows [online], The guardian. Available from: http://www.guardian.co.uk/technology/blog/2010/aug/23/net-neutrality-mobilephones[Accessed 21 June 2011] [3] Kang, Cecilia, June 2011, Verizon wireless to start charging by bits, end flat-rate plans [online], The Washington post. Available from: http://www.washingtonpost.com/blogs/posttech/post/verizon-wireless-starts-charging-by-bits-end-of-flat-rateplans/2011/06/21/AGH1eTeH_blog.html [Accessed 21 June 2011] [4] Pietro Lungaro, Cristobal Viedma, Zary Segall and Pavan Kumar, An Experimental Framework to Investigate Context-aware Schemes for Content Delivery, in Proceedings of VTC2011-Fall in San Francisco. [5] Pietro Lungaro and Zary Segall, Application-centric Content Delivery Schemes for Future Wireless Networks, in Proceedings of PIMRC 2011, Toronto. [6] Pietro Lungaro, Zary Segall and Jens Zander, ContextShift: a Model for Efficient Delivery of Content in Mobile Networks, in Proceeding of Wireless Communication & Networking Conference (WCNC10), Sydney, April 2010 [7] Pietro Lungaro, Zary Segall and Jens Zander, Predictive and Context-based Multimedia Content Delivery in Future Cellular Networks, in Proceeding of the Vehicular Technology Conference (VTC10), Taipei, May 2010 [8] Pietro Lungaro, Zary Segall and Jens Zander, Context-aware RRM for Opportunistic Content Delivery in Cellular Networks, in Proceedings of the 3rd international conference on Communication Theory, Reliability and Quality of Service (CTRQ10), Athens, June 2010 [9] Pietro Lungaro, Zary Segall and Jens Zander, ActiveCast a Network and User Aware Mobile Content Delivery System, In Proceedings of the 2nd International Conference on Ubiquitous and Future Networks (ICUFN10), Jeju Island, Korea, June 2010 [10] Luis Martinez, Pietro Lungaro and Zary Segall, Novel QoE-centric Resource Management Schemes for Future Cellular Systems, in Proceedings of 10th Scandinavian Workshop on Wireless Ad-hocNetworks (ADHOC 11). [11] Meier, Reto, Professional Android 2 Application development, Wiley Publishing, Inc, 2010. [12] Nickinson, Phil, July 2010, Know your buttons [online], Android Central. Available from: http://www.androidcentral.com/know-your-buttons [Accessed 22 June 2011] [13] Pavan Kumar, Pietro Lungaro, Vikrant Nandakumar and Zary Segall, A Novel Experimental Framework to Investigate Context-aware Solutions for Opportunistic M2M Content Delivery, in Proceedings of 10th Scandinavian Workshop on Wireless Ad-hoc Networks (ADHOC 11).
59
[14] Reuters, November 2006, Google closes $A2b YouTube deal [online], The Age. Available from: http://www.theage.com.au/news/Busness/Google-closes-A2b-YouTubedeal/2006/11/14/1163266548827.html [Accessed 22 June 2011] [15] Schnfeld, Erick, May 2011, Netflix now the largest single source of Internet Traffic in North America [online], Techcrunch. Available from: http://techcrunch.com/2011/05/17/netflix-largestinternet-traffic/ [Accessed 22 June 2011] [16] Yuhe Shi, David Gregg, Andrew Beatty, M. Anton Erti, Virtual Machine Showndown: Stack Versus Registers, University of Dublin, Trinity College and Institut f Computersprachen TU r Wien, 11-12 June 2005. Available from: http://www.usenix.org/events/vee05/full_papers/p153yunhe.pdf [Accessed 22 June 2011] [17] Zander, Jens. From "Walled Gardens" into the "Telecom Chaos Operator Challenges in Future Mobile Broadband Systems, Royal technique university, Sweden, 2010 [18] Various, Seizing the opportunity in Mobile Broadband A global perspective, Acision Innovation Assured, February 2011. [19] Various, Alexa top sites. The top 500 sites on the web [online], Alexa Inc. Available from: http://www.alexa.com/topsites [Accessed 21 June 2011] [20] Various, April 2009, What is Android? [online], Android Developers. Available from: http://developer.android.com/guide/basics/what-is-android.html [Accessed 21 June 2011] [21] Various, 2011, Google's Android becomes the world's leading smart phone platform [online] Canalys. Available from: http://www.canalys.com/pr/2011/r2011013.html [Accessed 21 June 2011]. [22] Various, June 2011, Cisco Visual Network Index: Forecast and methodology, 2010 2015 [online], Cisco Systems, Inc. Available from: http://www.cisco.com/en/US/solutions/collateral/ns341/ns525/ns537/ns705/ns827/white_paper_c11 -481360_ns827_Networking_Solutions_White_Paper.html [Accessed 22 June 2011] [23] Various, Google phone gallery [online], Google Inc. Available from: http://www.google.com/phone/#manufacturer=all&category=all&carrier=all&country=all&reset_fil ters=1 [Accessed 21 June 2011] [24] Various, October 2010, Netflix Announces Q3 2010 Financial results [online], Netflix. Available from: http://netflix.mediaroom.com/index.php?s=43&item=373 [Accessed 21 June 2011] [25] Various, May 2011, Netflix launch on Android [online], The Netflix blog. Available from: http://blog.netflix.com/2011/05/normal-0-false-false-false-en-us-x-none.html [Accessed 21 June 2011] [26] Various, May 2011, Sandvines Spring 2011 Global Internet phenomena report reveals new Internet trends [online], Sandvine. Available from: http://www.sandvine.com/news/pr_detail.asp?ID=312 [Accessed 21 June 2011] [27] Various, February 2011, Resource Description Framework [online], W3C Semantic web. Available from: http://www.w3.org/RDF/ [Accessed 20 June 2011]
60
[28] Various, Android (Operating system) [online], Wikipedia. Available from: http://en.wikipedia.org/wiki/Android_(operating_system) [Accessed 21 June 2011] [29] Various, Comparison of Android devices [online], Wikipedia. Available from: http://en.wikipedia.org/wiki/Comparison_of_Android_devices. [Accessed 21 June 2011] [30] Various, IBM Simon [online], Wikipedia, Available from: http://en.wikipedia.org/wiki/IBM_Simon. [Accessed 21 June 2011] [31] Various, Semantic Web Stack [online], Wikipedia. Available from: http://en.wikipedia.org/wiki/Semantic_Web_Stack [Available from 21 June 2011] [32] Various, Key YouTube stats @ 5 years [online], YouTube. Available from: https://sites.google.com/a/pressatgoogle.com/youtube5year/home/5-year-metrics. [Accessed 21 June 2011]
61
62
No video will be shown if the user hasnt subscribed to any channel. State 9. More recommended As the state 8, this state is only reachable if the user has logged in. It shows a video list with the videos that YouTube thinks the user will like. The analysis is done by sending all the video played by the user periodically to the YouTube datacenter. State 10. Most viewed This is one of the states that the Application can go even when the user is not logged in. Depending on the locale configuration of the device, it will display the most viewed videos on that region / country. State 11. Most discussed This state is also reachable if the user hasnt logged in. The most discussed videos are the user that has been most commented in YouTube database. In this case, the videos are also classified depending on the locale configuration of the device. State 12. Top rated As most viewed and most discussed, this state is also user independent. Both in the server and in the mobile application, the user is offered the opportunity to rate a video. This screen shows the videos which have been best rated by a particular region / country. State 13. Play video If the user has selected any video to be played, this state will be reached. In this state, a video buffer is going to be loaded, independently if the user has started playing video o no. As all the video streaming applications, there is no need to fulfill the buffer to play a video. In this state, the user can perform the actions that normally can be performed in a video reproducer such as pause the video, continue play the video, see the caption or changing the position where the video should be played from. All the possibilities are show in the state diagram in the section 4.2.2.2.2 as internal state. Normally the YouTube program only plays one video per time, but more than one video could be played, one after another, by using the play all option in the playlist (State 24). State 14. Video playing finished Once the video playing has been finished, this state will be reached. If the user has chosen to play more than one video from the playlist state, only when all the video playing has been finished, YouTube program will arrive to this state. In this screen, beside the normal options of a video list, the user can also decide to play the last video played again. State 15. Read comments If the user wishes to read any comment of a video, she should use the comments option appears both in some screens and in some context menus, if any. Notices in this version of YouTube application, there is not possibility to publish directly the comments from the Android device, just read them. State 16. Show information If the user is interested in any video, she can see more information about a concrete video. The information shown is: Title
64
Screen cast Number of rate starts Number of rates made Number of views The channel (the user who has uploaded the video) The date when the video has been uploaded Description Category Tags URL Beside that information, a video list with videos related with the video which the information is shown will also appear. State 17. Upload video If the user decides to upload any video existing in the device, she must go to this state. This state is context dependent because the YouTube application calls an external video browser application to choose the video to upload. State 18. Fill information about a video uploaded Once the video is chosen, the user can enter all the information about the video. As the state 4, fill information about a video recorded, the user doesnt need to be logged in to reach this state. The mobile device itself will read the account information set in the device and let the user choose the proper one. Once the video is selected and all the compulsory information filled, the user can start uploading the video. As the state 4, the process of uploading video is parallel to the YouTube application. State 19. My account Only when the user has logged in, she can reach to this state. The information shown in this state is: The nick of the user (Channel name) The number of the videos which has been set as favorite by the user The number of channels subscribed The number of video uploaded The number of channel viewed The number of the subscribers The user image A list of favorite videos A list of main channel subscribed The users playlists The video that the user has been uploaded.
In this state, because there are a set of favorite videos and a set of video uploaded by the user, the context menu can be displayed by press on any of those videos and hold down the finger. In this case, the context menu has some special options. For any favorite video, it offers the possibility to unfavorite it. For the video uploaded by the user, it offers the possibility to delete it from the user video uploaders list. This is the unique state in the YouTube application where the user can log out. State 20. Favorite videos
65
This state shows all the videos that has been set as favorite by the user as a video list. At begging, a list of video will be shown. If the user scrolls down, more video will be loaded. State 21. My subscriptions This state shows all the channels that the user has subscribed. In YouTube, all the users are considered as a channel. This means anyone can subscribe to any user and follow all the videos that this user uploads. Like the state 20, these videos are shown in a videos list. State 22. Show a subscribed / an unsubscribed channel Show the information relative to a channel. This channel could be a subscribed channel or an unsubscribed channel. The information displayed for a concrete channel is: Channels title Number of times that the channels has been viewed Number of subscribers of a channel The image of the channel All the videos relative to a channel. As curiosity, the difference between a channel subscribed and an unsubscribed channel is not so clear. It is very easy to select a video from a subscribed channel, and then see the channel of that video. Then a subscribed channel will become to an unsubscribed channel because the screen show us the possibility to subscribe that channel again. State 23. My playlist This state shows all the playlist that has been created before. It is important to say that in this version of YouTube application, the user cannot modify anything about a playlist. What the user can do is just read information about it and plays the videos in it. State 24. Show a playlist Show all the video contained in a concrete playlist. Other information is also shown. They are: Title of the playlist The number of the videos The sum of the length of all the videos A picture of the playlist All the videos in the video list format. This is the unique moment in the application when the user can play more than one video per time, one after another. This is possible using the Play all button shown in the screen. State 25. My videos It shows all the videos that have been uploaded to the YouTube server, as well as all the videos that has been failed to upload. State 26. Categories It shows all the possible categories that the videos of YouTube has been grouped, which matches to the categories in the server. States 27 - 41. Show a category There are 15 different categories which can be chosen from the state 26. Each one of the categories is considered an independent state. The categories are: 27. Cars & Vehicles
66
28. Comedy 29. Education 30. Entertainment 31. Film & Animation 32. Gaming 33. Howto & Style 34. Music 35. News & Politics 36. Nonprofits & Activism 37. People & Blogs 38. Pets and Animals 39. Science & Technology 40. Sport 41. Travel & Events
All they are presented as a video list. The unique difference between them is the type of the videos shown in such video list. State 42. Settings It contains all the settings that the user can set. They are: High quality video on mobile checked High quality video on mobile unchecked Caption font size Clear search history The user also can read the terms of service or see which version of YouTube application is running. State 43. Share a video If the user wishes to share a concrete video, she can use this state. This invokes a call to all the compatible applications installed in the device which has the share function and show them in the screen as a list. Then the user just has to choose one of them. State 44. Flag a video This state is reached when the user consider a video as inappropriate. There are several reasons behind, which could be: Sexual content Violent or repulsive contents Hateful or abusive contents Harmful dangerous acts Child abuse Spam Infringes my rights. Entering this state makes the Android device opens a browser that shows the YouTube flag web page instead of an internal state. General note about the states Notice there is several states which has the same number. They are the state 7. Search result Empty/Ok and 22. Show a subscribed / an unsubscribed channel. Since the monitor application is driven from the log buffer and those states are exactly the same from the log buffer point of view, there wont be any difference when the search result is empty or not, or when the channel shown has been subscribed by the user before.
67
General status 1. Launched This is the general status of YouTube if the application has been launched. In this general status, the user can interact with YouTube program. General status 2. Finished If the user has exits the YouTube program and the Android System decide to kill it, YouTube program will be consider as finished. No interaction can be performed in this general status. Mode 1. Logged in Some states such as My account and some internal states such as Set a video as favorite require the user to be logged to be reached. Once this mode has been activated, until the user has logged out explicitly, the YouTube program will remain in this mode, even after the YouTube application has been killed. All the actions that the user can perform when she in the Logged out mode can be performed in the Logged in mode. Mode 2. Logged out In this mode, YouTube program will show a subset of the states that can be reached with Logged in mode. All the actions that are not related with the user account can be performed in this mode. Parallel action 1. Start uploading a video recorded After the user has recorded a video and fill all the compulsory information, this action can be started. This is a parallel action, which means at the same time that the video is being uploading, the YouTube program can be used by the user to interact with her. Parallel action 2. Start uploading a video These actions will be started if the user has chosen an existing video in her mobile device and she has filled all the compulsory information about such video. As the parallel action 1, the user can continue interact with the YouTube program while the mobile device is uploading the video.
68
Android.os.Bui The name of the underlying board, like GoldFish ld Android.os.Bui The brand (e.g. carrier) the software is customized for, if ld any Android.os.Bui The name of the instructions set (CPU type + ABI ld conventions) of native code Android.os.Bui The name of the industrial design ld Android.os.Bui A build ID string meant for displaying to the user ld Android.os.Bui A string that uniquely identifies this build ld Android.os.Bui ? ld Android.os.Bui Either a changeList number, or a label like M4-rc20 ld
Manufactu Android.os.Bui The manufacturer of the product/hardware rer ld Model Product Tags Time Android.os.Bui The end-user-visible name for the product ld Android.os.Bui The name of the overall product ld Android.os.Bui Comma-separated tags describing the build, like ld unsigned, debug Android.os.Bui ? ld
69
Source
Comments
API 1 1 4 1
Android.os.Bui The type of build, like user or eng ld Android.os.Bui The type of the user. ld android.os.Buil The current development codename, or the string REL d.VERSION if this is a release build android.os.Buil The internal value used by the underlying source control d.VERSION to represent this build. E.g. a perforce change list number or a git has android.os.Buil The user-visible version string. E.g. 1.0 or 3.4b5 d.VERSION android.os.Buil The user-visible SDK version of the framework in its raw d.VERSION String representation android.os.Buil The user-visible SDK version of the framework. Its d.VERSION possible values are defined in Build.VERSION_CODES. See the table of Versions in the annex android.privide It is a 64-bit number randomly generated when the r.Settings.Secu Android devices is booted for the first time. It should re remain constant for the lifetime of the device
1 1 4
Android_I D
android.telepho The type of the phone. It could be CDMA, GSM or ny.TelephoyM NONE anager android.telepho The unique hardware identification of the device. IMEI ny.TelephoyM for GSM or MEID for CDMA anager android.telepho The software version of the phone. For example, the ny.TelephoyM IMEI/SV version for GSM phones. anager
Device Id
Software version
70
Source
Comments
API 1
android.telepho The phone number of the device. It could be null if the ny.TelephoyM user havent enter the phone number. anager
java.util.Locale The combination of language, country and variant. The ISO format for language is two lower letters and the ISO format for country is two upper letters. See annex II for the table of Locale. java.util.Locale The country code for locale. If the country hasnt been set, it will return . java.util.Locale The language code for locale. If the language havent been set, it will return
Country Language
1 1
B.1.4 Cell connected information Property Cell Location Cid Cell Location Lac Source Comments API
android.telepho The id of the cell which the device is connected. Return -1 1 ny.TelephoyM if it is unknown anager android.telepho The location area code of the cell which the device is ny.TelephoyM connected. Return -1 if it is unknown. anager 1
android.telepho Show the actual data activity of the device. It could be: ny.TelephoyM DATA_ACTIVITY_IN, DATA_ACTIVITY_OUT, anager DATA_ACTIVITY_INOUT or DATA_ACTIVITY_NONE android.telepho Show if the actual data state of the device. It could be: ny.TelephoyM DATA_CONNECTED, DATA_CONNECTING, anager DATA_DISCONNECTED, DATA_SUSPENDED
Data state
Source
Comments
API 1
android.telepho The connected network country ISO code. It called MCC: ny.TelephoyM Mobile Country Code. Unreliable in CDMA connection anager android.telepho The connected network operator ID. It shows MCC ny.TelephoyM (Mobile Country Code) and MNC (Mobile Network anager Code). Unreliable in CDMA connection android.telepho The alphanumeric name of the operator id ny.TelephoyM anager
Network Type
android.telepho The radio technology used for the connection. It could be: ny.TelephoyM NETWORK_TYPE_1xRTT, anager NETWORK_TYPE_CDMA, NETWORK_TYPE_EDGE, NETWORK_TYPE_EVDO_0, NETWORK_TYPE_EVDO_A, NETWORK_TYPE_GPRS, NETWORK_TYPE_HSDPA, NETWORK_TYPE_HSPA, NETWORK_TYPE_HSUPA, NETWORK_TYPE_UMTS or NETWORK_TYPE_UNKNOWN android.telepho The unique subscriber ID. For example, IMSI for GSM ny.TelephoyM anager
Subscriber ID
Is Network android.telepho Confirm if the device is actually Roaming or not Roaming ny.TelephoyM anager
B.1.7 SIM - Subscriber Identity Module This information will be obtained only when the type of the mobile phone is GSM. The information regarding the SIM is available when the SIM state is ready.
72
Source
Comments
API 1
android.telepho The actual state of the SIM. Only available when the type ny.TelephoyM of the phone is GSM. It could be: anager SIM_STATE_ABSENT, SIM_STATE_NETWORK_LOCKED, SIM_STATE_PIN_REQUIRED, SIM_STATE_PUK_REQUIRED, SIM_STATE_UNKNOWN, SIM_STATE_READY. android.telepho The ISO code of the SIM card. Only available if the type ny.TelephoyM of the phone is GSM and the state of the phone is ready. anager android.telepho The id of the operator of the SIM card. Only available if ny.TelephoyM the type of the phone is GSM and the state of the phone is anager ready. android.telepho The name of the operator of the SIM card. Only available ny.TelephoyM if the type of the phone is GSM and the state of the phone anager is ready.
SIM Country
SIM Serial android.telepho The serial number of the SIM card. Only available if the Number ny.TelephoyM type of the phone is GSM and the state of the phone is anager ready.
B.1.8 Screen information Note: Since the service doesnt know the screen information, this information will be shown in next version Property Orientatio n Pixel format Refresh rate Density Source Comments API 1 1 1 1
android.view.D The actual orientation of the screen. 0 if it is vertical and isplay 1 if it is on Horizontal android.view.D The pixel format of the screen. See Annex III for more isplay information android.view.D The refresh rate in frames per second (fps) isplay android.util.Di splayMetrics android.util.Di splayMetrics He scaling factor for the Density Independent Pixel unit, where one DIP is one pixel on an approximately 160 dpi screen. The screen density, in Dots Per Inch. It could be: DENSITY_LOW, DENSITY_MEDIUM or DENSITY_HIGH
73
Density DPI
Source android.util.Di splayMetrics android.util.Di splayMetrics android.util.Di splayMetrics android.util.Di splayMetrics android.util.Di splayMetrics
API 1
The exact physical pixels per inch of the screen in the X dimensions The exact physical pixels per inch of the screen in the Y dimensions
Y DPI
B.1.9 General network information Property Network Type State Source Comments API 1
android.net.Net The type of the connection does the connection below. It workInfo could be Mobile or Wi-Fi android.net.Net The actual state of the connection. See annex IV for more workInfo information android.net.Net The detailed state of the actual connection. See annex IV workInfo for more information
Detailed State
B.1.10 Wireless network information Information about the wireless connection Property Wi-Fi enabled Source Comments API 1
74
Source
Comments
API
android.net.wif The current wifi state. It could be: 1 i.WifiManager WIFI_STATE_DISABLED, WIFI_STATE_DISABLING, WIFI_STATE_ENABLED, WIFI_STATE_ENABLING. WIFI_STATE_UNKNOWN. android.net.wif The basic service set identifier of the current access point. i.WifiInfo. If no access point connected, it will return null android.net.wif The service set identifier (SSID). It will be null if the i.WifiInfo. device is not connected to any network android.net.wif Specify if the access point does or not broadcast its SSID. i.WifiInfo. android.net.wif The unique small integer ID that the configured network i.WifiInfo. has. It is used to identify the network when performing operations on the supplicant. It will be -1 if there is the device is not connected to any network 1
BSSID
SSID
IP Address android.net.wif Get the IP address of the Access Point i.WifiInfo. Link Speed Link Speed unit Rssi android.net.wif The current link speed (Maximum) i.WifiInfo. android.net.wif The unit of the current link speed. i.WifiInfo. android.net.wif The received signal strength indicator. i.WifiInfo. android.net.wif The detailed state of the supplicants negotiation with an i.WifiInfo. access point. See Annex IV for more information
Supplicant State
75
Source
Comments
API 1
android.net.wif Map a supplicant state into a fine-grained network i.WifiInfo. connectivity state. See Annex IV for more information
Wlan MAC
B.2 Device state change monitor States of the mobile phone monitored B.2.1 Cell information Property Cell Location Cid Cell Location Lac Source android.teleph ony.PhoneStat eListener android.teleph ony.PhoneStat eListener Comments Any change on the Id of the cell which the device is connected will be reported Any change on the Local area code of the cell which the device is connected will be reported API 1
B.3 Additional information related with the device information obtained B.3.1 Android System API Level Table Platform Version Android 3.1 Android 3.0 Android 2.3.4 Android 2.3.3 Android 2.3 Android 2.2 Android 2.1 Android 2.0.1 Android 2.0 Android 1.6 Android 1.5 Codename HONEYCOMB HONEYCOMB GINGERBREAD_MR1 GINGERBREAD_MR1 GINGERBREAD_MR1 FROYO ECLAIR_MR1 ECLAIR_0_1 ECLAIR DONUT CUR_DEVELOPMENT
76
API Level 12 11 10 10 9 8 7 6 5 4 3
API Level
77
78
com.google.android 05-16 19:44:01.366 I/am_on_resume_called( 9121): .youtube.HomeActi com.google.android.youtube.HomeActivity vity com.android.camer a.ServiceEntry com.android.camer a.ServiceEntry 05-16 19:46:59.606 I/am_on_resume_called( 9314): com.android.camera.ServiceEntry 06-04 16:46:37.932 I/am_on_paused_called( 6351): com.android.camera.ServiceEntry
Events
Events
Events
am_on_resume_ called
com.google.android 05-16 20:35:59.106 I/am_on_resume_called( 9850): .apps.uploader.clien com.google.android.apps.uploader.clients.youtube.YouTubeSettingsActivit ts.youtube.YouTub y eSettingsActivity (See note 1)
79
# 5
Buffer -
Tag
Example
Events
am_create_activi com.google.android 05-16 19:48:04.176 I/am_create_activity( 98): ty .youtube/.VideoList [1152811448,92,com.google.android.youtube/.VideoListActivity,android.in Activity tent.action.SEARCH,,,268435456] android.intent.actio n.SEARCH am_on_resume_ called com.google.android 05-16 19:48:04.536 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 19:48:04.376: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/vi url=[http://gdata.youtube.com/feeds/api/videos?format=2%2C3%2C9&maxdeos? results=9&q=rabbit&safeSearch=strict&start-index=1&v=2]. &q= &v= com.google.android 05-16 19:53:52.056 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 19:53:52.016: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/us url=[http://gdata.youtube.com/feeds/api/users/default/newsubscriptionvideos? ers/default/newsubscr format=2%2C3%2C9&max-results=9&safeSearch=strict&startiptionvideos index=1&v=2]. &v=
Events
Main
YouTube
am_on_resume_ called
Main
YouTube
80
# 9
Buffer Events
Keyword
Example
com.google.android 05-16 19:55:08.566 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 19:55:08.546: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/us url=[http://gdata.youtube.com/feeds/api/users/default/recommendations?form ers/default/recommen at=2%2C3%2C9&max-results=9&safeSearch=strict&startdations index=1&v=2&video_id=7f8y4SR9mjU%2CImUTvk8LBmA%2CSEBLt6K &v= d9EY%2CDCicNdhcoZw%2CficwZQYmRLE%2CR6CvzUDsOFQ%2CLb OOPKBg0iA%2Cl1ZCccf78Ck%2CBYhxBwMY-5c]. com.google.android 05-16 19:56:24.686 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 19:56:24.646: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed?for ndardfeeds/ mat=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed index=1&time=this_week&v=2]. &v= com.google.android 05-16 19:57:42.136 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity
Main
YouTube
10
Most viewed
Events
am_on_resume_ called
Main
YouTube
11
Most discussed
Events
am_on_resume_ called
81
State
Buffer Main
Tag YouTube
Keyword
Example
url=[http://gdata.yout 05-16 19:57:42.126: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_discussed?f ndardfeeds/ ormat=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_discussed index=1&time=this_week&v=2]. &v= com.google.android 05-16 19:58:28.066 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 19:58:28.056: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/top_rated?format= ndardfeeds/ 2%2C3%2C9&max-results=9&safeSearch=strict&starttop_rated index=1&time=this_week&v=2]. &v= com.google.android 05-16 19:59:11.996 I/am_on_resume_called( 9121): .youtube.PlayerActi com.google.android.youtube.PlayerActivity vity handleStop 06-01 18:53:16.458: INFO/PlayerDriver(2892): PlayerDriver::handleStop
12
Top rated
Events
Main
13
Play video
Events
14
Main
15
Events
com.google.android 05-16 19:59:59.446 I/am_on_resume_called( 9121): .youtube.Comment com.google.android.youtube.CommentsActivity sActivity com.google.android 05-16 19:59:33.296 I/am_on_resume_called( 9121): .youtube.VideoDet com.google.android.youtube.VideoDetailsActivity ailActivity
82
16
Events
# 17
Buffer Events
18
Events
com.google.apps.u 05-16 21:22:41.651 I/am_on_resume_called(10336): ploader.clients.yout com.google.android.apps.uploader.clients.youtube.YouTubeSettingsActivit ube.YouTubeSettin y gsActivity (See note 1) com.google.android 05-16 20:04:05.686 I/am_on_resume_called( 9121): .youtube.MyAccou com.google.android.youtube.MyAccountActivity ntActivity com.google.android 05-16 20:04:25.556 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:04:07.026: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/us url=[http://gdata.youtube.com/feeds/api/users/default/favorites?maxers/default/favorites results=9&safeSearch=strict&start-index=1&v=2]. &v= com.google.android 05-16 20:05:33.246 I/am_on_resume_called( 9121): .youtube.FeedInfoL com.google.android.youtube.FeedInfoListActivity istActivity url=[gdata.youtube.c 05-16 20:04:07.116: INFO/YouTube(9121): Requesting using MASF om/feeds/api/users/de url=[http://gdata.youtube.com/feeds/api/users/default/subscriptions?v=2]. fault/subscriptions
83
19
Events
20
Events
main
21
# 22
Buffer Events
Keyword
Example
23
Events
com.google.android 05-16 20:07:53.156 I/am_on_resume_called( 9121): .youtube.FeedInfoL com.google.android.youtube.FeedInfoListActivity istActivity url=[http://gdata.yout 05-16 20:09:27.126: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/us url=[http://gdata.youtube.com/feeds/api/users/default/playlists?v=2]. ers/default/playlists com.google.android 05-16 20:10:26.706 I/am_on_resume_called( 9121): .youtube.PlaylistAc com.google.android.youtube.PlaylistActivity tivity com.google.android 05-16 20:10:43.086 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:10:43.076: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/us url=[http://gdata.youtube.com/feeds/api/users/default/uploads?maxers/default/uploads results=9&start-index=1&v=2]. &v= com.google.android 05-16 20:11:11.586 I/am_on_resume_called( 9121): .youtube.Categories com.google.android.youtube.CategoriesActivity Activity
Main
24
Events
25
Events
Main
26
Categories
Events
am_on_resume_ called
84
# 27
Buffer Events
Keyword
Example
com.google.android 05-16 20:11:23.086 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:11:23.076: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Aut ndardfeeds/ os?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Autos index=1&time=this_week&v=2]. &v= com.google.android 05-16 20:11:47.826 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:11:47.816: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Co ndardfeeds/ medy?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Comed index=1&time=this_week&v=2]. y &v= com.google.android 05-16 20:14:27.406 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:14:27.386: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Edu ndardfeeds/ cation?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Educat index=1&time=this_week&v=2]. ion &v=
85
Main
28
Events
Main
29
# 30
Buffer Events
Keyword
Example
com.google.android 05-16 20:15:29.576 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:15:29.566: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Ent ndardfeeds/ ertainment?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Enterta index=1&time=this_week&v=2]. inment &v= com.google.android 05-16 20:15:53.726 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:15:53.706: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Fil ndardfeeds/ m?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Film index=1&time=this_week&v=2]. &v= com.google.android 05-16 20:16:32.766 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:16:32.756: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Ga ndardfeeds/ mes?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Games index=1&time=this_week&v=2]. &v=
86
Main
31
Events
Main
32
Events
Main
# 33
Buffer Events
Keyword
Example
com.google.android 05-16 20:16:52.516 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:16:52.506: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Ho ndardfeeds/ wto?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Howto index=1&time=this_week&v=2]. &v= com.google.android 05-16 20:17:12.056 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:17:12.036: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Mu ndardfeeds/ sic?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Music index=1&time=this_week&v=2]. &v= com.google.android 05-16 20:17:37.006 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:17:36.986: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Ne ndardfeeds/ ws?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_News index=1&time=this_week&v=2]. &v=
Main
34
Events
Main
35
Events
Main
87
# 36
Buffer Events
Keyword
Example
com.google.android 06-09 15:42:20.901 I/am_on_resume_called( 412): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 06-09 15:42:20.881: INFO/YouTube(412): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/US/most_viewed_Non ndardfeeds/ profit?format=2%2C3%2C9&max-results=9&safeSearch=moderate&startmost_viewed_Nonpr index=1&time=this_week&v=2]. ofits &v= com.google.android 05-16 20:18:05.766 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:18:05.746: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Peo ndardfeeds/ ple?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_People index=1&time=this_week&v=2]. &v= com.google.android 05-16 20:18:25.966 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:18:25.956: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Ani ndardfeeds/ mals?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Anima index=1&time=this_week&v=2]. ls &v=
88
Main
37
Events
Main
38
Events
Main
# 39
State
Buffer
Keyword
Example
com.google.android 05-16 20:18:51.846 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:18:51.826: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Tec ndardfeeds/ h?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Tech index=1&time=this_week&v=2]. &v= com.google.android 05-16 20:19:17.186 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:19:17.166: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Spo ndardfeeds/ rts?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Sports index=1&time=this_week&v=2]. &v= com.google.android 05-16 20:19:47.376 I/am_on_resume_called( 9121): .youtube.VideoList com.google.android.youtube.VideoListActivity Activity url=[http://gdata.yout 05-16 20:19:47.356: INFO/YouTube(9121): Requesting using MASF ube.com/feeds/api/sta url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Tra ndardfeeds/ vel?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Travel index=1&time=this_week&v=2]. &v=
40
Events
Main
41
Events
Main
89
# 42
State Settings
Buffer Events
Tag am_on_resume_ called menu_item_sele cted am_on_resume_ called (am_restart_acti vity) am_new_intent
Keyword
Example
com.google.android 05-16 20:20:25.996 I/am_on_resume_called( 9121): .youtube.SettingsA com.google.android.youtube.SettingsActivity ctivity Share com.android.intern al.app.ChooserActi vity com.android.brows er.BrowserActivity http://m.youtube.co m/flag 05-19 14:55:10.846 I/menu_item_selected( 4427): [1,Share] 05-19 14:55:12.946 I/am_on_resume_called( 4427): com.android.internal.app.ChooserActivity
43 43
Events Events
44
Flag a video
Events
05-16 20:21:12.636 I/am_new_intent( 98): [1153878800,84,com.android.browser/.BrowserActivity,android.intent.acti on.VIEW,,http://m.youtube.com/flag?v=Cr5M8dbhYfs,4194304] 05-22 19:27:58.636: DEBUG/EventLog(12435): 522 192757 i/am_create_activity(125):[1151534240,69,com.android.browser/.browsera ctivity,android.intent.action.view,,http://m.youtube.com/flag?v=t3nnf9jkvy y,0]
44
Flag a video
Events
Note 1 In this case, the states Fill information about a video recorded and Fill information about a video uploaded have the log: I/am_on_resume_called(00000): com.google.android.apps.uploader.clients.youtube.YouTubeSettingsActivity . This is because the activity behind them is the same: YouTubeSettingsActivity, which has been reutilized in both states. The unique way to differentiate them is recording and using the previous state. If the previous state is the state 3, recording finished, and then the actual state is the state 4. Fill information about a video recorded; if the previous state is the state 17. Upload video, the actual state is 18. Fill information about a video uploaded.
90
Note 2: The state 5, Showing keyboard, displays the keyboard on the screen and the previous keywords searched. This keyboard depends on the locale configuration of the mobile, which make it not easy recognizable. After several test, it is not easily recognize this state. The all the locale configuration should be studied, as well as all the modifications done the manufacturers. Since this state is not important (It just check if the keyboard is shown in the screen or not), it is not recognized in the code. Note 3: To share a video, The user can both holding the finger pressed on the screen and choose the option Share in the context menu or pressing the button Share appears in the screen. In the first case, the action is easily identifiable, because the log I/menu_item_selected(00000): [1,Share] will appears and this log is unique. In the second case the log which will generate are the same as if the user tries to upload a video: I/am_on_resume_called(00000): com.android.internal.app.ChooserActivity. What the Android System do is call all the compatible applications in the device and show them in the screen. In this way, the user can pick any of those applications and continue. Because they are context dependent (depending on the applications installed in each phone), there is no way to know which application will appear in the chosen list forehand. Thats why the keyword watched corresponds to the actions of pick application. Fortunately the states Upload videos and Share a video are called from different states when no context menu is used. Share a video is called from the states: 13. Play Video 14. Video Playing Finished 16. Show information Upload videos is called from the states: 1. Main screen 7. Search result Empty/Ok 8. Subscription updates 9. More recommended 10. Most viewed 11. Most discussed 12. Top rated 15. Read comments 19. My account
91
20. Favorite videos 21. My subscriptions 22. Show a subscribed / an subscribed channel 23. My playlist 24. Show a playlist 25. My videos 36. Categories 27-41. Show a category
So, like the note 1, the previous state is recorded always and consulted when the keyword com.android.internal.app.ChooserActivity appears. C.1.2 General statuses Status Launche d Finished Finished Buffer Events Events Main Tag am_proc_ bound am_proc_ died ActivityM anager Keyword com.google.andro id.youtube com.google.andro id.youtube 05-16 19:43:59.416 I/am_proc_bound( 05-16 20:28:00.286 I/am_proc_died( Example 98): [9121,com.google.android.youtube] 98): [9657,com.google.android.youtube]
Force removing 05-26 19:00:35.353: DEBUG/ActivityManager(119): Force removing process process ProcessRecord{44cb5fd8 10205:com.google.android.youtube/10004} com.google.com.a (com.google.android.youtube/10004) ndroid.youtube
C.1.3 Modes Mode Logged in Buffer Events Tag am_create _activity Keyword com.google.andro id.youtube.action. LOGIN Example 05-16 19:44:01.336 I/am_create_activity( 98): [1154025272,92,com.google.android.youtube/.login.GlsLoginActivity,com.google.androi d.youtube.action.LOGIN,,,0]
92
C.1.4 Parallel actions Action Start uploadin g video recorded Buffer Events Tag am_create _service Keyword Example
com.google.andro 05-16 20:45:34.856 I/am_create_service( 98): id.apps.uploader/. [1152474112,com.google.android.apps.uploader/.UploadService,act=com.google.android. UploadService apps.uploader.action.UPLOAD,9850] com.google.andro id.apps.uploader.a ction.UPLOAD (See note 1) com.google.andro 05-16 21:26:38.911 I/am_create_service( 98): id.apps.uploader/. [1154546520,com.google.android.apps.uploader/.UploadService,act=com.google.android. UploadService apps.uploader.action.UPLOAD,10336] com.google.andro id.apps.uploader.a ction.UPLOAD (See note 1)
Events
am_create _service
Note 1 As the case described in note 1 of the appendix C.1.1, an activity has been reutilized, which cause the parallel actions have the same event logs. The solution is the same: by recording the previous state, the actual parallel action is detected.
93
C.2 Keyword used to detect internal states This table is going to show the internal states that one state could be. They can be detected by using the main log buffer. The unique cases when the event logs are needed are when the user is trying to see the captions (16. Play video and 17.Video playing finished). # 1 State Main screen Internal State Video rated Buffer Main Tag YouTube Keyword url=[http://gdata. youtube.com/fee ds/api/videos/ ratings Example 05-25 13:28:44.331: INFO/YouTube(4609): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/9w_5rXpfXpA/ratings?clien t=mvapp-android-htc].
Video set Main as favorite 7 Search result Empty/Ok Video rated Main
YouTube
My account 05-25 13:28:20.631: DEBUG/YouTube(4609): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-25 13:29:19.151: INFO/YouTube(4609): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/uxTDK1S5qJ0/ratings?clien t=mvapp-android-htc].
YouTube
YouTube
My account 05-25 13:29:38.521: DEBUG/YouTube(4609): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/videos? &q= 05-28 21:36:18.440: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/videos?format=2%2C3%2C9&maxresults=9&q=hold+it+against+me&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
94
# 8
Buffer Main
Tag YouTube
Example 05-25 13:30:32.991: INFO/YouTube(4609): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/QvrSeVdyiAQ/ratings?clien t=mvapp-android-htc].
Video set Main as favorite 9 More recommen ded Video rated Main
YouTube
My account 05-25 13:30:51.161: DEBUG/YouTube(4609): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-25 13:31:25.351: INFO/YouTube(4609): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/l7AUa8k4w50/ratings?client =mvapp-android-htc].
YouTube
YouTube
My account 05-25 13:31:43.261: DEBUG/YouTube(4609): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-25 13:32:16.801: INFO/YouTube(4609): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/8fRaSV9uNDg/ratings?clien t=mvapp-android-htc].
YouTube
YouTube
My account 05-25 13:32:39.581: DEBUG/YouTube(4609): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E
95
State
Buffer Main
Tag YouTube
Example 05-28 21:37:12.590: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed?form at=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2]. 05-25 13:33:34.891: INFO/YouTube(4609): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/8Y0ZzXKyWzM/ratings?cli ent=mvapp-android-htc].
11
Most discussed
Video rated
Main
YouTube
YouTube
My account 05-25 13:33:50.731: DEBUG/YouTube(4609): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_discussed url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-28 21:37:53.220: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_discussed?fo rmat=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2]. 05-25 13:34:47.331: INFO/YouTube(4609): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/y63IVluVGnA/ratings?clien t=mvapp-android-htc].
YouTube
12
Top rated
Video rated
Main
YouTube
YouTube
My account 05-25 13:35:38.461: DEBUG/YouTube(4829): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E
96
State
Buffer Main
Tag YouTube
Example 05-28 21:38:31.620: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/top_rated?format= 2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2]. 06-01 18:14:42.128: INFO/AudioPolicyService(1362): startOutput(): before lock
13
Play video
Main
AudioPoli cyService
Main
PlayerDriver handlePause
Scroll Main video (See note 1) Forward Main video (See note 1) Backwar Main d Video (See note 1)
PlayerDriver buffering percentage not normal PlayerDriver buffering percentage not normal
06-01 21:59:41.358: INFO/PlayerDriver(2892): buffering percentage=57 06-01 21:59:41.758: INFO/PlayerDriver(2892): buffering percentage=42 06-01 21:59:41.978: INFO/PlayerDriver(2892): buffering percentage=29 06-01 21:59:42.238: INFO/PlayerDriver(2892): buffering percentage=23 06-01 21:59:42.498: INFO/PlayerDriver(2892): buffering percentage=24 06-01 21:59:42.778: INFO/PlayerDriver(2892): buffering percentage=25 06-01 21:59:43.088: INFO/PlayerDriver(2892): buffering percentage=26
97
State
Internal State
Buffer
Tag YouTube
Keyword
Example
HD on Main [HD off] (See note 2) HD off Main [HD on] (See note 2) Show captions Video rated Events Main
YouTube
PlayerActivity.pla 06-01 20:21:36.708: INFO/YouTube(4579): PlayerActivity.play y http://v4.lscache6.googlevideo.com/videoplayback?app=youtube_gdata&clien t=mvapp-androidhtc&devKey=ATEU_r3RX2afGwq_gCqiS2UO88HsQjpE1a8d1GxQnGDm& el=videos&expire=1309544431&id=249dc032de54e834&ip=0.0.0.0&ipbits= PlayerActivity.pla 0&itag=17&key=yta1&signature=94378869C34672B91C9EB557072347A7 y B0A45B0A.D00327F6D5A84910E8442A528A6C3FA0C6650B3D&sparams =id,itag,uaopt,ip,ipbits,expire&uaopt=no-save at 62902 05-28 20:45:25.580 I/menu_item_selected(10066): [0,Captions] 05-25 13:36:59.531: INFO/YouTube(4829): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/zwd5faVtfEI/ratings?client=m vapp-android-htc].
Video set Main as favorite Video Playing finished [Video left] Main
YouTube
My account 05-25 13:37:33.141: DEBUG/YouTube(4829): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E PlayerActivity.pla 06-01 20:26:56.828: INFO/YouTube(4579): PlayerActivity.play y http://v22.lscache1.googlevideo.com/videoplayback?app=youtube_gdata&clie at 0 nt=mvapp-androidhtc&devKey=ATEU_r3RX2afGwq_gCqiS2UO88HsQjpE1a8d1GxQnGDm& el=videos&expire=1309544431&id=249dc032de54e834&ip=0.0.0.0&ipbits= 0&itag=18&key=yta1&signature=ECEC543A2C43EF504BFBDBE4CE65A5 E7BA49EB93.E508232E738CF6EC5E98E90FAEAE1DAA02E80C03&spar ams=id,itag,uaopt,ip,ipbits,expire&uaopt=no-save at 0
98
YouTube
# 14
Buffer Main
Tag YouTube
Keyword
Example
url=[http://gdata. 05-25 13:39:10.471: INFO/YouTube(4829): Requesting using direct youtube.com/fee connection url=[http://gdata.youtube.com/feeds/api/videos/zbGJzds/api/videos/ Mhqr4/ratings?client=mvapp-android-htc]. ratings My account 05-25 13:39:27.421: DEBUG/YouTube(4829): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E 05-28 20:49:21.970 I/menu_item_selected(10066): [0,Captions]
Video set Main as favorite Show captions 16 Show informatio n Video rated Events
YouTube
Main
Video set Main as favorite [Unfavor ite video] Video set Main as unfavorit e[favorite video]
YouTube
My account 05-25 13:41:57.851: DEBUG/YouTube(4829): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E
YouTube
My account 05-25 13:42:31.001: DEBUG/YouTube(4829): My account request request successful successful, type REMOVE_FAVORITE REMOVE_FAVO RITE
99
# 19
State My account
Buffer Main
Tag YouTube
Keyword
Example
url=[http://gdata. 05-25 13:45:59.941: INFO/YouTube(4829): Requesting using direct youtube.com/fee connection url=[http://gdata.youtube.com/feeds/api/videos/icDhds/api/videos/ Tj669Q/ratings?client=mvapp-android-htc]. ratings My account 05-25 13:47:34.921: DEBUG/YouTube(4829): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E My account 05-25 13:46:21.321: DEBUG/YouTube(4829): My account request request successful successful, type REMOVE_FAVORITE REMOVE_FAVO RITE My account 05-25 13:48:04.411: DEBUG/YouTube(4829): My account request request successful successful, type DELETE_MY_VIDEO DELETE_MY_VI DEO url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-25 13:52:08.621: INFO/YouTube(4829): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/PHCw4FxCPro/ratings?clie nt=mvapp-android-htc].
Video set Main as favorite [Unfavor ite video] Video set Main as unfavorit e[favorite video] Video deleted Main
YouTube
YouTube
YouTube
20
Favorite videos
Video rated
Main
YouTube
YouTube
My account 05-25 13:49:54.181: DEBUG/YouTube(4829): My account request request successful successful, type REMOVE_FAVORITE REMOVE_FAVO RITE
100
# 22
Buffer Main
Tag YouTube
Example 05-25 13:53:06.211: INFO/YouTube(4829): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/TCrCbq2TQiQ/ratings?clien t=mvapp-android-htc].
YouTube
My account 05-25 13:53:25.321: DEBUG/YouTube(4829): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E My account 05-25 13:53:44.591: DEBUG/YouTube(4829): My account request request successful successful, type SUBSCRIBE_TO_CHANNEL SUBSCRIBE_TO _CHANNEL My account 05-25 13:59:55.061: DEBUG/YouTube(4978): My account request request successful successful, type UNSUBSCRIBE_FROM_CHANNEL UNSUBSCRIBE_ FROM_CHANNE L url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-25 14:02:07.671: INFO/YouTube(4978): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/KyJtsxKIS2k/ratings?client =mvapp-android-htc].
YouTube
YouTube
24
Show a playlist
Video rated
Main
YouTube
YouTube
My account 05-25 14:02:24.461: DEBUG/YouTube(4978): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E
101
# 25
State My videos
Buffer Main
Tag YouTube
Example 05-25 14:08:08.611: INFO/YouTube(5143): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/n_4bE2dYZy8/ratings?clien t=mvapp-android-htc].
YouTube
My account 05-25 14:09:45.391: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E My account 05-25 14:18:44.501: DEBUG/YouTube(5143): My account request request successful successful, type DELETE_MY_VIDEO DELETE_MY_VI DEO url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-25 14:27:13.231: INFO/YouTube(5143): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/47ItSdBqggA/ratings?client =mvapp-android-htc].
YouTube
27
Video rated
Main
YouTube
YouTube
My account 05-25 14:27:37.831: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E
102
State
Buffer Main
Tag YouTube
Keyword url=[http://gdata. youtube.com/feed s/api/standardfee ds/ most_viewed_Au tos &v= url=[http://gdata. youtube.com/fee ds/api/videos/ ratings
28
Video rated
Main
YouTube
YouTube
My account 05-25 14:28:36.701: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Co medy &v= url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-28 21:40:02.770: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Co medy?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
29
Main
YouTube
103
State
Internal State
Buffer
Tag YouTube
Keyword
Example
My account 05-25 14:29:28.941: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y 05-28 21:40:36.020: INFO/YouTube(10066): Requesting using MASF outube.com/feeds/ url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Edu api/standardfeeds/ cation?format=2%2C3%2C9&max-results=9&safeSearch=strict&startmost_viewed_Edu index=1&time=this_month&v=2]. cation &v= url=[http://gdata. 05-25 14:30:16.271: INFO/YouTube(5143): Requesting using direct youtube.com/fee connection url=[http://gdata.youtube.com/feeds/api/videos/Rds/api/videos/ pWP2M449c/ratings?client=mvapp-android-htc]. ratings My account 05-25 14:30:31.081: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Ent ertainment &v= 05-28 21:41:29.840: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Ente rtainment?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
30
Video rated
Main
YouTube
YouTube
YouTube
104
# 31
Buffer Main
Tag YouTube
Example 05-25 14:31:21.791: INFO/YouTube(5143): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/nb67EDkRF04/ratings?clien t=mvapp-android-htc].
YouTube
My account 05-25 14:31:52.181: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Fil m &v= url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-28 21:41:58.130: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Film ?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
32
Video rated
Main
YouTube
YouTube
My account 05-25 14:32:49.321: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E
105
State
Buffer Main
Tag YouTube
Keyword url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Ga mes &v= url=[http://gdata. youtube.com/fee ds/api/videos/ ratings
33
Video rated
Main
YouTube
YouTube
My account 05-25 14:33:44.011: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Ho wto &v= url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-28 21:43:02.450: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Ho wto?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
34
Video rated
Main
YouTube
106
State
Internal State
Buffer
Tag YouTube
Keyword
Example
My account 05-25 14:34:40.631: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Mu sic &v= 05-28 21:43:40.940: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Mus ic?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
35
Video rated
Main
YouTube
url=[http://gdata. 05-25 14:36:18.241: INFO/YouTube(5143): Requesting using direct youtube.com/fee connection url=[http://gdata.youtube.com/feeds/api/videos/IIZjQds/api/videos/ BK76Y/ratings?client=mvapp-android-htc]. ratings My account 05-25 14:36:31.941: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Ne ws &v= 05-28 21:44:12.260: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_New s?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
YouTube
107
# 36
Buffer Main
Tag YouTube
Example 05-28 21:45:20.341: INFO/YouTube(10066): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/VRq6K_eMRPg/ratings?clie nt=mvapp-android-htc.
YouTube
My account 05-28 21:45:26.392: DEBUG/YouTube(10066): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y 05-28 21:45:27.230: INFO/YouTube(10066): Requesting using MASF outube.com/feeds/ url=[http://gdata.youtube.com/feeds/api/standardfeeds/US/most_viewed_Non api/standardfeeds/ profit?format=2%2C3%2C9&max-results=9&safeSearch=moderate&startmost_viewed_Non index=1&time=this_month&v=2]. profits &v= url=[http://gdata. 05-25 14:37:15.851: INFO/YouTube(5143): Requesting using direct youtube.com/fee connection url=[http://gdata.youtube.com/feeds/api/videos/vds/api/videos/ 6OYcZaKgg/ratings?client=mvapp-android-htc]. ratings My account 05-25 14:37:37.801: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E
Time filter
Main
YouTube
37
Video rated
Main
YouTube
YouTube
108
State
Buffer Main
Tag YouTube
Keyword url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Peo ple &v= url=[http://gdata. youtube.com/fee ds/api/videos/ ratings
38
Video rated
Main
YouTube
YouTube
My account 05-25 14:38:44.551: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Ani mals &v= url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-28 21:45:07.380: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Ani mals?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
39
Main
YouTube
109
# y)
State
Internal State
Buffer
Tag YouTube
Keyword
Example
My account 05-25 14:39:43.111: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Tec h &v= url=[http://gdata. youtube.com/fee ds/api/videos/ ratings 05-28 21:46:30.120: DEBUG/YouTube(10066): Trying store file for url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Tec h?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
40
Video rated
Main
YouTube
YouTube
My account 05-25 14:40:51.141: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Spo rts &v= 05-28 21:47:01.420: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Spor ts?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
110
# 41
Buffer Main
Tag YouTube
Example 05-25 14:41:33.201: INFO/YouTube(5143): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/videos/frB865UXBtE/ratings?client =mvapp-android-htc].
YouTube
My account 05-25 14:41:52.951: DEBUG/YouTube(5143): My account request request successful successful, type ADD_FAVORITE ADD_FAVORIT E url=[http://gdata.y outube.com/feeds/ api/standardfeeds/ most_viewed_Tra vel &v= 05-28 21:47:28.790: INFO/YouTube(10066): Requesting using MASF url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewed_Trav el?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_month&v=2].
YouTube
42
High quality video on mobile checked [High quality video on mobile unchecke d]
No log generated
111
State
Internal State Hight quality video on a mobile unchecke d [High quality video on mobile checked] Captions font size set Search history cleaned Term of service read -
Buffer -
Tag -
Example
No log generated
No log generated
No log generated
General note: There are several states which has Time filter as internal state. This internal state causes a reloading of the state. From the point of view of the logs, it is exactly the same if the user enters to the states again. The states which has Time filter as internal state are: 7. Search result Empty/Ok 10. Most viewed 11. Most discussed
112
12. Top rated 27-41. Show a category Note 1: The three internal states belong to Play video: Scroll video, Backward video and Forward video produce the same effect: Change the position of the point that is going to reproduce. The most important thing is when the video is paused, no matter where is the point where is going to reproduce (play), no special log will be generated. The unique way to know if the user is playing from a non-continue point is monitor the buffering percentage. The buffering percentage indicates the percentage of video streaming saved in the buffer. It goes from 1 (1%) to 100 (100%). Here is an example: 06-01 22:01:31.908: INFO/PlayerDriver(2892): buffering percentage=89 When the video is playing normally, it could increase 0, 1 or 2, but never more than 2 or even decrease. If it happens, we are sure that the scroll has been changed. Note 2: The internal states related to the quality of the video (HD on, HD off) when the user is playing a video, cause the program to create a new player and load a complete different video. Note 3: All the changed of Settings is saved inside the file using the Shared preference option that Android offers. Thats why it does not generate any log.
113
114
Main
YouTube
Main
YouTube
Main
YouTube
Client
url=[http://gdata.youtu 05-25 13:28:44.331: INFO/YouTube(4609): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/9w_5rXpfXpA/ratings? client=mvapp-android-htc]. client=CLIENT
2. Start recording video This state is context dependent. 3. Video recording finished This state is context dependent. 4. Fill information about a video recorded
115
Buffer
Tag
Data
Format
Example
Main
MediaUpl oader
Account Id
5. Showing keyboard Context dependent 6. Start searching No relevant information generated 7. Search result Empty/Ok Main/ Internal State Main Main Main Main Main Buffer Tag Data Format Example
116
Buffer
Tag
Data
Format
Example
time=TIME v=V url=[http://i.ytimg.co 04-27 19:47:39.748: INFO/YouTube(3752): Requesting using MASF m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/CD2LRROpph0/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 13:29:19.151: INFO/YouTube(4609): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/uxTDK1S5qJ0/ratings? client=mvapp-android-htc]. client=CLIENT
Main
YouTube
Main
YouTube
Client
Note: When the user is looking for a video for the first time, the time will be consider All time. In that case, the data format wont appear. If after the user has finished searching, she uses the Time filter option to filter the time, then the time field will appear. 8. Subscriptions updates Main/ Internal State Main Main Main Buffer Tag Data Format Example
117
Buffer
Tag
Data
Format
Example
Safe search Start index V Id of the video shown in the screen Video id
safeSearch=SAFESE ARCH start-index=STARTINDEX v=V url=[http://i.ytimg.co 04-27 19:18:19.077: DEBUG/YouTube(3530): Trying store file for m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/AloBQyjEI0A/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 13:30:32.991: INFO/YouTube(4609): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/QvrSeVdyiAQ/ratings? client=mvapp-android-htc]. client=CLIENT
Main
YouTube
Main
YouTube
Client
9. More recommended Main/ Internal State Main Main Buffer Tag Data Format Example
Main Main
YouTube YouTube
Format max-results
format=FORMAT max-result=MAXRESULT
118
Buffer
Tag
Data
Format
Example
Safe search Start index V Played videos id Id of the video shown in the screen Video id
url=[http://i.ytimg.co 04-29 19:35:28.347: INFO/YouTube(21116): Requesting using MASF m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/JKGu2n6914M/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 13:31:25.351: INFO/YouTube(4609): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/l7AUa8k4w50/ratings? client=mvapp-android-htc]. client=CLIENT
Main
YouTube
Main
YouTube
Client
119
Buffer
Tag
Data
Format
Example
Main
YouTube
LOCALE
Format max-results Safe search Start index Time V Id of the video shown in the screen Video id
gdata.youtube.com/fee 05-16 19:56:24.646: INFO/YouTube(9121): Requesting using MASF ds/api/standardfeeds/L url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewe OCALE/most_viewed d?format=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_week&v=2]. format=FORMAT max-result=MAXRESULT safeSearch=SAFESE ARCH start-index=STARTINDEX time=TIME v=V url=[http://i.ytimg.co 04-28 19:18:06.081: INFO/YouTube(12364): Requesting using MASF m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/rEc1mLhN284/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 13:32:16.801: INFO/YouTube(4609): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/8fRaSV9uNDg/ratings? client=mvapp-android-htc]. client=CLIENT
Video rated
Main
YouTube
Video rated
Main
YouTube
Client
120
11. Most discussed Main/ Internal State Main Buffer Tag Data Format Example
Main
YouTube
Locale
gdata.youtube.com/fee ds/api/standarfeeds/L OCALE/most_discuss ed format=FORMAT max-result=MAXRESULT safeSearch=SAFESE ARCH start-index=STARTINDEX time=TIME v=V
Format max-results Safe search Start index Time V Id of the video shown in the screen Video id
url=[http://i.ytimg.co 04-27 19:14:47.137: INFO/YouTube(2900): Requesting using MASF m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/lVoIi1fDt58/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 13:33:34.891: INFO/YouTube(4609): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/8Y0ZzXKyWzM/rating
121
Video rated
Main
YouTube
Buffer
Tag
Data
Format
Example
Main
YouTube
Client
client=CLIENT
s?client=mvapp-android-htc] .
12. Top rated Main/ Internal State Main Buffer Tag Data Format Example
Main
YouTube
Locale
gdata.youtube.com/fee 05-16 19:58:28.056: INFO/YouTube(9121): Requesting using MASF ds/api/standarfeeds/L url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/top_rated?f OCALE/top_rated ormat=2%2C3%2C9&max-results=9&safeSearch=strict&startindex=1&time=this_week&v=2]. format=FORMAT max-result=MAXRESULT safeSearch=SAFESE ARCH start-index=STARTINDEX time=TIME v=V
122
Buffer
Tag
Data
Format
Example
Main
YouTube
url=[http://i.ytimg.co 04-27 19:29:19.995: DEBUG/YouTube(3752): Trying store file for m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/WUt1TZ7T53A/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 13:34:47.331: INFO/YouTube(4609): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/y63IVluVGnA/ratings? client=mvapp-android-htc]. client=CLIENT
Main
YouTube
Main
YouTube
Client
13. Play video Main/ Internal State Main Main Main Main Main Main Buffer Tag Data Format Example
06-05 14:28:03.116: INFO/YouTube(14466): PlayerActivity.play http://v7.lscache8.googlevideo.com/videoplayback?app=youtube_gdata &client=mvapp-androidhtc&devKey=ATEU_r3RX2afGqq_gCqiS2UO88HsQjpE1a8d1GxQn GDm&el=videos&expire=1309868881&id=cfab3da43d708418&ip=0. 0.0.0&ipbits=0&itag=18&key=yta1&signature=3F145C2B23C4E9ED 92D37321AA5869627225B1C4.DBADC8686DBEE87183C7C803D5 99D231C36C51C7&sparams=id,itag,uaopt,ip,ipbits,expire&uaopt=nosave at 0
123
Main/ Internal State Main Main Main Main Main Main Main Main
Buffer
Tag
Data
Format
Example
Video at starting time VIDEOSTARTINGTI (ms) ME buffering percentage = 04-29 14:29:09.564: INFO/PlayerDriver(77): buffering BUFFERINGLEVEL percentage=100 url=[http://i.ytimg.co 04-29 14:27:56.094: INFO/YouTube(17527): Requesting using MASF m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/SrJTatTlY-g/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 13:36:59.531: INFO/YouTube(4829): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/zwd5faVtfEI/ratings?cl
124
Main
Main
Video rated
Main
YouTube
Buffer
Tag
Data
Format
Example
Main
YouTube
Client
client=CLIENT
ient=mvapp-android-htc].
Note 1: There are two different types of logs that display the information about buffering. The first one shows the buffering level more or less each 10 seconds and the second one shows per each level of buffering (from 1% to 100%). Here come the examples: ... 04-29 14:28:40.154: INFO/PlayerDriver(77): buffering (74) 04-29 14:28:40.594: INFO/PlayerDriver(77): buffering percentage=75 04-29 14:28:41.554: INFO/PlayerDriver(77): buffering percentage=76 04-29 14:28:41.704: INFO/PlayerDriver(77): buffering percentage=77 04-29 14:28:43.314: INFO/PlayerDriver(77): buffering percentage=77 04-29 14:28:43.794: INFO/PlayerDriver(77): buffering percentage=78 04-29 14:28:44.834: INFO/PlayerDriver(77): buffering percentage=79 04-29 14:28:45.954: INFO/PlayerDriver(77): buffering percentage=80 04-29 14:28:47.214: INFO/PlayerDriver(77): buffering percentage=81 04-29 14:28:48.234: INFO/PlayerDriver(77): buffering percentage=82 04-29 14:28:49.134: INFO/PlayerDriver(77): buffering percentage=83 04-29 14:28:50.315: INFO/PlayerDriver(77): buffering percentage=83 04-29 14:28:50.315: INFO/PlayerDriver(77): buffering (83) ... The first log corresponds to the log of first type. It shows that at 14:28:40.154 of 29 of April, the buffering level is 74%. Then there come logs of the second type, which shows the exact moment when the buffering level has increase. Finally, the log of first type appears again, which shows that at 14:28:50.315 of 29 of April, the buffering level is 83%. Because the first type of the logs is redundant, the database will save just information offered by the logs of second type.
125
14. Video playing finished Main/ Internal State Main Buffer Tag Data Format Example
Main
YouTube
url=[http://i.ytimg.co 06-07 13:00:29.673: INFO/YouTube(11916): Requesting using MASF m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/9Ngh7LIn5qw/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 13:39:10.471: INFO/YouTube(4829): Requesting using direct be.com/feeds/api/vide connection url=[http://gdata.youtube.com/feeds/api/videos/zbGJzos/VIDEOID/ratings Mhqr4/ratings?client=mvapp-android-htc] . client=CLIENT
Main
YouTube
Main
YouTube
Client
15. Read comments Not relevant data generated in this state 16. Show information Main/ Internal State Main Buffer Tag Data Format Example
Main
YouTube
Video id
Main Main
Main Main
YouTube YouTube
Client Format
url=[http://qdata.youtu 04-28 22:12:12.969: INFO/YouTube(12364): Requesting using MASF be.com/fedds/api/vide url=[http://gdata.youtube.com/feeds/api/videos/rVHLme7LtYs/related? os/VIDEOID/related client=mvapp-android-htc&format=2%2C3%2C9&maxresults=6&start-index=1]. client=CLIENT format=FORMAT
126
Buffer
Tag
Data
Format
Example
max-result=MAXRESULT start-index=STARTINDEX url=[http://i.ytimg.co 04-28 22:12:14.719: INFO/YouTube(12364): Requesting using MASF m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/9Hk_jLWH_WQ/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 13:41:44.061: INFO/YouTube(4829): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/RPH7LXPZFBo/rating s?client=mvapp-android-htc]. client=CLIENT url=[http://gdata.youtu be.com/feeds/api/users /USERNAME/favorite s 05-25 13:42:30.341: INFO/YouTube(4829): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/users/pablomunyoz/favorites/v jVQa1PpcFNccnRzPqXSNux2tQXoXogtKmAoJGQap4?client=mvapp-android-htc].
Main
YouTube
Main Main
YouTube YouTube
127
Buffer
Tag
Data
Format
Example
Main
YouTube
Client
client=CLIENT
17. Upload video This state is context dependent. 18. Fill information about a video uploaded Main/ Internal State Main Buffer Tag Data Format Example
Main
MediaUpl oader
Account Id
19. My account Main/ Internal State Main Buffer Tag Data Format Example
Main
YouTube
url=[http://i.ytimg.co 05-28 13:49:18.048: DEBUG/YouTube(711): Trying store file for m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/y63IVluVGnA/default.jpg]. t.jpg].
128
Buffer
Tag
Data
Format
Example
Main
YouTube
Video id
url=[http://gdata.youtu 05-25 13:45:59.941: INFO/YouTube(4829): Requesting using direct be.com/feeds/api/vide connection url=[http://gdata.youtube.com/feeds/api/videos/icDhos/VIDEOID/ratings Tj669Q/ratings?client=mvapp-android-htc]. client=CLIENT url=[http://i.ytimg.co 05-28 14:16:55.188: DEBUG/YouTube(1370): Trying store file for m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/aC-KOYQsIvU/default.jpg]. t.jpg]. url=[http://gdata.youtu be.com/feeds/api/users /USERNAME/favorite s 05-25 13:46:20.711: INFO/YouTube(4829): Requesting using direct connection url=[http://gdata.youtube.com/feeds/api/users/pablomunyoz/favorites/v jVQa1PpcFNccnRzPqX-SKqqI1TfrSg5Bbp0ZZEJ0Wo?client=mvappandroid-htc].
Video rated
Main
YouTube YouTube
Video Main rated (See note 1) Video set as unfavorit e [Favorite video] Video set as unfavorit e [Favorite video] Main
YouTube
Main
YouTube
Client
client=CLIENT
129
Main/ Internal State Video set as unfavorit e [Favorite video] (See note 2) Video deleted
Buffer
Tag
Data
Format
Example
Main
YouTube
url=[http://i.ytimg.co 05-27 13:23:43.108: INFO/YouTube(24156): Requesting using MASF m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/_6krXiXFe5o/default.jpg]. t.jpg].
Main
YouTube
User name
Video deleted
Main
YouTube
Video id
url=[http://gdata.youtu 05-25 13:48:03.811: INFO/YouTube(4829): Requesting using direct be.com/feeds/api/users connection /USERNAME/uploads url=[http://gdata.youtube.com/feeds/api/users/pablomunyoz/uploads/cJ l1Ms7Ou1Q?client=mvapp-android-htc]. url=[http://gdata.youtu be.com/feeds/api/users /username/uploads/VI DEOID client=CLIENT url=[http://i.ytimg.co 05-28 14:35:01.248: INFO/YouTube(1370): Requesting using MASF m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/vDmhuNve7TM/default.jpg]. t.jpg].
Main Main
YouTube YouTube
Note 1: The unique way to invoke this internal state is select a video from My videos, holding the finger pressed on the screen and select the option Favorite from the context menu. This cause the YouTube application interacts again with the server in order to update the data. This action could trigger the requesting of new data.
130
Note 2: When a video is set as unfavorite, it should be removed from the list of the favorite videos. Then the screen should be updated. Note 3: When a video is deleted, it should be removed from the list of My videos. Then the screen should be updated. 20. Favorite videos Main/ Internal State Main Main Main Main Main Buffer Tag Data Format Example
max-results Safe search Start index V Id of the video shown in the screen Video id
url=[http://i.ytimg.co 04-28 13:56:28.969: DEBUG/YouTube(8676): Trying store file for m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/9duD_mf8-T8/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 13:52:08.621: INFO/YouTube(4829): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/PHCw4FxCPro/ratings ?client=mvapp-android-htc]. client=CLIENT
Main
YouTube
Main
YouTube
Client
131
Main/ Internal State Video set as unfavorit e Video set as unfavorit e Video set as unfavorit e
Buffer
Tag
Data
Format
Example
Main
YouTube
User name
Main
YouTube
Client
Main
YouTube
21. My subscriptions Not relevant data generated in this state 22. Show a subscribed/ an unsubscribed channel Main/ Internal State Buffer Tag Data Format Example
YouTube
Channel id
url=[http://gdata.youtu 05-28 14:53:40.718: DEBUG/YouTube(1370): Trying store file for be.com/feeds/api/users url=[http://gdata.youtube.com/feeds/api/users/Antonpup/uploads?max/CHANNELID/upload results=9&start-index=1&v=2]. s
132
Buffer
Tag
Data
Format
Example
Main (see Main note 1) Main (see Main note 1) Main (see Main note 1) Main Video rated Video rated Unsubscr ibe a channel Unsubscr ibe a channel Main Main
max-result=MAXRESULT start-index=STARTINDEX v=V Id of the video shown in the screen 04-28 14:16:38.104: DEBUG/YouTube(8676): Trying store file for url=[http://i.ytimg.com/vi/N9oxmRT2YWw/default.jpg].
Main Main
YouTube YouTube
url=[http://gdata.youtu 05-25 13:53:06.211: INFO/YouTube(4829): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/TCrCbq2TQiQ/ratings? client=mvapp-android-htc]. client=CLIENT url=[http://gdata.youtu 04-28 20:34:57.340: INFO/YouTube(12364): Requesting using direct be.com/feeds/api/users connection /USERNAME url=[http://gdata.youtube.com/feeds/api/users/pablomunyoz/subscriptio ns/6ko_zSB7WmHOyDqfKizbxVLIFycHy8PZZBz2v9GMmxI?client client=CLIENT =mvapp-android-htc].
Main
YouTube
Client
YouTube
Channel id
133
Note 1: It generated two types of main logs for each channel. For example, it generated those main logs for the channel Antonpup: 05-28 14:53:40.678: DEBUG/YouTube(1370): Trying store file for url=[http://gdata.youtube.com/feeds/api/users/Antonpup?v=2]. 05-28 14:53:40.718: DEBUG/YouTube(1370): Trying store file for url=[http://gdata.youtube.com/feeds/api/users/Antonpup/uploads?maxresults=9&start-index=1&v=2]. The second one is utilized to obtain information. 23. My playlist Not relevant information generated in this state. 24. Show a playlist Main/ Internal State Main Buffer Tag Data Format Example
Main
YouTube
Playlist Id
url=[http://gdata.youtu 04-28 14:12:54.864: INFO/YouTube(8676): Requesting using MASF be.com/feeds/api/playl url=[http://gdata.youtube.com/feeds/api/playlists/037BB0C6722C73A ists/PLAYLISTID E]. url=[http://i.ytimg.co 04-28 14:12:57.174: DEBUG/YouTube(8676): Trying store file for m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/OYecfV3ubP8/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 14:02:07.671: INFO/YouTube(4978): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/KyJtsxKIS2k/ratings?cl ient=mvapp-android-htc]. client=CLIENT
Main
Main
YouTube
Main
YouTube
Main
YouTube
Client
25. My videos
134
Main/ Internal State Main Main Main Main Video rated Video rated Video deleted Video deleted
Buffer
Tag
Data
Format
Example
Main Main
YouTube YouTube
url=[http://gdata.youtu 05-25 14:08:08.611: INFO/YouTube(5143): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/n_4bE2dYZy8/ratings? client=mvapp-android-htc]. client=CLIENT url=[http://gdata.youtu 05-27 13:52:02.938: INFO/YouTube(24572): Requesting using direct be.com/feeds/api/users connection /USERNAME/uploads url=[http://gdata.youtube.com/feeds/api/users/pablomunyoz/uploads/_6 krXiXFe5o?client=mvapp-android-htc]. url=[http://gdata.youtu be.com/feeds/api/users /username/uploads/VI DEOID client=CLIENT
Main
YouTube
Video id
Video deleted
Main
YouTube
Client
135
Buffer
Tag
Data
Format
Example
Main
YouTube
url=[http://i.ytimg.co 05-27 13:52:06.378: DEBUG/YouTube(24572): Trying store file for m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/wCL5rTQ_PJk/default.jpg]. t.jpg].
Note 1: When a video is deleted, it should be removed from the list of My videos. Then the screen should be updated. 26. Categories Main/ Internal State Main Buffer Tag Data Format Example
Main
YouTube
Locale
hl=LOCALE
27-41. Show a category The state 27 to 41 show the video classified by different category. Both the data charged and the internal states are the same. For simplicity, in this document is going to show the examples for the category Comedy. Main/ Internal State Main Buffer Tag Data Format Example
Main
YouTube
Locale
Main
Main
YouTube
Format
url=[http://gdata.youtu 04-28 14:18:03.334: INFO/YouTube(8676): Requesting using MASF be.com/feeds/api/stand url=[http://gdata.youtube.com/feeds/api/standardfeeds/HK/most_viewe ardfeeds/LOCALE d_Comedy?format=2%2C3%2C9&maxresults=9&safeSearch=strict&start-index=1&time=this_week&v=2]. format=FORMAT
136
Buffer
Tag
Data
Format
Example
max-results Safe search Start index Time V Id of the video shown in the screen Video id
max-result=MAXRESULT safeSearch=SAFESE ARCH start-index=STARTINDEX time=TIME v=V url=[http://i.ytimg.co 04-28 14:18:06.084: DEBUG/YouTube(8676): Trying store file for m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/cGNy-3JHOM8/default.jpg]. t.jpg]. url=[http://gdata.youtu 05-25 14:27:13.231: INFO/YouTube(5143): Requesting using direct be.com/feeds/api/vide connection os/VIDEOID/ratings url=[http://gdata.youtube.com/feeds/api/videos/47ItSdBqggA/ratings?c lient=mvapp-android-htc] . client=CLIENT
Main
YouTube
Main
YouTube
Client
42. Settings No log generated in this state. 43. Share a video This state is context dependent.
137
44. Flag a video Main/ Internal State Main Buffer Tag Data Format Example
Events
am_new_i ntent
Video id
http://m.youtube.com/ falg?v=VIDEOID
Modes Logged in Buffer Main Tag YouTube Data Id of the video shown in the screen Format Example
url=[http://i.ytimg.co 05-28 18:40:32.770: DEBUG/YouTube(7422): Trying store file for m/vi/VIDEOID/defaul url=[http://i.ytimg.com/vi/y63IVluVGnA/default.jpg]. t.jpg].
Logged out No relevant data generated in this state Parallel actions Start uploading video recorded Buffer Tag Data Format Example
Main
MediaUpl oader
Account Id
138
Start uploading video Buffer Main Tag MediaUpl oader Data Account Id Format Getting youtube authToken for ACCOUNT ID Example 04-27 19:06:00.325: DEBUG/MediaUploader(284): Getting youtube authToken for cucdeseda@gmail.com
139
Value Qualcomm MSM 7200A, 528 MHZ Android ROM: 512 MB RAM: 288 MB Dimensions (LxWxT) 112 x 56.2 x 14,35 mm Weight 135 grams with battery Display 3.2-inch TFT-LCD touch-sensitive screen with 320x480 HVGA resolution Network HSPA/WCDMA 900/2100 MHz Up to 2 Mbps up-link and 7.2 Mbps down-link speeds Quad-band GSM/GPRS/EDGE 850/900/1800/1900 MHz (Band frequency and data speed are operator dependent) Device Control Trackball with Enter button GPS Internal GPS antenna Connectivity Bluetooth 2.0 with Enhanced Data Rate and A2DP for wireless stereo handsets Wi-fi: IEEE 802.11 b/g HTC extUSB (11-pin mini-USB 2.0 and audio jack in one) 3.5 mm audio jack Camera 5.0 megapixel color camera with auto focus Audio supported formats MP3, AAC(AAC, AAC+, AAC-LC), AMR-NB, WAV, MIDI and Windows Media Audio 9 Video supported formats MPEG-4, H.263, H.264 and Windows Media Video 9 Battery Rechargeable Lithium-ion battery Capacity: 1350 mAh Talk time Up to 420 minutes for WCDMA Up to 470 minutes for GSM Standby time Up to 750 hours for WCDMA Up to 440 hours for GSM Expansion Slot microSD memory card (SD 2.0 compatible) AC Adapter Voltage range/frequency: 100-240V AC, 50/60 Hz DC output: 5V and 1A Special Features G-Sensor Digital Compress Source: http://www.htc.com/europe/product/hero/specification.html
140