Developing a Children Monitoring System for Mobile ...

14 downloads 175448 Views 2MB Size Report
monitoring and controlling connected devices [1][2][3][9][10][11]. This distributed .... including laptops, smartphones, and tablets. These devices need ... variety of mobile devices such as HTC, Samsung, and Sony [17]. Not like the IOS or ...
Kingdom of Saudi Arabia Ministry of Education Arab East Colleges

Developing a Children Monitoring System for Mobile Devices

Khwater Alkhwaiter Student’s ID 3510354 Supervised by Dr. Ahmed Elmogy

Table of Contents Abstract ...................................................................................................... 3 Chapter 1: Introduction .............................................................................. 4 1.1. Introduction ................................................................................. 5 1.2. Applications................................................................................... 6 Chapter 2: Background ................................................................................ 8 2.1 Background .................................................................................... 9 2.2 Technical Background ................................................................... 11 Chapter 3: Literature Review ................................................................... 14 3.1 Related Work ................................................................................ 15 3.2 Research Challenges .................................................................... 22

Chapter 4: System Analysis and Design ................................................... 23 4.1 The Application Description ........................................................ 24 4.2 System Analysis .......................................................................... 24 4.2.1 Use Cases ............................................................................. 24 4.2.2 Data Flow Diagrams (DFD) ................................................... 29 4.2.2.1

Context Diagram ............................................................. 29

4.2.2.2

Level 0 Diagram ............................................................... 30

4.2.2.3

Level 1 Diagrams ............................................................. 32

4.2.2.4

Level 2 Diagrams ............................................................. 35

4.3 Entity Relationship Diagram ........................................................ 36

Chapter 5: Implementation........................................................................ 38 5.1 Tools - Hardware and Software .................................................... 39 5.1.1 Hardware .......................................................................................... 39 1

5.1.2 Software............................................................................................ 39 5.1.2.1 Software Used to Prepare the Document .................... 39 5.1.2.2 Software Used to implement TimesUp Application ... 39 5.1.3 Languages Used to Developed TimesUp Application ............ 42 5.1.4 The Rented Domain ....................................................................... 42 5.2 Database Implementation ........................................................... 43 5.3 How TimesUp application work? ......................................................... 44 5.4 Implementation ............................................................................ 44 5.5 Implementation Challenges .......................................................... 74 Chapter 6: Conclusion ............................................................................... 76 6.1 Conclusion ................................................................................................ 77 6.2 Future Work ............................................................................................ 77 References ................................................................................................ 78 Appendix ................................................................................................... 80

2

Abstract Using electronic devices is not limited to adults or to specific time or place. Children use different types of mobile devices with no constrains. Guardians concern about the effect of the technical explosion on their children development. Controlling, monitoring, and managing approaches are in need to help in overcoming some of these worries. This project gives insight in approaches to monitor and control children electronic devices. The project includes an overview of the related research efforts that allow guardians to manage and monitor data, applications, or services available in kids’ mobile devices. The main challenge is to balance privacy and flexibility with the ease of use. The project also includes the implementation of an Android app called Time’s Up.

3

Chapter 1

Introduction

4

1.1. Introduction On the digital century where technology reaches kids hands, guardians may worry about the effect of this very open world on their kids’ development. They may worry about the detrimental effect of this technology on their educational, emotional and social developments [14][15][16]. To help overcome some of these worries, guardians may need to have some controlling technology to check and track their children usage for the personal devices. As tablet devices are one of the most used technologies by children on our society, guardians will need to have some automated technologies to observe and supervise the time and quality of their children’s usage for these tablets. Monitoring and controlling methodologies and approaches have been developed as the technologies are started or developed [1][2][3][9][10][11]. As human being, there are some concerns when using emerging technology. These concerns push developers to innovate ways to test, control, and manage new technologies. One of the most known approaches is based on the use of distributed architecture for the monitoring and controlling connected devices [1][2][3][9][10][11]. This distributed design allows for central controlling component over the connected devices either using client server approach, or mobile data management approach which will be the focus on this survey to monitor mobile devices. This survey is the base to help building up the proposed project, which will research the different methods available for technology usage surveillance. The project will focus more on the parental control over children’s tablet devices. Furthermore, the project will develop a controlling application for parental use on children’s tablet 5

devices. The proposed application may help guardians to not only control, but also evaluate the way their children handle and utilize the technologies available at their tablet devices. This survey is the base part of the project that includes the background for researching and developing the proposed application. The structure for this survey includes the background, the research challenges, applications, and overview of related work. The background reviews the security and network methodologies related to the main focus, and explains the main terminologies used in the related work. Then the survey includes the main difficulties that would face researchers on this area. Despite these challenges, there are vital applications for the monitoring and controlling concepts for education and work environment, which will be covered under the application part of this survey. Then the survey includes deeper insight on some experiments, studies, and methods related to monitoring and controlling mobile devices.

1.2. Applications Monitoring and controlling system can be used for different purposes. The aimed research and system after this survey mainly supports guardians wanting to control their children access to mobile devices. Future application may be built upon using the same core idea can help gathering data from different areas to support researches on how children use their electronic devices. Such study may use big data analysis to understand patterns in children behavior using mobile devices. Another application is for schools and universities to manage the usage of the computers or any other electronic devices at the schools’ labs. Teachers and professors 6

