Enterprise Mobile Tracking and Reminder System: MAE

—Mobile phones have made significant improvements from providing voice communications to advanced features such as camera, GPS, Wi-Fi, SMS, voice recognition, Internet surfing, and touch screen. This paper presents an enterprise mobile tracking and re-minder system (MAE) that enables the elderly to have a better elder-care experience. The high-level architecture and major software algorithms especially the tracking in Android phones and SMS functions in server are described. The analysis of data captured and performance study of the server are discussed. In order to show the effectiveness of MAE, a pilot test was carried out with a retirement village in Singapore and the feedback from the elderly was evaluated. Generally, most comments received from the elderly were positive.


I. INTRODUCTION
Today mobile phones have advanced from providing voice calls to many built-in functions like touch screen, Wi-Fi capability, camera, speech to text and vice-versa, Gobal Positioning System (GPS), Accelerometer and other features. Mobile phones with the built-in functions are called smart phones. The prices of smart phones such as iPhone 4S, Android Galaxy, Windows Mobile 8, Blackberry 9900 and other older models are getting cheaper and more affordable. Hence, there is no surprise that the smart phones are replacing the older generation of voice communication mobile phones.
In the area of tracking, the study of power consumption in smart phones was studied [1][2], GPS information was extracted in Nokia N95 [3], social networking applications were studied in [4][5][6][7], features of Android for location-based function was reported in [8], [9] investigated the human behavior for location-based services, using location-based services in city maps was published [10], and middleware development for location-aware was published in [11].
In this paper, we propose the Mobile Assistance for Elderly (MAE) system with the aim to utilize the rapid growth of smart phones and technologies so that a better elderly experienced is achieved through mobile-based platform. This system leverages on some of the available telecommunication technologies like GPS and Short Message Service (SMS) to help the elderly and their caregivers stay in constant engagement while allowing the elderly to lead a more independent and mobile life as they stay active socially. While the target caregiver is the nursing home, the system can be streamlined for eventual use for home caregivers to their elderly parents.
Section II presents the overall system architecture of MAE. Section III describes the client. Section IV describes the server, in particular the SMS module. Section V highlights the mobile-to-mobile tracking and server-to-mobiles tracking. Section VI discusses some results of our system performance study. Section VII evaluates the feedback from the elderly about the pilot test. Section VIII concludes this paper. Figure 1 shows the high-level overall architecture of MAE. The server consists of three major components: Database, ASP.Net web server, and MAE_SMS gateway. The smart phones with in-built SQLite database are the clients. The MAE_SMS gateway is responsible to manage the schedule messages, send and receive SMS messages via the modem, and interact with the database to retrieve and insert new records. It also provides a Graphical User Interface (GUI) for the system administrator to monitor the system performance. Currently, the clients are Android smart phones that communicate to the server via the Internet or any network such as 3G or Wi-Fi. The smart phones have the capabilities to store the data into its own SQLite Database which could serve as temporary storage.

II. OVERALL SYSTEM ARCHITECTURE
III. THE CLIENT (ANDROID SMART PHONE) For our case, the client is an Android smart phone which is carried by the elderly. The Android smart phone must be GPS or Wi-Fi enabled and access to Internet. The phone is installed with our software that uses the GPS or W-Fi to find the exact location using satellites when any triggered event is initiated from a tracking device which can be another smart phone (Section 5.1) like any Android smart phone, iPhone or a server (Section 5.2). Upon successfully locating the position, the data will be registered in the phone's SQLite database for the caregiver to extract anytime from a server or another smart phone like iPhone or Android .The client can receive SMS reminder services from our server so that the elderly would not miss any important appointments or forget to take medications.
In our project, the push service is implemented in the Android smart phone which is the client. The service runs at the background and is transparent to the elderly. In order to be tracked, prior consent must be obtained from the elderly. There are two ways of triggering the software in the Android smart phone. The first method is an interval counter that acts as an own signal of the triggering point. The interval can be set according to the user's preference. The second method of triggering would be the incoming messages like an SMS of preset command such as a special code. Both methods will trigger the software to activate the GPS or Wi-Fi function of the device. When the GPS or Wi-Fi program is activated by any of the above two events, it will begin to pull the location parameters.
The GPS technology is accurate in open areas but perform poorly indoors or between tall buildings. The Wi-Fi technology is used inside a building and gives more accurate positioning when the elderly is inside a building compared with GPS. Our system is able to switch automatically from GPS to W-Fi or vice-versa. Manual overrides are also implemented.
IV. THE SERVER There are two main functional modules of the server -SMS module and tracking module. The tracking module is briefly described in Section 5.2.

