6-Affes Achraf
6-Affes Achraf
6-Affes Achraf
Acknowledgements ....................................................................................................................1
Introduction ...............................................................................................................................1
Presentation of the host organization. .......................................................................................2
Chapter 1 PRELIMINARY STUDY .................................................................................................3
1. Goals: ..................................................................................................................................3
2. State of the art: ...................................................................................................................3
2.1. Introduction: ............................................................................................................................ 3
2.2. Study of the existing:................................................................................................................ 3
2.3. Conclusion: .............................................................................................................................. 4
2.4. Added Value: ........................................................................................................................... 4
2.5. Work Plan: ............................................................................................................................... 4
Chapter 2 SPECIFICATION AND ANALYSIS...................................................................................6
1. Introduction ........................................................................................................................6
2. Design methodology ...........................................................................................................6
3. Choice of modeling language ..............................................................................................6
4. Identification of functional and non-functional requirements ............................................6
4.1. Identification of actors: ............................................................................................................ 7
4.2. Funcional requirements: .......................................................................................................... 7
4.3. Non-functional requirements : ................................................................................................. 7
5. Use Case Diagram ................................................................................................................8
6. Detailed Use Case analysis: .................................................................................................9
6.1. Use Case : Consult DashBoard .................................................................................................. 9
6.2. Use Case : Consult Activities ................................................................................................... 10
6.3. Use Case : Consult Rules......................................................................................................... 11
6.4. Use Case : Send FeedBack ...................................................................................................... 12
7. Sequence Diagramme........................................................................................................12
7.1. Consult DashBoard ................................................................................................................. 13
7.2. Consult Activities.................................................................................................................... 15
8. Technologie Requirement + Softwares used .....................................................................17
8.1. VSCode .................................................................................................................................. 17
8.2. Github .................................................................................................................................... 17
8.3. Flutter .................................................................................................................................... 17
8.4. Android Debug Bridge ............................................................................................................ 17
8.5. FireBase ................................................................................................................................. 18
8.6. Pub ........................................................................................................................................ 18
8.7. AdobeXD ................................................................................................................................ 19
9. app_usage functionality ....................................................................................................20
Chapter 3 Realization! ..............................................................................................................22
1. Prototyping .......................................................................................................................22
1.1. SplashScreen UI...................................................................................................................... 22
1.2. DashBoard UI ......................................................................................................................... 22
1.3. Activities UI ............................................................................................................................ 23
1.4. Rules UI.................................................................................................................................. 24
1.5. Add Rule UI ............................................................................................................................ 24
1.6. Settings UI.............................................................................................................................. 25
1.7. About-Us UI ........................................................................................................................... 26
1.8. Send FeedBack UI ................................................................................................................... 27
General Conclusion ...................................................................................................................28
Bibliography .............................................................................................................................29
List of figures
At the end of this internship, I have the great honor to present my sincere thanks
to all the people who participated in the success of this experience.
Finally, I want to express my sincere thanks to all the professors of SUPCOM for
their efforts during our studies, which made this experience worthwhile and enjoyable.
Introduction
Nowadays, IT is considered an essential tool for any company that does not want
to remain on the sidelines of computerization. Indeed, it has long been seen as a
support for the various logistical operations of companies, this support has evolved in
time and space, and even increased thanks to the improvement of computer systems,
as well as to the perpetual performance of computer hardware. This evolution continues
so that it is impossible, if not unthinkable, to run a serious business without
computerization.
The fact that hardware alone is insufficient to run a successful business, but
software solutions are what makes it potentially doable and attainable to keep up with
the pace of change is indeed what encourages me to stick to my goals of becoming a
software engineer in the first place, and therefore comes the choice of my 2nd year’s
summer internship as a SUP’COMien engineering student.
1
The main objective of this internship was to approach a project as a software
engineer, thinking entirely about the planification of such project, the fluidity of the user
experience, getting better at understanding how the framework works, diving deeper
into debugging, testing, database integration ( local and cloud based ).
In addition, I was able to make new connections with professionals, learn from
their own experiences and understand what the job market really requires and demands
from a software engineer.
2
Chapter 1 PRELIMINARY STUDY
1. Goals:
Develop an easy to use android application where users can track their
smartphone usage.
Allow users to set rules to rSSemind and warn them when they spend too much
time on the phone in general or on specific applications.
Work primarily on the user experience by making the application easy and simple
to use, and as optimized as possible (low battery usage, low RAM usage, less
computation, etc.).
2.1. Introduction:
In this chapter, we will talk about the study of the existing applications with an
abstract layer of details such as what problems exists within the already developed
solutions, what are the features provided etc.
In this section we will talk about the different existing solutions which have
similarities with our project.
StayFree
(+) Accurate data ( usage percentages )
( - ) Warning system requires the app to be on screen
( - ) Complicated UI/UX ( so much details )
3
Usage Analyzer
(+) Accurate data ( usage percentages )
( - ) Antique odd UI/UX
( - ) One language ( English only )
Screen Time
(+) Simple and acceptable UI/UX
( - ) inaccurate data ( usage percentages )
( - ) One language ( English only )
2.3. Conclusion:
Phase 2 :
Project initiation.
Making decisions around what packages to use.
4
Using Android Debug Bridge (ADB) in order to make sure that the data gathered is
accurate.
Local database and CRUD functionality integration
Firebase integration ( report a bug / contact us )
Phase 3 :
Project overview and testing.
Bugs fixing and UX improvements.
Study of further developement and enhancement.
Project deployment
5
Chapter 2 SPECIFICATION AND ANALYSIS
1. Introduction
2. Design methodology
This choice is justified by the fact that UML has several advantages :
This phase consists of understanding the context of the system. It determines the
functionalities of the most relevant actors .
6
4.1. Identification of actors:
An actor is the modeling of a role played by an external person who interacts with
the application. The different actors interacting with our application are:
In this part, we will identify the needs of the actors of the application.
A functional need (or a use case in terms of UML), expresses an action which the
The functionalities that will be provided by the system are divided in two categories as
follows:
User-specific features:
Consults DashBoard ( summarized usage )
Consults Activities ( detailed usage of each app for each day )
Manage Rules : User will be able to create usage rules in order to customize the
notification system.
Costumize the application ( Language, Theme, notifications etc )
Report bugs and contact the developers
Administrator-specific features :
Consults the reviews in general
These are requirements that are not related to the behavior of the system but
that identify the internal and external constraints of the system.
7
Usability: The application has to be easy and simple to use in order to
make the users more comfortable and more engaged with the services.
Accuracy: Presenting accurate usage data
Performance : The application must be efficient, that is to say that the
system must be as optimized as possible with low battery usage.
8
6. Detailed Use Case analysis:
The analysis of the use case digram makes it possible to identify for each of
these cases the objectives, the actors, the preconditions, the postconditions as well as
the nominal and alternative scenarios in order to describe the functioning of the system.
In this session we describe some of the use case analyses represented in the
diagrams in Figure 1
Actor User
Sequencing description
Nominal Scenario
Alternative Scenario
9
E1: Usage Access denied
1. The system Shows an interface asking for permession
2. The Scenario resumes at step 1
E2 : DataBase Connection problems
1. The systems Shows and error message <<Connection denied>>
2. The systems resumes at step 2
Actor User
Sequencing description
Nominal Scenario
Alternative Scenario
10
E1 : DataBase Connection problems
1. The systems Shows and error message <<Connection denied>>
2. The systems resumes at step 1
The user can consult all the predefined rules, showing breif
Summary
details about each rule and allowing the user to edit or delete it
Actor User
Sequencing description
Nominal Scenario
Alternative Scenario
11
6.4. Use Case : Send FeedBack
Table 4. Analysis of the use case «Send FeedBack»
Actor User
Sequencing description
Nominal Scenario
1. The user fills in with the feedBack description and title then submits it
2. The System establishes a connection with the firebase firestore
3. If the connection was successfully established then a dialog message says
that the feedBack was successfully sent
4. Else a dialog box asks the user to recheck his internet connection
Alternative Scenario
7. Sequence Diagramme
12
formulation. In the following section, we present the sequence diagram for some of the
use cases of our system.
The system consults the local database for the weekly usage using the provided
weekId by the user
If the database responds with an empty list the system checks the log files of
each application package and calculates the weekly usage of each one
The system then saves the calculated data to the local database
Checks the lastCheck variable, if the current time exceeded the lastCheck
variable with 10 minutes.
The system then runs the same process to calculate the general data then saves
it to the local database.
The system updates the lastCheck variable and Shows the data to the user
13
Figure 2. Sequence diagram «Consult DashBoard»
14
7.2. Consult Activities
15
Figure 3. Sequence diagram «Consult Activities»
16
8. Technologie Requirement + Softwares used
8.1. VSCode
8.2. Github
collaboration features
Figure 5. GitHub Logo
Figure 5. GitHub Logo
8.3. Flutter
of commands on a device
17
8.5. FireBase
8.6. Pub
flutter_svg :
Used to use svg pictures ( Icons, Logos etc ) designed in AdobeXD
fl_chart :
Used to represent charts ( line chart and pie chart ) the package allows
custom styling and design for better UI/UX.
app_usage:
This librarie allows the data gathering for each application package in android
only, the functionality of this librarie will be explained later on.
Intl :
Provides internationalization and localization facilities, including message
translation, plurals and genders, date/number formatting and parsing, and
bidirectional text
Sqflite :
SQLite plugin for Flutter, that uses DB operation executed in a background
thread on iOS and Android.
flutter_easyloading
flutter_local_notifications
cloud_firestore :
18
Flutter plugin for Cloud Firestore, a cloud-hosted, noSQL database with live
synchronization and offline support on Android and iOS.
8.7. AdobeXD
19
9. app_usage functionality
To explain the way this librarie works we need first to dig deeper into the life
cycle of an android application.
20
Table 5. Android application States
Method Description
onResume called when activity will start interacting with the user.
In order to get the usage of a certain application we simply check the log files of
that specific app using its packageName and simply calculate the periods between each
onResume and onPause using the provided starting and ending date. We made sure
that the data provided by this librarie is accurate by using the ADB shell
21
Chapter 3 Realization!
1. Prototyping
1.1. SplashScreen UI
Splash screen is the first graphical notification you receive when you visit the
app. It can appear as an introductory screen of an application or simply to notifies the
user that the program is in the process of loading.
1.2. DashBoard UI
22
Figure 14. DashBoard UI
1.3. Activities UI
The Activities interface contains breif usage informations about each application
suchs as usage percentage, app category, usage time and the improvement status.
23
1.4. Rules UI
The Tules interface allos the user to consult all the predefined rules, showing
breif details about each rule and allowing the user to edit or delete it
The Add Rule interface allows the user to add a new rule by filling in a simple
form, By selecting the application name, the usage limit and the notification frequency.
24
Figure 17. Add Rule UI
1.6. Settings UI
The Settings interface provides multiple features, including the change langugae
functionality, the general notifications customization, switching to dark theme and its the
route to other interfaces such as the about interface and the feedback functionality.
25
1.7. About-Us UI
The Abous-Us interface simply gives informations about the developers of this
app, as well as its main functionality and an answer to the most common asked
question.
26
1.8. Send FeedBack UI
The Send FeedBack interface allows the user to fill in a simple form with a
FeedBack content and title, and sends it to the cloud so that the developers can check it
later on.
27
General Conclusion
The objective of our project was the study and implementation of an Android
application to keep track of the usage behavior of the user, This project was supervised
by Mr.Taieb.Meftah at the company “web graphique”.
In order to carry out our project we started with the definition of the functional
requirements, followed by the design of the different UML diagrams representing the
use case diagram and some sequence diagrams, then we started the realization phase
in which we presented the technical architecture of our application followed by the
presentation of the environment and the different development tools, we also explained
the use of some libraries and packages.
28
Bibliography
FireBase https://firebase.google.com/
Adobe XD https://www.adobe.com/fr/products/xd.html
29