can use controlling systems to set policies and define permission to access specific software. Researchers, also, may use monitoring systems to study the way students utilize their lab time. Furthermore, employers can use managing and controlling systems to evaluate electronic devices usage during work. The usage evaluation, either for students or employees, can not only affect productivity using electronic devices, but also affect overall performance. It may also lead to enhance the choices for software and applications needed in schools or work devices. On the other hand, software developers need to utilize some controlling managing tools through the testing phase. Software testing may include a monitoring system for evaluating the components and the function required as proprieties from the software users.

7

Chapter 2

Background

8

2.1 Background Monitoring and controlling electronic devices and systems have been developed as technology changes over the years.

Under the security sciences, the

concepts of monitoring and controlling devices focus on possible threats and defining polices.

This part of the survey discusses the different methodologies and

terminologies used in controlling and monitoring mobile devices. Mobile Device Management MDM [12] is the terminology referring to the use of management systems to maintain the required level of security. The aim for MDM is to optimize the use of systems or applications available on mobile devices such as smartphones, tablets and laptops. Managing mobile devices requires the base phase of threats modeling. Many researches discussed in [12] investigated threats modeling methodology and concluded that the three phases thread modeling includes analyzing technical platform, assets identification, and threats definition. MDM can be developed using related approaches includes server-client and over the air programming. Server-clients approach is one of the wide used methodologies for controlling electronic devices [9][10][11]. Server-Clients approach is a distributed architecture modeling for building compatible systems on two different platforms servers and clients employing a network connection. The central component of the architecture is the server. Servers handle complex functions and store databases. Clients can be any type of devices connected through a network to the server to be allowed to access data or to utilize services provided from the server.

9

Over the air programming (OTAP) is the use of the wireless networks to perform transmission and reception function on the wireless communication systems [13]. The designed architecture for OTAP utilizes features of the distributed systems where there is a central-controlling component on the system that distributes commands, updates and services to the connected devices. On the mobile context, OTAP is used to access mobile services such as wireless application protocol (WAP), or multimedia and short messaging services (MMS and SMS).

OTAP, also, utilizes different transmission

protocols and technologies over the wireless connection such as trivial file transfer protocol (TFTP) for file transmission, and framework over the air (FOTA) when dealing with remote phone framework. Working in this area, also, requires the understanding of the main concepts of mobile context, noisy data, and screen time. Mobile context is the nature of mobile devices, which is the ability to be moved quickly and to be used on different background environment. The environment where the mobile device is being used differs as the device is been moved from environment to other one, which will accordingly change the context and circumstances for the mobile usage [1]. Noisy data is the data that has been collected from changing context, such as mobile context. discontinuity.

Such data lacks certainty and purity, as well as, suffers from

However, in researching data sciences, noisy data can represent

unstructured or corrupted data [1]. The time spent in exposing to media viewed through screen is screen time [14][15].

Media viewed through screens includes games, TV, and using electronic

devices such as computers, tablets, and smartphones. 10

2.2 Technical Background This part of the project discusses the technical environment used to implement the application including the operating system Android and the used software. Mobile devices refer to the electronic devices that can be use in mobility including laptops, smartphones, and tablets. These devices need suitable software to be the soft platforms that supports the mobility features. Excluding laptops, the fundamental and most used platforms for tablets and smartphones in these days are the IOS, Windows, and Android. The IOS is the operating system for the Apple mobile devices including iPhone and iPad, while Windows8 or windows phone are the operating systems developed by Microsoft. Android is the operating system for a variety of mobile devices such as HTC, Samsung, and Sony [17]. Not like the IOS or Windows, Android is an open source operating system. The Android system is developed for mobile devices built upon using Linux kernel. The open source feature indicates the free availability of the source code that can be used and customized by the developers. The operating system Android, also, operates on Android ware, TV, and Android Auto [20]. Android was developed in 2003 as an advanced operating system for digital camera, yet the developers realized that there is no valuable market for such operating system. Therefore, the Android developers switched to the market of mobile devices instead. In 2005 the company started Android was acquired by Google as a step from Google to be in the mobile devices business [17].

11

The main advantage of Android is the collaborations either with the mobile devices manufacturers such as HTC or Sony and the telecommunication business such as Sprint and to the aim of making the open standard platform for a variety of mobile devices. The open source base of the Android as operating system gives the advantage to create an open platform that supports not only telecommunication carriers and mobile devices manufacturers, but also gives developers a real base for mobile devices environment that supports their innovations [17]. Applications for the Android operating system are programmed using the SDK Android software development kit and Java programming language that also may be used with C or C++. The SDK is a rich programming platform with a variety of development tools that includes libraries, debugger, documentation, sample code, and tutorials [17] [18]. The SDK will be explained in details on the implementation chapter. An android app is the mobile software or a group of software that is designed, developed, and implemented to serve end-user needs. Android apps developed to be utilized on mobile devices empowered by Android platform. An app usually goes through three phases including design, develop, and distribute. The process to create an application for Android starts with installing one of the development environments such as Android Studio and Eclipse. Then, the process includes the creation of the android project with the java files and the resource files. Then test the created app on a debuggable environment by installing, running and debugging the app on a device or on emulator. The final phase is to publish the app on the app market, which is the Google Play [18]. Developers may also have the

12

choice to distribute their apps through websites or sending their apps immediately to audience using emails [21].

13

Chapter 3