A. SMS Module
This module is written in C# programming language. We wrote a Window Application GUI with threading to monitor the system status and manage SMS sending and receiving messages. Figure 2 depicts the three main threads that handle the interconnection and synchronization among SQL database, messaging queue and the modem. Figure 3 describes how the algorithm works of the three threads in Figure 2. When the system starts, the program will connect the SQL database, retrieving all the due tasks and push the tasks into to the Microsoft Message Queue Server (MSMQ) with its standard message format. MSMQ is a fast store and forward service from Microsoft server that enables applications running at different times to communicate across different systems. Application sends messages to MSMQ and MSMQ uses queues of messages to ensure that the messages eventually reach their destinations. The system uses the mechanism of pulling data from the database in every time interval that was set in the 'scanning database delay' time. The program will then use the current date and time information to extract tasks from the server to schedule for the outgoing messages.

Algorithm
Step 1: Creation of Process (P main ) Create a process, P main in the MAE Server in order to handle the SMS Scheduling, Sending & Receiving between Database, DB and the Message Queue Server (MSMQ).
Step 2: Initialization (P main ) P main is fully initialized with required components such as serial port, interfaces. It also loads config data from text file.

Step 3: On Start Button Event (E on-start )
The process, P main will create 3 worker threads, T gui , T send and T receive in its process.
 GUI Thread The GUI of the system is handled by the worker thread, T gui . The reason of using thread for GUI is because of the control buttons in the GUI. The system needs to be responsive even when it is running other functions, such as sending messages or receiving messages  Sending Thread This worker thread, T send will perform the function (f send ) over the period of scanning database delay, t=1,2,...,10 where delay time, t is predefined by user & measureable in minute.

Y = i = 1,2,3,… n (interval -measured in minutes)
Whereas Y is the result of sending function (f send ) with the input of X (tasks due) over the scanning time interval, i. This function starts with t=1 and is repeating until the On Stop Button (E on-stop ) is invoked.
 Receiving Thread The worker thread, T receive will execute function (f receive ) over the period of scanning SIM delay, t=1,2,...,10 where delay time, t is pre-defined by user & measurable in minute.

Y = i = 1,2,3,… n (interval -measured in minutes)
Whereas Y is the result of receiving function (f receive ) with the input of X (incoming messages) over the scanning time interval, i. This function starts with t=1 and is repeating until the On Stop Button (E on-stop ) is invoked.

Step 4: On Stop Event (E on-stop )
On Stop event occurred when the stop button is clicked. Upon the event occurrence, the program will attempt to join the threads to complete its task with the allowance of sending delay interval.

A. Mobile-to-mobile tracking
This tracking is based on one-to-one relationship of the communication pattern. For example, the caregiver iPhone can be used to track one elderly Android phone. The caregiver and the elderly are communicating with each other and the tracking is based on one elderly at one time. The one-to-one technique is suitable for the individual since the caregiver's intention is to track only one elderly at a time. The algorithm of mobile-to-mobile tracking is similar to the algorithm presented in Figure 4 except the variation where the replying/monitoring takes place in a server.

B. Mobiles to Server Tracking
This type of tracking is used in organization or carecenter where the number of elderly exceeds the number of caregivers. It is known as one-to-many relationship. For instance, a number of elderly Android phones will send their individual location coordinates to the server periodically. In this relationship, the location data are stored and monitored in a server instead of a smart phone. Instead of relying on the device SQLite Database, the location data will be also stored in the server's SQL database with higher capabilities. The server is set to track and present graphically the last 10 locations of each registered elderly. Figure 4 depicts the algorithm for mobile-to-server tracking.

