Supporting Better Physical Activity in a Smart City: a Framework for Suggesting and Supervising Walking Paths

Article history: Received: 01 June, 2019 Accepted: 27 July, 2019 Online: 20 August, 2019


Introduction
This paper is an extension of work originally presented in 2018 2 nd International Conference on Technology and Innovation in Sports, Health and Wellbeing (TISHW) [1].
Active and healthy aging is important as individuals should have the best life possible and this usually means a long and healthy life. It is important for individuals as well as for communities since a political concern is the mounting pressure on national health services of aging societies due to the ever larger proportion of elderly population. Therefore it is important to minimize costs associated to assistance to people and digital technologies can give an important contribution. As healthier aging benefits both individuals and societies, there is a growing awareness of the importance of promoting it, with autonomy and independence, and preserving each one's functional capacity.
The question is thus: how to help people aging with good health? Several studies suggest that monitoring people's level of activity has the potential to foster health and well-* Mário Rodrigues, IEETA -Campus Universitário de Santiago, Aveiro, Portugal, Tel. +351 234 370 500 & mjfr@ua.pt www.astesj.com https://dx.doi.org/10.25046/aj040449 being by transforming it from an individual goal towards a collective and social goal [2,3]. Some experiments have concluded that the use of information and communication technology (ICT) enabled devices to collect individual performance data, a communication network for sharing those data, can contribute to increase the activity levels and to promote community building. Other studies go further ahead and infer that connecting residents and municipal health professionals through digital applications can decrease ansiety levels thus increasing well-being and promoting a sense of comfort as for instance to reassure young parents that a nurse is as close as a click of a button [2]. Mobile health (mHealth) is a paradigm that refers to medical and health practice supported by mobile devices. Despite the rapid growth of mHealth, mainly due to the significant growth in mobile device penetration [4], there are still a number of challenges including the need of having a high degree of security, reliability, quality, and effectiveness. Technological advances (e.g. accelerometers) have allowed for the objective measurement and characterization of physical activity and sedentary behavior in terms of volume, duration, intensity and frequency. This helps to personalize strategies and interventions aiming to increase physical activity and decrease sedentary behavior as well as goal setting [5]. Most mobile applications (apps) related to health, well-being, and physical exercise are not properly validated or under the supervision of health professionals, even though some are quite popular and well rated by users [6]. Privacy concerns also arise when apps collect and store data. The importance and potential impact on people's life of health related advices and personal information makes it a quite sensitive topic to be explored without proper validation and supervision.
In this paper we discuss and present a framework for a monitoring system of wellbeing and physical activity in the context of Smart Cities. The framework is more than a single mHealth app as it is designed for health professionals take control and operate the system, having access to user specific information as well as to contextual information about users' environment.
Although the proposed framework is more than an app, as it will have health professionals operating the system and will take into consideration contextual and user specific information, the app is a key component as it will be the interface for end users. The back-office component is designed to work with a range of alternative apps however it is important to provide a default app that, at least, works as a showcase of good practices and helps to illustrate the framework potential.
The framework is designed for the global Smart City, in the sense that its technical solutions and its conceptual approach take advantage of sensor and city state information. The framework is deployed in a concrete Smart City: the Smart City ofÁgueda that is a member of the Open and Agile Smart Cities.Águeda was selected for two reasons: (1) it is recognized nationally and internationally as one of the most dynamic Smart Cities of Portugal; (2) it belongs to a region where the proportion of elder population is increasing, as in many other Portuguese and European areas. The Portuguese census of 2011 showed that 22,5% of the population of in this region was 65 years old or more.
From the city authorities perspective, collecting infor-mation where people usually practice outdoor exercise, or stroll, is valuable for planning public spaces . More and  better infrastructures like fitness equipment, benches for  people to seat and rest for a while, children's playgrounds,  sports equipment as Basketball fields, among other, can  be better located if city officials posses such information. Also, concerning mobility, is important to know here people concentrate when deciding the location of bicycle parking structures, electrical vehicle's chargers, bus stops, and so on and so forth [7]. After the introduction in this section, section II presents the relevant background and related work on smart city projects and on mHealth and related mobile applications. The third section explains the developed work, discussing the relevant implementation details and presenting the interface of the system. The following section, Section IV, discusses the main features of the proposed framework and explains how it helps to mitigate known shortcomings in current mHealth solutions. The paper ends with the conclusions in section V.

