<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>The use of a smart application to track activities for achieving an active and healthy life</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Suela Maxhelaku</string-name>
          <email>suela.maxhelaku@fshn.edu.al</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Astrit Veliu</string-name>
          <email>astrit.veliu@fshnstudent.info</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alda Kika</string-name>
          <email>alda.kika@fshn.edu.al</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Silvana Greca</string-name>
          <email>silvana.greca@fshn.edu.al</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>E-Health, Interactive</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Activities</institution>
          ,
          <addr-line>Activity Tracker</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Computer Science Dept.</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Inactivity is a phenomenon that is recently characterizing the world and it is one of the main causes of chronic diseases. Health and lifestyle problems are increasingly seeking solutions that have technology as the main solution. In this paper we will analyze various algorithms and technologies that can be used to accomplish it and how to combine them to achieve a more active and healthy lifestyle. This paper proposes an Android mobile phone application that gives information how active are people during the day, how can we improve their life and implement a program with activity tracker. In the focus of the work are different age groups of people, where this technology will be implementated. Also, will be simulated an application which will enable statistics on the activities that the user has performed and various activities that he can accomplish through it.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Application,
Physical</p>
    </sec>
    <sec id="sec-2">
      <title>1 Introduction</title>
      <p>Today, the mobile phone industry is one of the
fastest and most dynamic business sector. The need to
communicate efficiently and instantaneously is always
a necessity. The market sector and the ever-growing
and demanding consumers always want to have more
and they want it better than ever. Having a mobile
phone for us makes life easier [Jem15].</p>
      <p>The number of smartphones are growing steadily in
recent years, especially because they have become
more accessible and more useful in everyday life. It is
almost impossible to imagine life without the help of
these devices [Rad16]. Given the high prevalence of
physical inactivity, it is necessary to develop new
costeffective, scalable approaches to increase physical
activity. One promising direction is the use of
smartphones in the delivery and personalization of
programs that motivate individuals to increase their
physical activity [Zho18].</p>
      <p>In the current age of technology, smartphones due to
their ubiquitous nature are commonly used as a
medium for promoting physical activities. But people
still rely less on gadgets, mobiles phones, and other
specialized devices to track a health indicator. This is
in contrast to the fact that recently there has been an
increase in the healthcare-related research and
unprecedented growth in the systems, devices, and
applications for healthcare management, be it on a
personal or a larger scale. So what is the reason that
despite the availability of plethora of mobile phone
applications and devices, half of the people still track
their health status in their head? This is due to the fact
that people mostly lack the motivation for performing
the physical activities. Users use these applications and
ultimately lose their interest after using it for a few
times only. Thus, creating the eagerness of living a
healthy life by engaging users is a goal that is more
challenging and demands more effort [Sar15].
This app will track activities that will be very useful
information on daily activities for the user, the amount
of liquid consumed and what is appropriate according
to body mass and gender. The application will also
include the possibility of digitizing the health card,
where every person can have his personal data always
with him without the need to keep the card. The app
will include a menu of foods and other useful services
such as personal agenda where the user can add notes
or memos use light in the dark, access and play music.
The application language will be simpler and will be
available to all people for download on smart Android
phones in the Play Store app. The objective of the app
is to promote physical activities and enable users to
achieve their activeness goal.</p>
    </sec>
    <sec id="sec-3">
      <title>2 Literature overview</title>
      <p>First, there was no requirement for additional