A. Collect Location Data
We have conducted the testing for a period of 10 working days across Singapore with six Android smart phones with the following results in percentage of success rate of each working day.
Working day 1: 70%, Working day 2: 10%, Working day 3: 18%, Working day 4: 16%, Working day 5: 42%, Working day 6: 78%, Working day 7: 99%, Working day 8: 99%, Working day 9: 75%, Working day 10: 79% In day one to five, the average percentages of locations collected is below 40%. The reason is due to the timeout error occurred at the mobile phone side because the public server, where the location coordinates are obtained, is physically located in United States (US).
In order to solve this problem, we have relocated the server from US to Singapore. Thus in day six to 10, the average performance of location data collection has increased to an average 86% . In day seven and eight, the percentages of collectable data are close to 100%.

B. Server SMS Performance
Our performance measurement is based on two factors: (1) Message size in characters and (2) Delay timer for scanning database and SIM card. With the sending 20 messages, the performance is measured in 'total sending time (sending)' and 'total receiving time (receiving)' for all messages. The definition of 'total sending time' is the time taken from the sending of first message to the last message when the whole system is functioning well. The timestamp is taken only when the sending of message is successful. The 'total receiving time' is defined as the time taken from the receiving of first message to the last message when the whole system is functioning well. The timestamp is recorded when it is registered in the database.
The matrix is the representation of timer set for scanning database (sending) delay and scanning SIM (receiving) delay respectively. The settings for delay timing are 1 minute and 2 minutes. Four different ranges of randomly chosen messages were used, with the average of 16, 39, 77 and 134 characters. Figure 5 shows the results of average message size versus the total sending time and total receiving time for 1x1, 1x2, 2x1, 2x2 matrixes.
In Figure 5, as the average message size increases, the sending time also increases. The reason is that the system requires more times to push the characters into the network when the number of characters increases. Although the delay time of scanning database (sending time) is increased, the total sending time does not change much. The reason could be the schedule time of the messages. The messages are scheduled to send at one time and the system is very quick in sending out all messages. It results in little impact on total sending time. The change of scanning database delay is actually affected on the schedule time. For example, if the system is running at 5 minutes interval and the last scanning were carried out at 00:00:00; the next scanning will carry out at 00:05:00. If the task were scheduled on 00:02:00, instead of carrying out in its schedule time, the task will be delayed to next schedule time.
The receiving time (red line) is hugely affected by two factors -time taken for scanning SIM card and time taken in the 3 rd party network like the public telecommunication network provider. When there is an increase in scanning time delay, the receiving time from 1 st to last messages increases. With the increase in messages time, the two factors above were taking longer time to receive the messages, and it results in increase on receiving time. The 3 rd party network delay has potential be more severe. Figure 6 depicts the sending and receiving time versus matrixes with average fixed message size. As shown in Figure 6, the sending time (blue line) does not vary much even the timing were changed. This is why the sending time has almost no impact, except for failure to send the message from the device.
The receiving time (red line), on the other hand, has much impact on system performance. The measurements were taken in 4 points -1x1, 1x2, 2x1 and 2x2. In general, when the delay time in scanning SIM card for receiving is increased, the receiving time also has increased. This result is what we expect to happen because longer time is needed to register the received messages.