Background and Related Work
This section will first provide some background information on smart cities followed by recent relevant projects on this topic. Then, the section introduces background information on mHealth ending with a description of three of the most popular apps for mHealth.

Smart Cities
Smart City has become a key marketing term for researchers and politicians to justify technological investments in urban areas. Several cities and less dense urban areas in quite different stages of development claim to be smart, with no clear definition of what a Smart City is. One universally accepted aspect is that ICT are the smartness enabler. With this reality in mind, some researchers have identified a minimal set of features that must fulfilled for an urban area be able to claim its smartness [8]. It is widely accepted that to be considered smart an urban area must: (1) have an explicit agenda about the development of its smartness; (2) providing open data about itself; (3) provide software services or mobile applications that may be used widely; and (4) have some kind of digital infrastructure that allow data communication in its area of actuation.
As a measurement of the order of magnitude of smart city initiatives, a study from 2017 [8] found that "more than 300 cities of all types and sizes participate in approximately 40 coalitions, thinking tanks and forums or are being advised by organizations, in their attempts to co-define their innovative future, while most of them claim to be smart, and almost all cities want to engage in this era". Smart cities aim to improve the quality of life for residents and visitors. As such, most of the city's intelligence indicators are defined with respect to the potential impact on people's lives. The study conducted in [9] lead to the observation that "a Smart City is quintessentially enabled by the use of technologies (especially ICT) to improve competitiveness and ensure a more sustainable future by symbiotic linkage of networks of peowww.astesj.com 405 ple, businesses, technologies, infrastructures, consumption, energy and spaces". The European Union (EU) adopted an indicator that measures the city's smartness according to six dimensions [9,10]. This indicator is also adopted here because of its relevance and because the proposed framework will be implemented in an EU city, and the dimensions are: 1. Smart Governance -relates to the degree of citizen participation in public life, transparency of governance, and the quantity and quality of public and social services.
2. Smart Economy -how competitive is the economy measured by its innovative spirit, entrepreneurship, international insertion, among other.
3. Smart Mobility -addresses concerns such as the existence of transport infrastructure considering (inter-)national and local accessibility, availability of IT infrastructure, and sustainability of the transportation system.

Smart
Environment -what is the concern level about natural resources, including environmental conditions, air quality, sustainable resource management and ecological awareness.

Smart
People -is about human and social capital, including the level of qualification, the promotion of lifelong learning and ethnic plurality, and the openness of minds.
6. Smart Living -is relative to the quality of life, including cultural and educational facilities, health conditions, quality of housing and tourist attractiveness, among other.
Smart City initiatives can address any combination of these six dimensions, and can be quite distinct in terms of goals and technical solutions adopted. For example, innovation in Smart Living includes transformations in construction, urban planning and renovation of facilities whereas innovation in Smart Mobility may involve tracking systems, and in Smart Governance may just entail a change in official procedures without further material investment. Overall, solutions that drive initiatives may involve cyber-physical integration of sensors and other hardware, or be primarily a software engineering challenge to generate new applications and services, or be more closely related to data science and analysis of big data. Considering the six dimensions of the EU smart city indicator, the framework proposed is aligned with the Smart Living dimension. As such, here will be described works that contribute to Smart Living and that are ready to be deployed in a real context.