equipment such as pedometers or foot pods and no
need for data entry. This makes the app more attractive
to those who are ambivalent about the benefits of
measurement or about their ability to become fitter and
healthier [Con06]. Secondly, while most other apps
only activate when users provide notice that they are
about to begin an exercise event, this app measured
activity continually and without the need for any user
action. This feature of the app was intended to reduce
the initial investment of time and effort, increase
participation and reduce the dropout rate. In addition, it
ensured that the app measured the physical activity
inherent in routine, everyday activities, as well as more
purposeful exercise [Harr16]. Another research
suggests an easy way to implement and battery friendly
method to Step Counting problem, which is based on
Android smartphone accelerometer, Fast Fourier
Transform (FFT) and thresholding. The method, after
applied preprocessing and FFT to the data gathered
from smartphone's accelerometer (16hz), detects and
counts steps by comparing the data to predefined
thresholds. The predefined thresholds were specified
by analyzing the accelerometer data obtained while
users were sitting, standing, and walking. User
experiments were conducted to test the method. Results
showed 87.52% success for walking. Additionally, for
sitting and standing the method had a success over
99%, as expected. And for running, only 41.7% of the
steps were correctly counted [Dir17].</p>
      <p>Another method is gyroscope. Gyroscope is used to
measure the angular velocity and accelerometer is used
to measure the acceleration. Both sensors are suitable
for motion analysis and step counting but
accelerometer is more popular since its ability detect
motion and the rate of change in motion speed [Lin15].
Almost all existing pedometer techniques use
accelerometer data to identify steps, which is not very
accurate at low walking speeds. Another research also
describes a gyroscope-based pedometer algorithm
implemented in a smartphone. The smartphone is
placed in the pocket of the trouser, which is a usual
carrying position of the mobile phone. The gyroscope
sensor data is used for the identification of steps. The
algorithm was designed to demand minimal
computational resources so that it can be easily
implemented in an embedded platform [Jay13].
Also, there are a lot of applications like Water Drink
Reminder by Leap Fitness Group that analyses the
level of hydration or Fitbit application that track
activity and help improve the lifestyle but they need
Internet access to get the data.</p>
      <p>Also, the Android platform offers several sensors that
allow the device to monitor the movement. Possible
sensor architectures vary by sensor type: width, linear
acceleration, rotation vector, movement, step impact,
and step detector sensors.</p>
    </sec>
    <sec id="sec-4">
      <title>3 Modeling the solution</title>
      <sec id="sec-4-1">
        <title>3.1 Functional Requirements</title>
        <p>The functional requirements of the systems will be:
The users must create a personal profile through a
registration form, must perform activity and can save
calories burned in the steps taken, must record the
amount of liquids he consumes and have a graphical
view of the progress, must record consuming foods and
have a graphical view of progress, can create notes or
memos, plays the music he has on the device within the
application, can activate the flashlight of the device (if
any) from the application, adds data to the database and
has full control over them, has weekly statistics for
each activity, has the possibilities to share the statistics.
Also, the system will not allow the user to open the
gifts when there are insufficient scores and when the
daily goal is reached the user is notified via a message
from the system.</p>
      </sec>
      <sec id="sec-4-2">
        <title>3.2 Data modeling and application architecture</title>
        <p>Since we will not use the client-server architecture for
remote data storage, we will use SQLite for storing
them in the application memory. To further enhance
data security and manage them we will use content
providers. Mobile app design architecture usually
consists of multiple layers within an app, which
includes the following layers:
1. Presentation Layer - This layer consists of
components like UI components and UI process.
The focus is how the application will be presented to
the end user.
2. Business Layer - This layer is formed by business
entities, workflows, and business components.
3. Data Layer - This layer meets the application
requirements and facilitates secure data transactions.
All the data are within this layer. The system
receives as numerical input data from the
accelerometer sensor, which are executed in the
background and provide commands to perform the
activity calculation that the user is performing. This
layer processes the data and then displays a
notification if the conditions are meet. Also, the
result obtained by the Barcode with other data taken
from the camera are processed to generate the health
card and the user profile picture.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>3 Application Development</title>
      <sec id="sec-5-1">
        <title>3.1 Technologies used</title>
        <p>The software model chosen for the application is the
incremental model. This choice was made because the
application will be put into operation as soon as
possible, in order to be presented to the users and to
receive an evaluation from them [Bas12]. Through our
assessment, we will be able to add or change
application functionalities, bringing them closer to their
needs. Also, the cost of the incremental process is
lower compared to other alternatives. Development of
application uses the Android Studio program and Java
programming language. The interfaces are encoded
through the XML language, also a part of them are
programmed in Java. The other technologies on which
the app is based are:</p>
        <p>• Content Providers - manage activity data and