Collection: Creation of Gathering Data Process (P locate ) in Client
Create a process, P locate in the application in order to activate the location manager for the period of t, 60 seconds. With the valid t period, P locate will collect the location data sets, X with the accuracy of z.
For t=60, Y i Z f X i for i 1 to ∞ where t is measurable in seconds, f is the location retrieving function with technologies (X) which is both GPS and cell triangulation. The function will output location data set (Y) which contains longitude and latitude values along with the accuracy (Z).
The function, f can be defined as Activate Global Positioning System (GPS) Receiver Retrieve Longitude(x 1 ), Latitude(y 1

Storing: Save the location Data in SQL in Server
After the collection of t=60, P locate will choose the best accurate location data set Y based on Z value. Using data connection, It is then sent to in Web Service function (f write ) that will insert into the SQL database (DB) in the Server.
For New DB record in the server, r new f write Y i

The f write function will Do Establish a new connection to SQL Database Table "Location" Get result from set of Longitude(x), Latitude(y) and Accuracy(z) Select the best accuracy (minimum value of z) location data set Attempt to save into the SQL Database Close SQL Database connection Reply Attempt status to the Updating Device While (No of Attempt<3) & (Not Successful) Viewing: Monitoring the Locations in Server
The viewing or monitoring is done in the server's web interface. The location result will be plotted in the Google Map API in the browser.

Response, R max T records in DB where T = recorded time in milliseconds
The response R is the result of following steps: Establish a new connection to SQLite Database "Location" Get latest result on the database (T is maximum) Save into the SQLite Database Close SQLite Database connection Render on Map Object on Browser The pilot test for a period of two weeks with the real users was conducted with the elderly volunteers in Singapore. The MAE program was pre-installed in the testing mobile handsets that were later distributed to the volunteers. This is the first time testing the system in the public. As the targeted audiences are retirees and elderly who are still active and healthy, they are still mobile and we aim to make the system to be user-friendly and useful to their daily activities. After the testing, we conducted one-to-one session feedback with the volunteers about the purpose of the system, user-friendliness, overall experience and expectations on future developments. The questions and results posted for the feedback is as follows: Question 1: The concept is to allow the caregiver to find out the location of elderly when required. It is also to support a reminder services for elderly, such as appointment or medication. Do you think this concept is excellent, good, still okay, not useful, or poor? We have 40% of the respondent chose excellent and 60% chose good. The PAPER ENTERPRISE MOBILE TRACKING AND REMINDER SYSTEM: MAE first question is aimed as receiving the feedback on the idea of MAE system. Most volunteers agree that this idea of connecting caregivers to elderly while allowing the elderly to have their own freedom of movement is good for them. Question 2: While you are volunteering for this pilottest, you feel that the test is very easy, easy, still okay, complicated or troublesome. 100% of the respondent chose easy. The second question is about userfriendliness. As The target audiences are either nontechnology person or little knowledge about technology, making the test easy and no trouble is the top priority. We have achieved that since most volunteers felt the test was just to carry the mobile phone as usual and it was easy.
Question 3: What is your overall experience (including technical and administrative support)? 20% of the respondent chose excellent. 40% of the respondent chose good. 40% of the respondent chose acceptable and 20% of the respondent chose need improvement. The third question is about overall experience. This experience differs since the expectations are found to be different among the volunteers. Some volunteers felt that multiple incoming messages are nuisance and they are very much bothered since there could be confusion between testing messages and meaningful messages.
Question 4: Please suggest improvements of the test. Our respondents gave the suggestions below. More time required to get used to the capabilities of smart phone  The weight is a little heavy -should be lighter smart phone  Function to interact with other users  System should be more reliable.  Long battery consumption Some volunteers felt that they are new to smart phones and therefore, needs more times to get familiarize with the functions in the phones. Many applications are by default installed in the phones and that could create confusion for elderly audience. The weight of the smart phone is heavier compared to the small and compact conventional hand phones.

VIII. CONCLUSION
We presented the MAE system: Overall system architecture, client, server, and performance results. User feedback has shown to some extent that the MAE system enhances the elderly experienced in a mobile platform. To our best of knowledge, there is no similar enterprise mobile tracking and reminder system for multi-users being deployed in nursing homes. The elderly are moving more independently and confidently while the caregivers are given authority to find their locations as and when necessary. The study consists of latest mobile and information technologies to fulfill the core function of this project.
With the application installed on the mobile phone, the elderly can be monitored from either a computer terminal or another mobile phone. The location parameters were generated from the GPS that could trigger by a timer or SMS messages to the target mobile phones.
During the real life testing for 14 days, we have found many unexpected issues such as the timeout or page reset due to slow connection, the unnecessary location updates, device switching off from the users and the network co- Figure 7. Functions of MAE server including social networks verage weakness. The interactive user interface will be required that make the application more attractive to users since some users prefer on the active side. Another factor that requires the mass deployment would be the application's compatibility on different devices and operating systems such iPhone, Blackberry and Windows mobile. Currently, a small group of elderly are using smart phones, while some are still hanging on the older and simpler type mobile phones. More works from manufacturers are required in order to suit the needs of the elderly. With technology advancement, applications will be more reliable since current situation is depending on many factors, such as data speed, network coverage and userfriendliness experience.

IX. FUTURE WORK
We are implementing the software tracking program in other smart phone platforms [31] like iPhone and Windows Mobile and the social networking capabilities in smart phones and MAE server (Figure 7) as well.