i-SCOPE
The i-SCOPE project -interoperable Smart City services through an Open Platform for urban Ecosystems [11] covers four dimensions of the Smart City indicator: Living, Environment, Mobility, and People. In the context of the project was developed an open platform that supports three services: (1) optimization of buildings energy consumption through the precise evaluation of the potential and loss of solar energy; (2) environmental monitoring through real-time noise mapping, leveraged by the involvement of citizens, as citizens and their mobile devices can act as sensors, thus being able to measure noise levels throughout the city in a distributed way; and (3) a service more related to this work, which aims to improve the inclusion and personal mobility of elderly citizens and mobility difficulties. In this context, the platform presents a detailed urban layout, with features and barriers, to allow a precise and personalized routing service that takes into account the characteristics of individuals and the city [11]. The i-SCOPE had pilots implemented in the cities of Wien (Austria), Newcastle (United Kingdom), Indjija (Serbia), Lázio Region (Italy), and Zadar County (Croatia).

Amsterdam Smart City Platform
The Amsterdam Smart City Platform [12,13] is an initiative that includes several projects developed and implemented in Amsterdam (The Netherlands). Being a comprehensive initiative, it contributes to the various profiles of the Smart City indicator. From the set of projects that contribute to the profile of Living, two are related more related to the framework discussed in this work: VITAMINE [14] and PAUL -Active Urban Living based on playful data [15].
The VITAMINE project, dubbed the Dutch word for vitamin, was created to help the elderly who are looking for a suitable lifestyle [14]. The idea is to increase the frequency of training activities by providing and supporting an additional home workout program. The absence of an exercise supervisor or instructor is mitigated by the availability of online support. In addition, it also focuses on the diet of its users and the example given is to examine whether the use of extra protein has or does not effect on exercise.
The PAUL project aims to understand how the physical activity of city dwellers can be increased using custom apps [15]. It is observed that different apps to stimulate people to exercise exercise use different strategies [6]. The way to encourage more exercise, or at least maintain the same level of activity, varies and can be motivational messages, games, or peer comparison. The project assumes that the type of app that works best for a particular person is a highly individual choice. Thus, the project studies how to make the best match between the user and the app.

mHealth
Health Apps are a good option for the elderly especially because of its mobility and portability. However, some important issues need to be addressed since older people often find it difficult to use new technologies including smartphones and respective apps [16]. However, the Internet and the use of smartphones among the elderly population will increase in the near future, as the elderly in the future will be more likely to use the Internet to search information than the elderly today. In addition, they are concerned about health and are likely to use the Internet for health-related issues [17]. Thus, there seems to be a potential interest in older adults to use mHealth apps, which is essential for these systems to be adopted by that group.
www.astesj.com 406 The development of new ICT applications, especially those that need mobile devices or the Internet, should help reduce the digital divide. This suggests that, in order to have an application accessible to a large group of older adults, it is appropriate to opt for a human-centered design process whose key premises are the active involvement of users in the development process as well as in the evaluation of interactive systems [18]. In addition, a human-centered design choice also appears to be a valuable approach when developing a mobile health application for other stakeholders, such as health professionals.
Experiments exist with context-aware recommender system that offers personalized recommendations of exercise routes to people according to their medical condition, and real-time information from a smart city [19]. This recommender has predefined routes and selects the best route based on a memory-based method that employs neighborhood search (to determine groups of similar users) and on information such as air quality, ultraviolet radiation, wind speed, temperature, and precipitation. The user can then select the best course according to their profile (age, effort, distance) and can inform the system about unexpected situations that could affect other users. Users can also propose new routes [19].
There are dozens of fitness apps and discussing a representative set here would not bring further insights into discussion. Nevertheless, here will be described three popular and feature-full apps selected from dozens due to their higher ratings voted by hundreds of users, for better understanding of what is being made and the real potential of such applications. The first application was developed for iOS and Android, the second one just for iOS, and the third one just for Android.

Pacer Pedometer & Step Tracker
This app uses a set of parameters based on the smartphone sensors and usage patterns to classify the user's lifestyle from sedentary to highly active [20]. It contains a step counting algorithm, and allows to check the performance over a certain period of time, presenting results using graphics for easier reading. The historical data is recorded and can be used to check whether or not the user has progressed against their goal, in terms of number of steps per day as well as calorie and weight loss. A set of predefined objectives are defined to give users a sense of progression. The app encourages users to exercise in case of a long period of poor activity, and it has a social component in which users, besides being able to share the number of steps taken, can also encourage friends to exercise as well.