Literature Review

14

3.1 Related Work Monitoring mobile devices has been a concern for not only individual users, but also for organizations, communities, and scientific researchers. The challenge of using monitoring applications is about how the collected data will be handled and the how to build a macroscopic patterns from the collected data. This part of the survey discussed the summary of the selected research papers related to monitoring mobile devices. In [1], the authors discussed the importance of having mobile phone sensing to develop micro and macro views of mobile usage. This importance increases as the mobile devices has become the main computing and communication devices. Therefore, research areas on data collection, analysis and patterns learning are becoming rich discussion area, especially with all the cheap features and technological advances available on phones allowing for a variety of users experiences and usage. The framework architecture proposed in [1] is built upon using mobile phone sensing and the cloud computing. The paper discussed the different challenges with gathering data techniques using mobile and unexpected environment (mobile context), as well as, the privacy issues on gathering personal information from a third party applications. The study [1] discussed the three different scales mobile sensing considered beneficial on: individual, group, and community data gathering. The scalability feature of gathering individual behaviour to learn from community patterns may help improve communities in social, healthy and environmental studies. The study also explained the 15

two sensing paradigms: participatory sensing, which involves users who lunch sensors manually, and opportunistic sensing, where sensors automatically collect data. The main focus of the introduced work in [2] is about understanding how personal data travels through selected third-party applications. The authors raised the issue about violating privacy barriers when applications access the personal information by only ask for users permissions to access the data with no explanation of how the data will be used. The research [2] proposed a monitoring platform based on Android mobile phone to track the data flow through 30 selected applications. After testing the proposed the platform, the research concluded that 20 apps miss used the users’ private data and 15 apps used users’ locations to support marketing services. The main challenges in monitoring the use of mobile apps include the shortage of smartphone used data as a resource constrained, as well as, the dynamic nature of data flow using mobile devices. This dynamicity causes another context-based challenge because data could be sent at any time and any place. Further, mobile apps allow for across sharing data and information among different apps, which increase the difficulty in monitor single flow between an app and the operating system. The proposed platform only track data flows but not control flows. Data flows are the explicit flowing of data through the apps. Control flows are the implicit flowing of data that require analytical analysis. Furthermore, the research focus in [3] proposed a cloud service application to track and monitor android programs and performs static and dynamic analysis. The goal of using the Sandbox application is to maintain smartphones security by detecting any malicious patterns or malware. The static analysis works by scanning software before 16

installation, while dynamic analysis works by installing software on an isolated environment then does the analysis process. The researchers in [3] also discussed the challenging and issues related to security and smartphones control. There is a difference between securing mobile phones and smartphones. Mobile phones only work through the secure and closed network for calls and messages services, while smartphones are enabled to be connected the Internet. The security risk using mobile smartphones increases as these devices being able to use the Internet and host third party applications. Resolving the tension between security and flexibility is one issue in this regard, as well as, caring about privacy when different sensors share personal data with third party. Furthermore, the limitation on smartphones hardware makes it more challenging to run or install sufficient detection software to analyse security threats. Furthermore, authors in [4] proposed a tool to monitor software behaviour that also creates models for current and past system behaviour. The proposed tool offers visualized analysis for the monitored software without affecting system performance, which makes it more appropriate for the continuous monitoring tool. Developing such tool is important to use for continuous program comprehension and analysis. On the other hand, researchers in [5] discussed different case studies on using personal mobile phones. Studying the developing usage of mobile devices is an active research area as using mobile devices has been essential for personal level on every day activities. Owning personal mobile phone, for example, has doubled the number of PCs used globally. Although, there are different researches of static computing environment, the mobile environment requires dynamic tracking of what, why, when and how data is 17

used on the mobile context. The paper explained four research difficulties in researching mobile technology usage including coverage, situated, scale, and robustness. The coverage challenge is how to get into resolution stage automatically without asking for feedback to get the rich features of what interest drives certain behaviour. The other challenge is about gathering research data that was collected on real usage of mobile technology where collecting feedback done during the use of events. The scalability challenge in researching mobile technology associated with having many devices used normally for long time. The fourth difficulty is based on having continuous connection to mobile devices allowing for collecting durable data on the mobile usage context [5]. Moreover, in [5] the authors differentiated three types of events in using mobile devices. One is the device use in connection, application, or media. The other is about personalized usage in the user context, such as the talking, the text in messages, or the calendar notes and appointments. The last type of events is based on the environmental usage of the device sensors such as GPS, or wireless and mobile connections. Also in [5] authors indicated the different approaches researchers use to study the usage of the mobile phone. These four approaches include the direct monitoring, the evaluation through the lab environment, the self-report, and the automated logging approach. Yet, all these approaches lack the evaluation of users experiences. Researchers in [6] proposed a framework to monitor the software requirements while execution. The framework also does the checking and assertion processes, as well as, allows for automated support. Researchers explained that the software requirements are the needed processes provided by the software users to the 18