database.</p>
        <p>• Shared Preferences - Preserve user's personal
information.</p>
        <p>• EventBus - a service that enables communication
between activities.</p>
        <p>• BroadcastReceivers - stand all the time on standby
to display messages to users at certain time intervals.</p>
        <p>• Accelerometer Sensor - generates data for
measuring user activity.</p>
        <p>• Barcode Scanner - scanner for health card.</p>
        <p>• Adobe Photoshop CS6 - Adobe's software program
through which are processed icons and other
application graphics.</p>
        <p>• Android Services - serve to perform activities in
the background.</p>
        <p>• AsyncTasks - Increases application performance
by performing background calculation.</p>
      </sec>
      <sec id="sec-5-2">
        <title>3.2 Interface</title>
        <p>The user interface is a key element when creating an
application. Its wrong design can lead to project
failure. It is the only contact point the user has with the
app and through it accomplish a certain task. The
Android interface is provided by Layout components,
which are programmable in XML and can be located in
the widgets. The application development is based on
the Model View Controller (MVC) model where an
interface is an xml file separated from the logical
model that implements business logic [Sok14]. A
scheme of all activities is presented in the figure below
to create a better idea of the user interface.
The above chart shows the link between activities and
how we can move in the app. The main interface is
MainMenuActivity, from which we can open three
components. FragmentActivity displays daily data and
can start a new activity. FragmentWater &amp; Food lists
all drinks and foods and it is sufficient to choose one to
register on a database, and the daily hydration progress
is also visually presented. FragmentToolkit keeps the
tools and services that offer application. The user can
use device light, play music, and manage notes or
personal memos. From the side menu, we can navigate
to the profile where a summary of activities and
personal data are presented. The user has the ability to
update personal data in the EditProfile activity.
EditHealthCard activity provides a form where a health
card is scanned and other personal card data that are
reflected in HealthCard activity are scanned. Then we
have GiftsActivity where we list the gifts with the
relevant details where the user has the possibility to
click on them to open them and go to ViewActivity to
browse the information. SettingsActivity offers a
functionality that few applications offer. There the user
has the ability to determine the sensitivity of the step
measurement sensor and change the size of the step.
For statistics generation we go to StatisticsActivity and
through the graphs we have a reflection of the weekly
performance and we can share the activity with others.
Finally, InstructionsActivity and AboutUSActivity
have information on how to use the application and
how to contact the developer.</p>
      </sec>
      <sec id="sec-5-3">
        <title>3.3 Activity Measurer</title>
        <p>The application does not need to be connected to the
Internet. Any of its activity is performed offline, and
data exists as long as the application stays installed on
the device. In interface design, the elements are
position in such a way to provide more information at
the same time such as the current date and the number
of steps performed. At the center of the page we have
the actual progress of the activity presented with a
circular progress indicator which has the amount of
kcal burned. It is the presentation of the main activity
such as data, time interval, burnt kcal and speed of
movement. At the bottom of the layout there are two
buttons whose role is the management of the activity.
By clicking the start button, the application initializes
the step meter service that relies on the accelerometer
sensor and saves the number of steps.</p>
      </sec>
      <sec id="sec-5-4">
        <title>3.3 Hydration and food recorder</title>
        <p>Water &amp; Food is a design where the user can choose
and record foods and drinks consumed during the day.
Figure 3 shows the layout interface.
The figure above shows a visual representation of the
current hydration level and the image that appears is
according to the gender of the user. The information
that is displayed in this layout is the daily intent and
how it is currently implemented. In the center of the
layout, there is a circular button with the + icon.
Clicking it will show the drinks menu and we can
choose what we are consuming. At the bottom of the
page that are the foods which are automatically added
to the database.</p>
      </sec>
      <sec id="sec-5-5">
        <title>3.5 Tools - Toolkit</title>
        <p>Providing extra tools within the application is an added