The Walk: Fitness Tracker Game
This app was created in conjunction with United Kingdom's National Health Service and essencially is a game to stimulate people to walk more often [21]. The apps monitors the activities of the user to verify if the user is walking, provides several stories and users are required to move for progressing in the story. So this app is masked in a game for encouraging people to reach the adequate number of steps per day thus improving their health. As such, it motivates users to follow the story and not so much to take into account the number of steps or distance traveled.

Pedometer -Step Counter
The main feature of this app is a step counter. As a secondary functionality, it computes several metrics acquired through specifically designed exercises [22]. The application records the evolution of the metrics over time. Users can have training plans focused on each part of the body with the purpose of achieving their own goals more efficiently, addressing more specifically the part of the body they intend to exercise. It includes several other tests possible using the smartphone sensors such as hearing test and color blindness test.

Developed Work
The objective of this framework is to explain how mHealth can be further improved by making sure that health professionals are at the core of the decisions, without hindering the vibrant existing mHealth app market. Having health professionals at the core of the decisions means that users are followed by health professionals, and not just by algorithms or predefined generic reference values, and that they are in control of the recommendations passed to users having the ability to take into account the individual health history or recent changes in its health conditions. Health professionals also have access to contextual information such as weather conditions, points of interest and sidewalk conditions, among others, to obtain an accurate perspective of the real environment where users will develop their walks. They are able to recommend (new) exercises and walk paths, or introduce the necessary changes to correct less optimal situations. Figure 1 depicts the proposal overview. Distinct type of mHealth apps are able to interact with the back-office application. At the top of the figure is represented a health professional analyzing the users' data and assuring that they have the best possible walk program, at the bottom of the picture are represented some users doing their exercises, and between them is a system composed by the communication networks and by the back-office.

Framework Description
Two health professionals helped defining the requirements of the framework, of the back-office application, and helped to define personas to guide the user experience requirements. The requirements identified for the back-office application are discuss in detail in [1]. The back-office application is composed by five main modules: 1. Health professional interface -is a web based graphical user interface that integrates information from the other components, presenting it to health professionals in an intuitive and organized way. The interface is multi-user as distinct health professionals can follow distinct sets of end-users. Also there is the ability to share users to accommodate events such as vacations or planned leaves. It is considered particularly important providing an area where health professionals can www.astesj.com find all essential information to support their decisionmaking process, making it easier, faster and less prone to errors. The two interface panels presented as Figures 2 and 3 will be explained next. Figure 1: Depiction of the core actors of the system with details regarding the dataflow and the main system modules.
2. User health information module -manages health information that is private and sensitive. This information is never accessible to the mobile app or to any other module than the health professional interface. The informaton is stored in a specific and isolated database and it is inserted by the health professional when the user subscribes the service. This information is updated whenever the user meets with the health professional responsible for its follow up. Fig. 2 presents a screen-shot of the health professional interface relative to this module. The left panel contains generic information such as user's name, contacts, weight and height, and education. The right panel contains the user's medical record that includes heart rate, blood pressure, six minute walking test (6MWT), regular medication, and a medical record of some relevant conditions. No special concern about data securityother than stock data encryption -was taken care in the prototype development as, when deployed, these part of the system needs to comply to the specific norms of each instituion and/or can just be a reference to an already existing database.
3. Exercise information module -manages user exercise information that, being private information, is not as sensitive as the one managed by the user information module. Since this module interacts with the commu-nication interface that, by its turn, interacts with the (third party) apps, there exists an increased factor of vulnerability. For that reason this module does not explicitly have information about the user. The user is referred by a code that does not encode personal information. This code is for the health professional interface query the user health information module about which user corresponds to a given code. When this happens the user health information module just replies if that health professional is authorize to view such data. Fig. 3 presents the health professional interface relative to the exercise information. In the left panel is visible the resume of the user, at the center a map showing the walk routes suggested to the user and, at the right panel, the amount of times the user walked those courses. 4. Walk paths generator and manager -this module allows to generate paths using multi-criteria [23]. It is possible ask for path of a given distance, to force paths to include given places -like rest areas or streets without cars -and also to exclude some areas such as more polluted areas or less safe. Then the algorithm optimizes the rest of the path by preferring streets with larger sidewalks, avoid the busiest roads, etc [23]. The interface of this module is a contextual menu that www.astesj.com 408 pops up by right-clicking at the map of the exercise interface (see menu inside the map in Figure 3).