developers and developed as properties. The software requirements are subject to change under different cases including the rare and unpredicted events and the limitation or recovery of hardware failure. The two challenges concern the software monitor developers are expressing suspect and run-time environment. The transparency of the software while execution and the monitoring marks for suspect requirements. There are four elements for the proposed framework in [6] including the high level requirements, the analysis and design, the implementation and instrumenting, and the monitoring. The monitoring stage has cases in viewing activities and their meanings including the case of violating requirements, going to violate requirements, or there is a chance to violation. The explanation in the report [7] indicated the different uses for mobile devices for young children and the percentage of children owning or only using mobile devices such as laptops, tablets, and smartphones. Children use these devices to access to different types of media including games and TV. The report also explained in details that third of the tested sample aged 5-15 have their own mobile devices to use for a variety of purposes. On the other hand, there are many patent innovations related to the researching area of monitoring and controlling methods for parents over their children devices. The section below gives an overview of different methods and systems innovated to control and monitor electronic devices. In the innovation [8], the authors indicated the importance for having controlling tool in parents’ hands over their kids devices comes from two reasons. First reason is the availability of the violated content through media that can be easily 19

accessed by mobile devices. The second is that parents work most of their time while kids have more time using mobile devices and exposing to electronic media, rather than doing the normal physical games or activities. The innovated method includes three models; the permission model, the controlling model, and the monitoring model. The permission model allows parents to set the access level for each connected device. This access level is the base for the controlling model where each connected device can only access content within the access level defined earlier. The monitoring model allows parents to evaluate the history of usage foe the controlled devices. The innovation in [9] is a computer entertainment tracker application for limiting usage of specific computer application. The software allows guardians to control different computers games by locks. The children can only unlock the preferred games using earned credits. The children can earn credits by doing predefined tasks. Parents can set many tasks and associated each task to specific credits. In [9] the authors pointed out that the purpose of using such application is to help children to have meaningful time using electronic devices, as well as, minimizing the affect to be addicted to computer games without defining any limitations or controlling method.

The addiction to computers has increased since more

entertainment functions such as media viewing and games become available to children and adults all the time. Furthermore in [10], authors proposed a controlling method built upon having two kinds of accounts allow users to connect to the server either as a parent or a child. Each type of the accounts allows for predefined settings. As technology offers more innovative options, in [11] authors developed newer approaches to monitor and control, such as managing and controlling mobile data in. 20

The infrastructure proposed on this research is based on utilizing policy database and policy servers. Using the policy base, controller can manage the used of data or services and inspect application or services through the deep inspection application control server.

3.2 Research Challenges The main three difficulties that would face researchers in this area include the balance between security and the ease of use, the uncertainty of testes data used through mobile context, and violating personal privacy boundaries [1][6]. Most of the monitoring and controlling approaches [2][3][4][6][9][10][11] require adding more system layers or components. Examples for added layers or components would be presented as permissions, passwords, policy, or verifications. The more the system use these security activities the more is difficult to maintain flexibility and ease of use. Balancing security and smooth usage is hard to maintain especially with using other layers such as networking or mobile devices. The research challenge associated with the mobile context elements on the mobile devices, such as mobile phone and tablets, is based on the changing circumstance of using such portable devices [1].

The unexpected and unstable

background environment may cause the lack of pure and correct data gathering (noisy data) that would affect the effectiveness of the data analysis and the persuasion stage [1]. The most difficult challenge to overcome is the handling personal data when monitoring and controlling systems. Users may hastate to share their personal information or may provide incorrect data, especially most systems only ask for 21

permission to access data without explaining how the data is going to be used. Providing personal data for longtime using mobile devices for examination purposes is a hard task to maintain, so that researchers may do such experiments using labs with few devices. Yet such setting would not provide the research with data used in normal circumstances [6].

22

Chapter 4

System Analysis and Design

23

4.1 The Application Description The proposed system is a mobile application titled by the name Time’s Up application. Time’s Up will be mainly used by Parents or guardians to control the kids usage for mobile devices. The application will allow users to set policy and restrictions for other applications, as well as to time out the usage duration for application or for over the entire device. The application will allow the users not only to control their kids’ usage, but also to evaluate the time their children spent on using mobile device. The application will also allow users to have an overview of the usage based on the restrictions by displaying diagrams to compare and evaluate the device usage for certain time.

4.2 System Analysis The system analysis and design process is the essential step to build systems. The need for this analysis and design is to determine the requirements of the system and to understand the operations. Therefore, the following section includes the Use Cases and Data Flow Diagrams (DFD) that will explain the analysis and design for the system features and operations [19].

4.2.1 Use Cases The discussion in [19] explains that the use of the use cases in the analysis and design phase will help to understand exactly the need from the system by answering the following questions. What is the status before start? Who starts actions? What information is need to complete actions in each step? Which databases should be

24

accessed? What is the input and output of each step? What is the result after each use case? For the proposed system, there are four main use cases. The use cases are listed below. 1. Parents Registration 2. Restriction choices 3. Report diagram 4. Recovery password

25

Use case name: Parents Registration

ID: UC-1

Priority: High

Actor: Parents Description: This use case describes how Parents register password and E-mail then stores it in the database

Trigger: parents decides to make a registration Type:  External  Temporal Preconditions: Download the application Parents are not register before Normal Course: 1- The application shows the window that contains the registration fields (password – E-mail) 2- Parents fill registration fields by correct information 3- The application checks if fields are filled correctly then shows the window that contains the parents information, if not shows the error message 4- If the displayed information is correct parents press OK button, now they are registered, if not press Cancel button 5- If OK button is pressed, the application shows the window that contains the Welcome message. If Cancel button is pressed, the application shows the window that contains the registration fields again 6- If parents press Exit button, application is terminated Alternatives: 3.1 Invalid identifier entered, indicate error message