value to the user because he does not need to download
other applications but use a single one.
In the above interface, we have a list of all notes and
memos. It is built in such a way that the user feels
familiar with the icons and manages all the tools within
the same interface. Here we can add a new memo or
note. Each of them can be modified and deleted. At the
same time, the activity is added to the database and
checked whether it is a memo or not.</p>
      </sec>
      <sec id="sec-5-6">
        <title>3.6 Health Card</title>
        <p>The application offers the possibility of digitizing the
health card, so every person can have his personal data
without the need to keep the physical card. The design
of Health Card is very simple and practical. It includes
a digitized health card presentation with the user's
picture, the barcode that is associated with the physical
card and other general data like blood group, patient
code and emergency contacts. Barcode is identical to
the one found on the card and everyone can scan it
through any barcode reader device and return the same
code. If the user has specified emergency contacts
when registering the card, when one of them clicks, the
Android application automatically opens with the
duplicate call number. By contrast, the buttons are
inactive and cannot be clicked. The profile picture is
stored in Shared Preferences, so it does not match the
other system data.</p>
      </sec>
    </sec>
    <sec id="sec-6">
      <title>4 Conclusions</title>
      <p>In this work, we have analyzed and explored the best
methods for tracing user activity. This application is for
everyone and fulfills all the needs, promotes activity
and registers the liquids or foods, reminds them and
motivates them by gifts. The application has been
developed in a way to have a usable user interface, but
at the same time the user achieves the goals he has set
himself. Also, in this application is implemented a step
meter, which through the accelerometer sensor
measures all the steps that the user performs and
calculates the burned kcal, the steps he has taken and
the speed of the movement. In carrying out activities
such as activity, hydration, or food, users can earn
points to unlock the gifts that are hidden in the
application. This technique is implemented to increase
user interest and as a motivation to influence the use of
the application. During the development, technical
problems have been encountered in realizing high
precision algorithms for measuring activity, optimizing
the application, and supporting a wide range of
smartphones.</p>
      <p>We conclude that conducting activities, driven by