Communication interface -is handles all data received
from or passed to the apps, receives data from the city sensors (temperature, wind, air quality,...) and from the municipality information systems (roads/streets under maintenance, social events,...). This interface is implemented as a RESTful Web Service and so it does not start a communication by its initiative. When the system has to pass information to someone, that information is stored and later sent when the mobile app initiates a communication with the system and ask for such information. If the health professional needs to contact the user the contact request goes by alternative ways such as short message service (SMS) or e-mail. The back-office screen to define a walk plan for a given person, and to see how often that plan was executed.

Data Transport
The ability to allow distinct apps to interact with the backoffice application implies a public definition of the data to be passed between the apps and back-office, besides the implementation of the communication interface. The back-office sends to the app free text messages for users' information in JavaScript object notation (JSON). To send the walk paths, the back-office application generates a file in keyhole markup language (KML) format, places that file in an externally acessible universal resource location (URL), and sends that URL in the JSON message.
The data transport is made by JSON and a data package can contain one or more of the following sections: (1) user messages, (2 ) physical activity, (3) heart data, (4) inactivity justification.
All data packages include a code that represents the user. This code does not contain personal information as mentioned before, is used for the back-office associate the received data with the respective user. As such, in case of communication interception is not possible to identify the user just by looking to the data package.
All pieces of information have a timestamp representing when that information was generated. These timestamps are used for correctly build the events timeline at the back-office. As users can use apps without an active data link the time when the information arrives at the back-office can be quite distinct of when it was generated.
The section "User Messages" contains information written by users. It can have any free text message the user wants to share with the health professionals, namely questions regarding any concern he may have. This specific part of the package is bi-directional in the sense that the healt professional can use it to send messages (questions) to users. It also includes information about medications the user is taking. Table 1 presents an example of a message.  The section "Physical Activity" includes information of routes walked by users and how was the experience in terms of satisfaction, polution, etc. It includes information about how many stops the user has made during the course because it is an indicator of problems -it should be considered a stop if the user remains at the same place for a minute or more. It is also collected information about if any pain was felt and its location, the total duration of the walk, and a list of global positioning system (GPS) coordinates representing the actual path made. Table 2 presents an example of this data section.
www.astesj.com 409 Table 2: Example of a "physical activity" section representing that the route 305 was walked during 40 minutes with two stops, the first during 1 minute and the second for 10 minutes. Two very important measures of effort, that have implications on the helth and well-being, are the heart rate and the blood pressure. This are reported in a "heart data" section illustrated in Table 3. These values are stored in the "exercise information" module and not in the "user health information" module since there is no guarantee that is was correctly obtained. These values are used just for monitoring and, if a consistent anomaly is verified, the next time the health professional meets the user he will try to understand the reason of the anomaly.
When some user is inactive for a long period of time, the back-office issues an alert for the health professional. If he finds appropriate it can question the user the reason of its inactivity. An example is presented in Table 4. Table 3: Example of a "heart data" section representing that the values were obtain by a familiar. Other options could be a drug store or a health professional.