Information for Steps: parents information register information

Registration confirmation

Error message

Postconditions: Registration is done Summary Inputs Parents information

Source Parents

Outputs Parents registration

Destination Parents database

26

Use case name: restriction choices

ID: UC-2

Priority: High

Actor: Parents Description: This use case describes how to control applications by (duration of using app, app lock, how many times using app, and determine usage time) Trigger: Parents decides to control the applications in the device Type:  External  Temporal Preconditions: Parents registration Information for Steps: Normal Course: 1- Parents logs in to the application by password only 2- The application shows a welcome window, then shows main interface of the application, which contains choice for lock the device and all applications downloaded on the device 3- Parents select lock devise choice 4- The application shows a window that contains choices of locked (lock at, lock from-to). 5- Parents select the wont choice and write hours to lock 6- Parents press Save button 7- The application shows the main interface of the application again 8- If Parents set restriction for kids press Exit button to exit from application Alternatives: 3.1 Parents select all applications downloaded on the device choice. 3.2 The application shows a window that contains all application downloaded on the device. 3.3 Parents select the application want to control. 3.4 The application shows a window that contains application information (duration of using, how many times using app) and choices (app lock, determine usage timer) for each selected app. 3.5 Parents choose app lock (Yes, No) or determine usage timer (From, To) then, press Save button Postconditions: Restriction is done Summary Inputs Parents password Parents choice Choice of one of the applications

Source Parents Parents Parents

Outputs Applications choices Applications information

Parents password Applications choices Parents choice Applications choices Parents choice Applications choices

Parents choice Applications choices Parents choice one of the applications Applications information Parents choices

Destination Application Database Application Database

27

Use case name: report diagram Actor: Parents

ID: UC-3

Priority: medium

Description: This use case describes the reporting diagrams for all applications used or not used and ranks applications based on usage time. Trigger: Parents wont to see report. Type:  External  Temporal Preconditions: Parents registration Normal Course: Information for Steps: 1- Parents log in to the application by password only Parents password 2- The application shows a welcome window, then shows the main Applications choices interface of the application, which contains a choice for reporting diagrams Parents choice 3- Parents select the choice 4- The application shows a window that contains a diagram for Applications diagram applications used or not used and ranks application based on usage time 5- Parents press Back button 6- The application shows the main interface of the application again 7- If Parents see the diagram press Exit button to exit from application Postconditions: View report is done Summary Inputs Source Outputs Destination Parents password Parents Applications choices Application Database Parents choice Parents Applications diagram Application Database

Use case name: Recovery password Actor: Parents

ID: UC-4

Description: This use case describes how recovery the password if parent forget it. Trigger: Parents recovery the password Type:  External  Temporal Preconditions: Parents registration Normal Course: 1- Parents forget the password 2- The application asked parents to send the password to registered E-mail 3- Parents press Ok button 4- The application sends the password to the E-mail 5- If Parents get password, then they can log in as usual Postconditions: Recovery password is done Summary Inputs Source Outputs Parents choice Parents Parents password

Priority: medium

Information for Steps:

Parents choice Parents password

Destination Parents Database

28

4.2.2 Data Flow Diagrams (DFD) The discussion in [19] defines the DFD as a technique used to represent graphically data flow through the system, and interactions between the system and databases. 4.2.2.1 Context Diagram The first DFD (figure 1) gives the over view of the Time's Up application and shows the connections with external entities. Figure 1 represents the Time's Up application as one process labelled by number 0, and shows the data flows in and out the system that flows from and to the application and Parents.

29

4.2.2.2 Level 0 Diagram The level 0 diagrams show all the processes at the first level and how each process is connected to the data stores and external entities. The four main processes in Time’s Up application includes: 

Parents Registration process

Figure 2 represents the Parents Registration process, which is labeled by number 1 and shows the data flows from and to the Parents database and the external entity Parents.



Restriction choices

Figure 3 represents the Restriction choices process, which is labelled by number 2 and shows the data flows from and to applications database and the external entity Parents.

30



Report Diagram

Figure 4 represents the Report Diagram process, which is labeled by number 3 and shows the data flows from and to applications database and the external entity Parents.

31



Recovery Password

Figure 5 represents the Recovery Password process, which is labeled by number 4 and shows the data flows from and to the Parents Database and the external entity Parents.

4.2.2.3 Level 1 Diagrams The diagrams in level 1 show details about each process in level 0 by dividing each process to its main functions. Figure 6 represents the main functions of Parents Registration process, which include insert parents information, view register information, registration confirmation, check entry, and show interface. Figure 7 represents the main functions of Restriction choices process, which include show interface, set lock restriction choice, and set all applications restriction choice. Figure 8 shows the main functions of Report Diagram process, which include select type of diagram and view report. 32

Figure 9 represents the main functions of Recovery Password process, which include sending to registered email and sending password.

33

34

4.2.2.4 Level 2 Diagrams The diagrams in level 2 demonstrate more details about processes to explain complex functions. Figure 10 represents more details about the sub functions of the process set lock restriction choice, which include show lock information, set timer lock (at or from – to), and show interface

Figure 11 shows more details about the sub functions of the process set all applications restriction choice, which include show application information, set applications restriction, and show interface.

35

4.3 Entity Relationship Diagram