mobile apps, is a very effective way to improve
lifestyle, all at no additional cost. Implementing
motivational techniques, including awards, gifts, and
motivational announcements, enhances user confidence
and encourages them to use more the application and to
meet daily activity goals. This application meets all the
conditions to be a true track record of activities for
achieving a healthier lifestyle in our country. In the
future, we expect the development of this application
for the iOS platform, performance optimization and the
addition of other services needed for the user.
In the future, we will work in developing web services
to integrate digital card, user personal informations and
other services in our system that has in focus managing
data and images in E-Health.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [Bas12]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bassil</surname>
          </string-name>
          .
          <article-title>A Simulation Model for the Waterfall Software Development Life Cycle</article-title>
          .
          <source>International Journal of Engineering &amp; Technology</source>
          ,
          <volume>2</volume>
          (
          <issue>5</issue>
          ),
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [Con06]
          <string-name>
            <given-names>S.</given-names>
            <surname>Consolvo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Everitt</surname>
          </string-name>
          ,
          <string-name>
            <surname>I. Smith</surname>
          </string-name>
          ,
          <string-name>
            <given-names>JA.</given-names>
            <surname>Landay</surname>
          </string-name>
          .
          <article-title>Design requirements for technologies that encourage physical activity</article-title>
          .
          <source>SIGCHI Conference on Human Factors in Computing Systems</source>
          . New York: ACM;
          <fpage>457</fpage>
          -
          <lpage>66</lpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [Dir17]
          <string-name>
            <given-names>A.</given-names>
            <surname>Cengizhan Dirican</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Aksoy</surname>
          </string-name>
          .
          <article-title>Step Counting Using Smartphone Accelerometer and Fast Fourier Transform</article-title>
          .
          <source>Innovations on Intelligents Systems and Applications Symposium</source>
          ,
          <volume>8</volume>
          (
          <issue>2</issue>
          ):
          <fpage>175</fpage>
          -
          <lpage>182</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [Harr16]
          <string-name>
            <given-names>T.</given-names>
            <surname>Harries</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Eslambolchilar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Retttie</surname>
          </string-name>
          , Ch. Stride,
          <string-name>
            <given-names>S.</given-names>
            <surname>Walton</surname>
          </string-name>
          , H. C. van Woerden.
          <source>BMC Public Health</source>
          ,
          <volume>16</volume>
          (
          <issue>1</issue>
          ):
          <fpage>925</fpage>
          ,
          <year>September 2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [Jay15]
          <string-name>
            <given-names>S.</given-names>
            <surname>Jayalath</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Abhayasinghe</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I. Murray. A Gyroscope</given-names>
            <surname>Based Accurate Pedometer Algorithm</surname>
          </string-name>
          .
          <source>International Conference on Indoor Positioning and Indoor Navigation</source>
          ,
          <year>October 2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [Jem15]
          <string-name>
            <given-names>G.</given-names>
            <surname>Jemilda</surname>
          </string-name>
          , R. Bala Krishnan,
          <string-name>
            <given-names>J.</given-names>
            <surname>Bengtson</surname>
          </string-name>
          .
          <article-title>Mobile Application for College Bus Tracking</article-title>
          .
          <source>International Journal of Computer Science and Mobile Computing</source>
          ,
          <volume>4</volume>
          (
          <issue>3</issue>
          ):
          <fpage>500</fpage>
          -
          <lpage>507</lpage>
          ,
          <year>March 2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [Lin15]
          <string-name>
            <given-names>J.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Chan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Yan</surname>
          </string-name>
          .
          <article-title>A Decision Tree Based Pedometer and Its Implementation on the Android Platform</article-title>
          . Third International Conference on Signal,
          <source>Image Processing and Pattern Recognition</source>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [Sar15]
          <string-name>
            <given-names>A.</given-names>
            <surname>Sarwar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Mukhtar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Maqbool</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Belaid. SmartFit: A Step Count</surname>
          </string-name>
          <article-title>Based Mobile Application for Engagement in Physical Activities</article-title>
          .
          <source>International Journal of Advanced Computer Science and Applications</source>
          ,
          <volume>6</volume>
          (
          <issue>8</issue>
          ):
          <fpage>271</fpage>
          -
          <lpage>278</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [Sok14]
          <string-name>
            <given-names>K.</given-names>
            <surname>Sokolova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lemercier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Garcia</surname>
          </string-name>
          .
          <article-title>Towards High Quality Mobile Applications: Android Passive MVC Architecture</article-title>
          .
          <source>International Journal on Advances in Software</source>
          ,
          <volume>7</volume>
          (
          <issue>1-2</issue>
          ),
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [Tur17] GM.
          <string-name>
            <surname>Turner-McGrievy</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Wilcox</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Boutté</surname>
            , BE. Hutto,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Singletary</surname>
          </string-name>
          , ER. Muth, AW. Hoover.
          <article-title>The Dietary Intervention to Enhance Tracking with mobile (DIET Mobile) study: A six-month randomized weight loss trial</article-title>
          .
          <source>Spring</source>
          ,
          <volume>25</volume>
          (
          <issue>8</issue>
          ):
          <fpage>1336</fpage>
          -
          <lpage>1342</lpage>
          ,
          <year>December 2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          <string-name>
            <surname>[Zho18] M. Zhou</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Mintz</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          <string-name>
            <surname>Fukuoka</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Goldberg</surname>
            , E. Flower,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Kaminsky</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Castillejo</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Aswani</surname>
          </string-name>
          .
          <article-title>Personalizing Mobile Fitness Apps using Reinforcement Learning. NRA-CSITApplication on Nosql database: Classification, Characteristics</article-title>
          and Comparison,
          <volume>268</volume>
          ,
          <year>March 2018</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>