Mobile App
As mentioned before, the data transport of the framework is open and standardized for allowing third party apps to integrate the framework seamlessly. Nevertheless it was found important to provide a default app that, at least, helps to illustrate the potential of the framework. Table 4: Example of a "inactivity" section. The main purpose is to allow helath professional understand if users were just busy and did have time to use the system or if it is a situation that need proper attention. The devices that run the app are required to have wifi capabilities in order to send the data for the back-office and, to receive from it, the walk paths in KML format. They also need to have a GPS sensor for helping users complete the walk paths assigned to them, and acquiring information about the paths users actually did for subsequent analysis by health professionals.
The devices are not required but are strongly encouraged to have a heart beat sensor. This recommendation is due to the heart beat rate is strongly correlated with physical effort, and thus should be monitored by health professionals to assess if exercises are adequate to the given persons. It is not mandatory as heart beat rate and blood presure can be measured after the exercise by a health professional, or in a publicly available machine or at home, and then the values can be inserted manually. Even if the app is running on a device with a heart beat sensor, such as in the case of smartwatches, current technology is not accurate if a person is moving, thus the exercise should be finished before the value is measured.

Default App Implementation
Apps can run on devices such as smartphones and/or smartwatches. Apps running on smartphones have the advantage of benefiting from a bigger screen for the grphical user interface and longer energy autonomy, alongside these devices are well widespread troughtout population. Apps running on smartwatches have the advantage of benefitins from a heart beat sensor and being less intrusive as these devices are smaller. The default app runs combined on both types of devices: it runs on a smartwatch that acquires heart beat data and passes it by bluetooth low energy (BLE) to the smartphone, which combines that data with its own (GPS, user inputs, ...) and sends alltoghether to the back-office.
A default app was thus designed taking usability considerations adequate for older people [24,25], and fully developed to show how each framework feature is accionable from the app. The user interface was designed with the support of three personas and two usage scenarios specifically developed to foster discussion and reflection [25]. Those three personas were characterized in terms of age, personality behaviour, and interests. One usage scenario was elaborated including one of the three personas while in the other scenario the other two personas interacted with which other.
The findings obtained from the personas and scenarios development lead the designed decisions of the app including: the way it was designed, how it works, and why it is easy to use for an elderly user who may not be used to the technology or has health impediments that make its use difficult [26]. The automatically app provides help if it is waiting for user's input and no activity is detected. Figure 4 presents a screen capture of such event in the home screen.
When the app does not detect an available heart beat sensor it will prompt users about the heart rate. Such form is presented in Figure 5. The fields DATE and HOUR will have as default values the current date and hour, respectivelly.