The discussion in [19] defines the Entity Relationship Diagram (ERD) as a snapshot of arranging information used, moved and stored by the system. For the proposed application, the Time’s Up application, the ERD in Figure 12 shows the relation between entities. The Parents entity has attributes Name, ID, Password and Email, and it is connected to the Applications entity by the relationship UsageTimer. The relation UsageTimer has two attributes Start Time and End Time, and has one-to-many cardinality (1:M). The other relationship is Locked Apps and it has one-to-many cardinality (1:M) also. The AppUsage entity has many attributes including appname, Duration and last Time Used.

36

37

Chapter 5

Implementation

38

5.1 Tools - Hardware and Software 5.1.1 Hardware The hardware used for this project includes a Lenovo laptop, Lenovo tablet and smartphone.

5.1.2 Software 5.1.2.1 Software Used to Prepare the Document  Microsoft office word 2013 Microsoft word is a word processor. It is used to prepare documents and it has special features such as word wrap and spell check which enable the production of neat documents [24]. We use it for TimesUp Application report.

 Microsoft office PowerPoint 2013 Microsoft PowerPoint is used for creating presentations. The pages in PowerPoint can contain pictures, texts, graphs and other things that can make the presentation more entertaining and easier to understand [24].

5.1.2.2 Software Used to implement TimesUp Application  Android Studio The Android Studio is the official programming environment that allows developers to build Android apps.

The studio is an integrated development

environment (IDE) based on Intelligent IDEA and offers useful features to Android 39

platform developers. These features include Project Structure, Gradle Build System, Debug and Profile Tools, Memory and CPU monitor, Data file access, Code inspections, Annotations in Android Studio, and Log messages [22]. The Project Structure provides developers with an organized view to their projects’ files. A project in Android Studio may include one or many modules that contain resource and source code files. This feature usefully supports developers with a direct and quick access to source files of their projects. Gradle Build System is used in Android Studio as the base of the build system. Gradle is an integrated tool that can be used from the Android Studio menu, yet it is used independently from the source file of command line. The importance of using this feature is the ability to manipulate the building code without affecting the app's core source files [22]. Besides organizing the developed projects, Android Studio offers full control to app developers. The other features available at Android studio to control and analyze the work include the Debug and Profile Tools and Memory and CPU monitor. These two features offer to programmers the assistance to analyze and test code performance with monitoring the memory and CPU usage. Also, the Data file access features allows developers to have all the needed data to exam and analyze the app performance. Furthermore, the Code inspections and Annotations in Android Studio automatically inspects apps during the compile time to catch bugs or mistaken resource allocation. Developers may also have more control by viewing device log messages, the logcat, when developing and running apps in Android Studio [22].

 SDK A Software Development Kit (SDK) that assists in the development of Android 40

apps. The SDK includes the development tools, as well as, the libraries and all of the different packages needed to build, develop, and test the apps [17][18]. The SDK offers developers a variety of useful features [17][18] including: 

The libraries dedicated for media to enables developers to play and record many different audio, video and image formats



The integration map controls



Different application framework



The libraries for 2D and 3D graphics

 Emulator The Emulator is one of the used tools within the Android SDK. The importance of having such tool is to provide developers with a virtual mobile device showing on the screen. The Emulator uses the virtual mobile device for testing developed apps with no need to have actual mobile devices [18].

 GENYMOTION Genymotion is one of the best-used emulators for Android apps for the testing and presentation. Developers use Genymotion as a third party emulator instead of using the default Android emulator for the available features. Genymotion allows developers to simulate the perfect Android environment for testing and presentation. Developers can also change the environment thought the testing by using any of the mobility environment for any actual device including location, network quality, and battery charge level, as well as, simulating phone calls or text [23].

41

5.1.3 Languages Used to Developed TimesUp Application 

Java

Class-based, Object-oriented 

XML (Extensible Markup Language)

Defines rules for encoding documents that can be readable by human and machine and using it across the Internet. 

PHP (PHP Hypertext Preprocessor)

Server scripting language between Java and data base to generate the pages automatically. 

SQL (Structured Query Language)

A special purpose programming languages designed for managing data stored in a relational database management system.

5.1.4 The Rented Domain TimesUp app is hosted on a web server with cPanel feature from GoDaddy.com instead of having a local Server (Wamp). This rented domain would make the work flow easier and more fixable. Below are the server details that include: 

Domain name: www.timesupsystems.com



Server disk space: 100 GB



cPanel features used: phpMyAdmin, MySQL Databases

Figure 13 shows cPanel home page.

42

Figure 13 - cPanel home page

5.2 Database Implementation The database creation through using the following steps that include: 1- From cPanel home page > MySQL Databases > Create New Database (Figure 14)

Figure 14 - MySQL Databases 2- Create admin user for created data base has accessibility to it. 3- Choose New from phpMyAdmin > timesup (Figure 15).

43

Figure 15 - phpMyAdmin

TimesUp Application has four main tables, which include: 

Parents (name, email,password,ID)



LockedApps(ID ,Appname)



AppsUsage(ID,appname,Duration,lastTimeUsed)



UsageTimer(ID,StartTime,EndTime)

5.3 How TimesUp application work? Below are the steps of process: 1. The user enters information using application interface. 2. Java Code interacts with the interface and perform http calls to the server side 3. The server side uses PHP language to interact with the database and mail functionality

5.4 Implementation This section shows the screens of main functions of TimesUp application. The main functions are explained in details below.

44

 LOGIN Figure 16 shows TimesUp login screen with Email and password.

Figure 16 - Login screen

Login code explanation 

Client side code :

Login Method (Figure 17) takes the username and password, store it in a shared preference and post it to the server side to check the credentials.

45

Figure 17 - login method



Server side Code

Code in Figure 18 receives the username and password from the android client and retrieve information from the database to validate user credentials.

46

Figure 18 - Login PHP

 Registration Figure 19 shows TimesUp login screen with Name, Email and password.

47

Figure 19 - Registration screen

Registration User code explanation 

Client Side Code:

Registration User method (Figure 20) takes the user input and create an object to handle http communication in the background.

48

Figure 20 - Registration User method

49

Figure 21 shows the code of Posting the values to server side using Http.

Figure 21 - Posting using Http



Server Side Code

This PHP code shown in Figure 22 validates posted data and stores it in the Database

50

Figure 22 - validates posted data

 Retrieve Password Figure 23 shows retrieving password screen by sending the password to registered email.

51

Figure 23 - Retrieve Password screen

Retrieve Password code explanation 

Client Side code

Method in figure 24 reads user email from user input.

52

Figure 24 – Read user email from input

Then, Asynchronous code posts an http request to the server side shown in Figure 25.

Figure 25 – Asynchronous code

53



Server Side code

Code in Figure 26 validates and posts an email with user password.

Figure 26 – validates and posts an email

Figure 27 is the Email sample send it to the parent forget the password

Figure 27 – Email Sample

54

 Logout Figure 28 shows TimesUp logout screen with assurance massage.

Figure 28 – logout and assurance massage

Logout code explanation Method in Figure 29 clears shared preference and session values in order to logout the current user.

55

;

Figure 29 – clears shared preference and session values

 Action Bar menu Figure 30 shows TimesUp Action Bar menu with the following options that include: 

Home



Monitor settings



Report diagrams



Lock an application



logout

56

Figure 30 – Action Bar menu

Action Bar menu code explanation The following code in Figure 31 inheritance in each activity that requires this menu to be displayed.

57

Figure 31 – inheritance code in each activity values

 Lock an Application Figure 32 shows TimesUp lock option in front of each application.

58

Figure 32 – lock option

Lock an application code explanation 

Client Side code

Method in figure 33 retrieves all installed applications in the device.

59

Figure 33 – retrieves all installed applications

Code in Figure 34 checks the foreground application and determine wither it should be locked.

Figure 34 – checks the foreground application

60

If the foreground application should be locked, below screen (Figure 35) will appear to unlock the application

Figure 35 – unlock the application

Code (Figure 36) checks if the user clicks the buttons presented in the screen: 

If user clicks "Cancel" the application will open device home screen



If user clicks "Unlock" the application will verify user credentials and unlocks the application.

61

Figure 36 – checks user clicking Asynchronous request to the server side in order to verify the credentials (Figure 37) and by using the same code in (Figure 26) to validate username and password at server said.

Figure 37 – Asynchronous request

62

 Monitor Settings Figure 38 shows TimesUp Monitor settings option screen.

Figure 38 – Monitor settings

If usage monitor permission is not enabled the following screen (Figure 39) will be displayed.

63

Figure 39 – enable permission

Line of code in Figure 40 checks if the permission is enabled.

Figure 40 – check enable permission

64

The following Figure 41 retrieves time from time picker, and current system time when the user clicks "Start" button.

Figure 41 – time picker

Below code (Figure 42) will start the alarm to schedule collecting usage data based on timer data, and cache data into SharedPreference.

Figure 42 – collecting usage data 65

Starting asynchronous http post (Figure 43) to save usage time data in the database.

Figure 43 – save usage time



Server side code

The following code (Figure 44) will interact with the database (PHP code).

66

Figure 44 – save time at database

 Usage data retrieval After the alarm completed, the code (Figure 45) will execute the broadcast receiver which will handle any events after the alarm in the background.

Figure 45 – handle events

67

New class at (Figure 46) will be executed to retrieve usage statuses and store in the database.

Figure 46 – retrieve usage statuses

 Usage data storage This method will executed at the background. 

Client Side

Method at Figure 47 responsible for posting data to the server.

68

Figure 47 – posting data to the server

69



Server side:

The code below (Figure 48) will validate posted data and store it in the database.

Figure 48 – validate posted data

The following server side code (Figure 49) will send an email to the client once the data is inserted in the database.

70

Figure 49 – send an email to the client The templet Email send by TimesUp application shown in Figure 50.

Figure 50 – templet Email

71

 Chart Diagram Figure 51 shows TimesUp reporting diagram option screen. For implementing bar chart need to use AndroidPlot library. For full class code , check the appendix.

Figure 51 – reporting diagram

 Gradle and manifest properties AndroidManifest.xml is the main properties file of android project one of them is permissions which are used in project (Figure 52).

72

Figure 52 – manifest permissions

 Build.gradle Figure 53 shown the imported libraries used in the project.

Figure 53 – Build.gradle

73

5.5 Implementation Challenges 1. HTTP problem The Protocol exception (java.net.ProtocolException) method does not support a request

(body:

GET/POST).

This

challenge

was

fixed

by

adding

the

(conn.setDoOutput(true);) before calling the (getOutputStream). 2. System permission issue After