Discussion
Projects that conform to this framework can contribute to the challenges associated with the Smart Living profile. This profile is about lifestyles, behavior and consumption made through ICT, healthy and safe living in a culturally vibrant city with diverse cultural facilities, and good quality accommodation. Smart Living also promotes tourist attractiveness and high levels of social cohesion and social capital [9].
In particular, these types of systems described here can contribute to a healthy ICT-based lifestyle, as it aims to support people to maintain an adequate level of physical activity by advising them with a walk plan defined by a professional and transmitted using an ICT-based solution. In addition, health professionals, by knowing the places where people walk, can propose the most popular places to walk, thus being safer and more appealing. As it includes contextual information such as climatic conditions, points of interest, and temporary events among other, it has the potential to contribute to increase tourist attractiveness. One possibility that this type of system offers is also to propose joint walking plans, thus contributing to increase social cohesion.
Placing health professionals at the center of the decision allows individualized and quite different paths for individuals who, even if at first glance may seem to have the same profile, may have very different needs among themselves. [27] states that physical activity among the older population differs widely. According to studies that gathered information from ethnographic studies and interviews with health professionals, it is necessary to create different profiles of the elderly, with respect to physical activity and health conditions, and consequently create and adapt different routes to a specific profile. Adequate physical activity levels vary with health conditions and lifestyle [28]. Considering this, it is necessary to evaluate the health of users, namely the elderly. Thus it is of utmost importance to allow health professionals evaluate and define the profile of the user, and adapt the path of the walk to their state of health, physical activity level, www.astesj.com 411 and personal preferences. Regarding health conditions, the first thing to evaluate is whether the user needs to see a doctor before becoming more physically active. This can be reported using the Physical Activity Readiness Questionnaire -PAR-Q [29]. Then the 6-minute walk test -6MWT [30] will be used to assess the user's level of physical activity. Other health information should be requested, such as an existing medical diagnosis, location and intensity of pain, usual medication, heart rate, and usual physical activity. With this package of health professional information can define the profile of the elderly.
A characteristic highlighted by one of the personas created was the need to make periodic evaluations face to face. For example, if a user as a health problem as breaking a leg, there is a need to make a new health assessment, or if the user leaves the city for a period of time and does not engage in any physical activity. Health information is needed to define the profile of the elderly and to customize the routes for the health conditions of the users, so it is necessary to have different routes. This also allows us to adapt the routes to personal information about the user, for example, a user who prefers routes integrated in a natural environment or if he prefers to pass in a local market. Finally, to induce and motivate the practice of physical activity, it is necessary to maintain face-to-face contact through periodic health assessment and to maintain the adaptability and personalization of the routes.
A system conforming to the proposed framework was implemented and tested with simulated users. The simulated users asked for walking courses and sent information regarding their physical activities (see Table 2), and sometimes other data relative to the other parameters, using distinct combinations of the four information sections. Users also sent information sections that were not defined and that should be silently ignored. The system handled efectivelly the distinct combinations of information sections and the information sections not defined. These results show that this design should cope well with upgrades since one major difficulty for upgrading systems is when distinct versions with distinct features coexist in the same environment. Although just one instance (and thus one version) of the back-office is expected in one usage environment, regarding the mobile applications one should expect a variety of implementations and with different versions. The system was also tested for temporary loss of connectivity and didn't show problems in such cases. The option of having a back-office connectivity module implementing a RESTful web service proved quite robust to the loss of connectivity events.
To extend the system in the future is necessary to define the JSON format of the message to be passed between the back-office and the apps, and implement the respective code and extend the database if necessary. These are the miminum things to do in any case. There is no necessity to change the lower level communication mechanisms between the back-office and the apps as the extension is just in the semantic part of the content.
In this stage of the work there is no automation (e.g. no artificial intelligence methods involved). This work was about designing and validating a monitoring platform that could be used by mobile apps with the benefit of having health professionals supervising the exercises. Without this stage consolidated this framework would be like alternatives already available: fully automated solutions not necessarily validated by health professionals.
A possible future extension would be provide some statistics as the places most visited by users, for instance for city planning purposes. This can be readilly available and it was not addressed since since third parties didn't yet identified those needs.

Conclusion
This article presented a framework to help people to have a more adequate physical activity, using the infrastructure of smart cities when it exists. As people age, because of their individual health history, it is more difficult to know what the proper level of physical exercise is, and therefore they should have the support of a professional with specialized knowledge and training. If people are left alone by deciding their own level of activity, they may be too aggressive and aggravate their injuries, create new ones and refrain from exercising more, or be very conservative and, in the long run, have a level of activity under their potential.
For this, information about chronic conditions, previous surgeries and current injuries, among others, is needed, raising concerns about privacy, and people are often reluctant to share these details. As such, the framework is designed to be operated by people who already know this information, or who are already legally authorized to own it, health professionals and probably the local public health unit. Also, special care was taken to make sure that health sensitive information remains private.
The back-office application was designed for health professionals be able to make fast, error-free decisions and minimize the risk of overloading them with much more work. In addition, the end user application can be made by third parties. One default app was designed and developed considering that some people are able to easily operate the smarphone and some have difficulties in using ICT, some may have problems of vision, etc. The best guidelines for the interfaces of the elderly were considered.
The project is implemented inÁgueda, a city of about fifty thousand inhabitants, and ready for large-scale testing. The municipality ofÁgueda is a stakeholder in the project and it is expected that the project will be implemented definitively after all the tests and eventual corrections. All the technology planned for use is available in the market, such as smarphones and wristband models. This is important because the project is being deployed locally, but it has been carefully designed to be deployed (easily) in any other city.

Conflict of Interest
The authors declare no conflict of interest.