allowing

the

usage

statuses

permission

(), this error accrued. Permission is only granted to system apps. This issue was handled by disabling the Using system app permission as shown on the Figure 54.

Figure 54 – app permission 3. Maintain login session This problem was fixed by adding Volley library for login and session management. 74

4. ListView and items issue Creating separate layout for items fixed this issue. 5. Background tasks not working Creating Async class to handle background tasks solved this issue. 6. Alarm is not allowed to run repeatedly every 10 seconds Using handlers solved this issue. 7. Same menu in each activity This issue was addressed by creating a separate class for the menu and extends it in each class.

75

Chapter 6

Conclusion

76

6.1 Conclusion This project demonstrated a discussion on developing systems and approaches to control, manage, and monitor the use of different electronic devices. The project discussed some of research efforts related to monitoring mobile devices and some of the developed techniques. Accordingly, the project concluded some of the main research challenges when researching this area including the difficulty on maintain privacy and providing normal and clear data while using mobile devices. Furthermore, the project included the implantation of the monitoring system called Time’s Up application, which will help guardians to control and evaluate their kids use of mobile devices. The analysis, design, and implementation for the proposed system, Time’s Up, are included.

6.2 Future Work The future work that can be done to expand this project includes the development for a website, as well as, the implementation for the IOS platform. The website would be helpful to the app users to connect and manage their accounts through different platforms. For example, if one family uses different devices, the family guardian would use the website to control and manage several devices at same time. Furthermore, the expansion to different platform, the IOS, is important to be developed in the future. Guardians would want to have such a great app regardless to the used platforms, IOS or Android.

77

References [1] Lane, Nicholas D., et al. "A survey of mobile phone sensing." Communications Magazine, IEEE 48.9 (2010): 140-150.

[2] Enck, William, et al. "TaintDroid: an information-flow tracking system for realtime privacy monitoring on smartphones." ACM Transactions on Computer Systems (TOCS) 32.2 (2014): 5.

[3] Bläsing, Thomas, et al. "An android application sandbox system for suspicious software detection." Malicious and unwanted software (MALWARE), 2010 5th international conference on. IEEE, 2010.

[4] Rohr, Matthias, et al. "Kieker: Continuous monitoring and on demand visualization of Java software behavior." (2008): 80-85.

[5] Froehlich, Jon, et al. "MyExperience: a system for in situ tracing and capturing of user feedback on mobile phones." Proceedings of the 5th international conference on Mobile systems, applications and services. ACM, 2007.

[6] Robinson, William N. "Monitoring software requirements using instrumented code." System Sciences, 2002. HICSS. Proceedings of the 35th Annual Hawaii International Conference on. IEEE, 2002.

[7] Ofcom, October. "Children and Parents: Media Use and Attitudes Report." (2014).

[8] Kuhn, Roland, Philippe Morin, and Brian Hanson. "Method and parental control and monitoring of usage of devices connected to home network." U.S. Patent No. 7,046,139. 16 May 2006.

[9] Corrallo, Charles Shane. "Computer Entertainment Tracker Application for Limiting Use of Specific Computer Applications and Method of Use." U.S. Patent Application 13/031,032.

[10] Gatz, Scott, et al. "Parental control system for use in connection with accountbased internet access server." U.S. Patent Application 09/858,855.

[11] Balia, Hinal K. "Systems and methods for managing and monitoring mobile data, content, access, and usage." U.S. Patent No. 8,095,124. 10 Jan. 2012.

78

[12] Rhee, Keunwoo, et al. "Threat modeling of a mobile device management system for secure smart work." Electronic Commerce Research 13.3 (2013): 243-256.

[13] Quadri, A. S. A., and B. Othman Sidek. "An Introduction to Over-the-Air Programming in Wireless Sensor Networks."

[14] Ayaz Nanji, MarketingProfs. "75% of American Children Under 8 Have Access to a Smartphone or Tablet". 8 November, 2013.

[15] Kelly Wallace, CNN. "Forget TV! iPhones and iPads dazzle babies".7 October, 2014.

[16] Joanna Walters, The Guardian. "Tablets and smartphones may affect social and emotional development, scientists speculate". 2 February, 2015.

[17] "The Android Source Code." The Android Source Code. Web. 21 Dec. 2015. [18] Bhatia, Randeep, ed. "Introduction of Android Programming." 16 Feb. 2012. [19] Dennis, Alan, Barbara Haley Wixom, and Roberta M. Roth. Systems analysis and design. John wiley & sons, 2014.

[20] Android.com.(2016). Android. [online] Available at: https://www.android.com [Accessed 25 Apr. 2016].

[21] Android.Developers.[online]Developer.android.com.Available.at: http://developer.android.com/distribute/tools/open-distribution.html [Accessed 25 Apr. 2016].

[22] AndroidStudioOverview|AndroidDevelopers.[online]Developer.android.com. Availableat: http://developer.android.com/tools/studio/index.html [Accessed 25 Apr. 2016].

[23] Genymotion – Fast And Easy Android Emulation. [online] Available at: https://www.genymotion.com [Accessed 25 A

[24] Microsoft Store. (2016). Microsoft Store - Xbox, Surface 3 Tablet, PC, Office, Windows Phone. [online] Available at: http://www.microsoftstore.com [Accessed 26 Apr. 2016].

79

Appendix

80