Online and Offline Android Based Mobile Application for Mapping Health Facilities Using Google Map API. Case Study: Tanzania and Kenya Borders

The evolution of technology in 1990s resulted in the enormous growth of smartphones and the propagation of mobile applications (App) that marked new opportunities for healthcare centers and medical education. Apps have altered health services from patient’s health monitoring to specialist’s appointments and consultations from specialized health facilities. It can be argued that a healthy society can bring forth sustainable economic development to its full potential while an unhealthy society cannot. However, a free movement of people, labour and right to residence which was built across East Africa (EA) borders enabled Tanzania and Kenya borders to have enormous interactions. Subsequently, increase the risk of highly communicable diseases such as Tuberculosis and Sexually transmitted infections in such a way that medical attention is unavoidable along the borders. Statistically, Android Operating System (OS) owns 83% of Africa’s mobile OS market. In addition, 25,794,560 internet users reported by Tanzania Communications Regulatory Authority (TCRA) together with the 22.86 million internet users provided by Kenya Digital which is equivalent to 46% and 43% of internet penetration in year 2020, disclose the need for Android mobile application for mapping health facilities both online and offline using Google map API, which will solve residents’ need to healthcare services on the presence or shortage of internet connections; using either Swahili or English language via Smartphone devices. The App incorporates Monitoring and Evaluation (M & E) tool for tracking application usage which will ease Admin’s task to generate daily and monthly reports in Excel and Comma-Separated Values (CSV


Introduction
Globally, Mobile Application (App) has transformed health services in different fields such as patient health monitoring using IoT devices, doctor's appointments and consultations from specialized health facilities, diagnoses and laboratory testing, pharmaceutical, and deliveries of medicines.In addition, it provides opportunities to health facilities serving people who seek medical attention within society using smartphone devices.Therefore, it is undeniable that e-health services are essential elements for proper functioning of a healthy society whereas an unhealthy community cannot bring forth its full potential in economic production and sustainability.Furthermore, it has been observed that since the first release of Android Software Development Kit (SDK) in 2008, mobile application (App) has opened new opportunities for healthcare centers and medical education.The significance of these Apps can bridge the knowledge and distance gap between users/patients and health facilities, on top of that they provide faster and adequate medical services at the appropriate time [1].However, the potential benefit of Apps has not been effectively deployed and implemented to provide e-health services to people who work or cross borders from one country to another.With enormous interactions which occur at border communities like between Tanzania and Kenya, hence there is an increase of high risk of spread of infectious and communicable diseases which requires effective and timely medical attention.The lack of an effective system such as App for locating the health facilities with specialized services has brought a tremendous disadvantage to the East Africa Community (EAC) and its citizens in general.Therefore, this study has proposed the development of an Android Mobile Application for improving access to health services and related information both online and offline using Swahili and English language and integrate it with monitoring and evaluation (M & E) tool to monitor the most requested viewed content and measures change over time on existing health facilities to citizens and residents that travel across Kenya and Tanzania borders.Firstly, the proposed requirements for the developed system (App) will be gathered and analyzed.Secondly, developing the proposed Android Mobile Application and integrate it with monitoring and evaluation (M & E) tool to monitor the most requested and viewed content and measures change over time.Last but not least, to validate the online and offline access to health facilities through Google map API and Global Positioning Sys-tem (GPS) based technologies.Consequently, system Admin will easily generate daily and monthly reports in Excel and CSV formats.Hence, through the use of the proposed Mobile App, users will be able to receive basic health information while travelling in case of emergency across East Africa borders, also being able to locate the nearest health facility on application dashboard and request or apply required health-assistance.
The following are brief explanations of the technical terms that will be used in this study: 1) Smartphone Devices: Android Operating System (AOS) devices in association with Open Handset Alliance (OHA) have edged through an open-source platform with licenses agreement supported by Google Inc. [2].In addition, AOS devices have higher consumer demands than other devices combined in the last decade.Figure 1 has illustrated the market share for mobile Operating Systems (OS) that in Africa have justified that from January 2018 to Jan 2021 indicated that 83% of Africa's mobile OS Market has been secured by AOS [3].Moreover, AOS devices have higher consumer demands than other devices combined in the last decade.The Kenya Digital data has reported that there were 22.86 million internet users equivalent to 43% of internet penetration by January 2020.Moreover, the total number of mobile connections in Kenya is 52.06 million equivalents to 98% of the total population by January 2020 [4].Furthermore, the study on "Mobile Penetration and Growth in Kenya" made by GeoPoll in June 2020 has reported that there is 119.9% of Kenyan mobile penetration which has grown to 10% from the earlier period [5].published [7].Cloud Computing (CC) to serve the purpose on health facilities.However, other researchers or developers have integrated their AOS studied to Web-based technology in order to ease their study process.Most AOS studies were time-saving, location-independent and localization of data on health services.Contribution of Web Applications on Health Services: The study done to the Ministry of Health in Zambia by [11] observed the necessity to develop a system for mapping health facilities using GIS technology which became the web decision support system (DSS) tool.This system performs monitoring and reporting which enables public sectors to access information on health facilities' current position respective to the services offered.In addition, another study was conducted by [12] that emphasized Climatology awareness to residents in Kilimanjaro, Tanzania.The study has implemented the web-based Health Management Information System (HMIF) which integrated a Mobile App for tracking patients affected by cholera.Ms. Leo and colleagues described how GPS and GIS technologies were used in Smartphone devices and HMIF respectively to gather and disseminate the current position of patients.
Contribution of Android Operating System (AOS) Application on Health Services: The study done by Muhammad in 2012 elevated awareness and significance of ICTs in healthcare.The study assessed and classified the existing tracking devices used by elderly people, and indicated the possible solution through performance analysis.They suggested on the current tracking technologies to be used such as RFID, GPS, GMS and GPRS [13].The study was able to track specialized doctors and locate specialized health facility near users who seek medical consultations using an App [14].In addition, there is another study which was done by [9] to locate the nearest hospital within five kilometres using GPS through the use of Mobile App.
Daryl Abel proposed mobile application for setting appointments with the doctor and medical advisors [15].Moreover, Ayushi improved a medical health App by enhancing dissemination of medical information to user such as locating the nearest hospitals, laboratories, chemists (pharmacy/medical stores) using GPS technology through mobile networks services.This study facilitated communication between doctors and patients in a short time [1].Furthermore, Rameswari and Divya reviewed the study on smart health care monitoring system using Mobile App.His study aimed at assessing the existing technology in location-based services for health care and then, proposed the latest technologies for future findings and implementations [16].Other studied include, the development of healthcare App that benefit patients and medical professionals to support rapid access to health information specifically, in emergency situations [17]; embedded Android healthcare application through the use of Cloud Computing to successfully upgraded patients' records and store medical imaging [18].Table 1 below demonstrates several authors' contributions on health services varying from one technology to the other.People got to wrong direction (route) in an unknown location while traveling.

Android mobile application (Native App)
Provides to user the opportunities such as insert, delete and assess exact locations on a map.

Google Maps APIs and Google Direction APIs Iraq
The mindset of tracing and tracking who we are or where we came from, has progressively become a question rather than a prior given [22].The study conducted by Allen to border communities in Busia, noticed the common practice for inhabitant's departure from Busia-Uganda side to attend specialized services at the Busia district hospital in Kenya, such as X-ray and TB services that might not be available at the health centre IV in the Uganda side.The existence of Busia district hospital with specialized health services supports residents of Uganda living at the border to access health services rather than travel several kilometres to Tororo in their own country [23].
The contributions made above, have successfully developed their studies that bring impact to the society daily.Nevertheless, it might be argued that unavailability of similar systems, both online and offline has shorten the health services acquisition to residents and travellers across Tanzania and Kenya borders either due to limitations in internet connections to access online health services or unfamiliarity of health facilities' geographical locations.Hence, this study proposed the development of a mobile App for locating the health facilities with specialized services and enable user to receive basic health information while travelling in case of emergency across East Africa borders.

Study Area and Scope of the Project
The study was conducted to residents, travelers and border communities at Tanzania and Kenya borders.One of the scopes to this project is to transform the web-based platforms called "East Africa Wananchi Digital Health Platform" into an Android mobile application.On the other hand, the project will locate health facilities on a Google Map at a distance of 370 kilometers from Tanzania and Kenya borders and will disseminate the health-related information.In addition, the project will list vaccines required to enter either Tanzania or Kenya, will include tourist attractions while visiting both countries.Also, presents the exchange rate feature for currency conversion.On top of that, the project will be available both online and offline using Swahili and English language.Last but not least, the M & E tool will be integrated to the App for data visualization purposes

Solution Design and Development
The study was implemented using the proposed adapted prototype model, which is an iterative process that receives health facility requirements, refine and approve them for end product artifacts.Moreover, prototyping accommodates any fluctuation in requirements, thus allows flexible in its design and development [24].A total of twelve iterations were conducted.In addition, the App Graphical User Interface (GUI) was designed by fragments, layouts and string on the designing section of Android Studio applied using the Extensible Markup Language (XML).We evaluated user interface design, features, and functionality as well as the performance (speed) and security factor using high-fidelity prototypes developed with Java codes, PHP codes, MySQL and JavaScript Object Notation (JSON) [25].The system has adopted a client-server model which operates Model View Controller (MVC) domain as a result of the requirements received.MVC is a design pattern regularly used for developing user interfaces, structure them and assist in the development of the proposed system.MVC for Mobile Application has parallel needs such as access to internal DB management Journal of Software Engineering and Applications system, web platform service and reusable components without affecting the whole system [26].The MODEL section was furthermore indicated by conceptual diagram in order to deliver a proposed plan for development processes as shown in Figure 3.In brief, the conceptual framework involves a mobile App which permits the residents and travellers to register securely to the system, and then submit data such as residents/ travellers age, gender and phone number to the system DB.Moreover, the storage server is acting as the communication link between the App and the analysis tool.The system administrator is responsible for feeding the geo-location coordinates and health facilities' details for analysing data, monitoring and evaluation purposes.Figure 4 describes the entity relationship diagram which presents the relationship between several tables of the database.Moreover, it demonstrates actions (processes) performed by user in the system [27].about the selected health facility by sending the directoryID of the selected health facility to the server.Secondly, the server through PHP API script receives the request and sends feedback from MySQL database entry to client in JSON format.As a result, on facilities category: One, the list of CardViews carrying facilities details will appear and show two options to user which are make a direct call to the facility or get the location on Google map.Also, on mapped facilities category displays the facility locations on a map; when clicking a single facility, the dialog box will be displayed showing "show route" and "call".These functionalities are crucial to user whenever seeking for medical attention [21].The application has the "search by distance" feature which triggers the 50 kilometres distance range from user's current position.

Mapping of Health Facilities Both Online and Offline
The development of this study mainly focused on improving access to health service through mapping of health facilities on a map using Android App.Locating the health service is implemented by integrating the Google Maps enabled by Google Maps API key (an open-source map API key) to the Mobile App.This process is supported with a library offered by Google Play Service for using maps after registering an application on the Google Developer Console [28].The significance of the location APIs is to facilitate awareness to an App with automated location tracking, geofencing, and activity recognition.Dependencies (implementation "com.google.android.gms:play-services-maps: 16.1.0")and permissions were added to build gradle module and Manifest file respectively, refer to Figure 5. Therefore, health facility details are fed to MySQL database with facility name, location, phone number, website (if any), facility's coordinates and country.Also, the mobile App will design an interface for the map to display facilities on it which is completed by 1) The mobile App should send a request to the server for health facilities details using the PHP API Scripts; 2) The server should respond to the application's request on health facilities by retrieving them using the JSON format in order to arrange facilities' details received from the system database according to user's request to appear on Cardviews of the application UI [25].Afterwards, user will be able to track health facility's location online using internet connection either by Wi-Fi on mobile data (bundles) from user's current position.On the other hand, the offline access of health facilities is The following are the permissions and the APIs that have been implemented in this study.
In order to increase wide range of users across Tanzania and Kenya borders, the significant feature of language selection is added to AFYA Digital Android.
To get Swahili translation, the developer is required to follow the procedure below in order to store the String variables that carry Swahili text; Choose ModuleName > go to resource (res) folder > go to values folder > right click on String> opt for value resource file> fill the new resource file > Localize the country code and select language of your choice> e.g., Swahili The reason for opting these languages is that, English and Swahili language are mostly spoken to EA citizens as their first and second language though French is viable to be added to the application to suit the French speaking countries.

Monitoring and Evaluation Tool
World bank defined monitoring as a "continuing function that aims primarily to provide…an ongoing intervention with early indications of progress, or lack thereof, in the achievement of results"; it moreover defines evaluation as "the systematic and objective assessment of an on-going or completed project, program, or policy, and its design, implementation and results" (p. 1) [30].Monitoring and Evaluation (M & E) refers to similar activities as "performance monitoring" and "implementation monitoring" [31].
Firebase technology is a web application platform that offers built-in functionality for high-quality apps, it is used to implement the M & E process.It stores data in JavaScript Object Notation (JSON) format, also is referred as the backend of a system.Available services provided by Firebase technology are Firebase Cloud Messaging (FCM), Real-time DB, Firebase Storage, Firebase Test Lab for Android, Firebase Crash Reporting, Firebase Notifications and Firebase Analytics service which offers perception into app usage.The SDK has the feature of capturing events and properties on its own and also allows getting custom data [32].In addition, Firebase Auth service provides the backend services, simple-to-use SDKs, and immediate User Interface (UI) libraries to authorize clients over an application.Also, it supports several authentications such as phone number, email id/passwords, Google or social media accounts like Facebook, Twitter and Google GitHub.Users can be allowed to sign in to a Firebase app either by using Firebase UI as a complete drop-in authentication solution or by using the SDK to manually integrate one or a few sign-in techniques [33].

System Components Description
1) Language Selection Module: The App set two language options (Swahili and English) which give room to users who are not comfortable with either English or Swahili to confidently use the language of their choice.However, user can make changes on language selection both online and offline mode (that is, on presence or absence of internet connections) within settings section of the bottom navigation.The system will opt to deploy another language whenever there is need for it.2) User Registration and Authentication Module: Residents and travellers across Tanzania and Kenya borders are users to the App. Figure 6 that Short Message Service (SMS) code can be sent to user's smartphone for verification, that process will be useful for the M & E process using Firebase services.Secondly, user will also be registered using the gender and age details which are then stored to the MySQL database and login to the system.Application user will remain login until they he/ she decides to logout of the App. the global repositories; these data are useful not only to border communities and people who serve in such health facilities but also to policy makers.Once user is login to the system then are able to access the health alerts section of the bottom navigation, there will be a display for the disease information discussed above.
The statistical data on death and rate of spread for such diseases will increase awareness to user to protect himself/herself and others from being affected.

System Requirements Evaluation
Table 2 describes, in brief, the accomplishment of the functional requirements in the developed system.

Results from Monitoring and Evaluation (M & E) Tool
The system evaluation on M & E tool is demonstrated on figures below.Figure 8 indicates the daily, weekly and monthly number of active users to the system.The developed system has incorporated the firebase technology with an AOS to gather requirements necessary for App analysis, where the proper data collection and analysis is inevitable.

2
The developed system is required to produce essential data format and store data attained.
The developed system consists of DB and file manager (PHP API Script) to control and store the required data format. 3 The developed system must be able to manipulate the received data and produce the analysed data report format.
The developed system has combined cutting-edge technology such as mobile App, Firebase technology and GPS in the control module for timely monitoring and evaluation.4 The developed system must protect data successfully.This is accomplished through secured approach such as user input validation, use of intents for to inter-process communication (IPC), data encryption in Java and HTTPS connection.5 The developed system should be flexible and user friendly.
The developed system implements the MVC and prototype model which focus on iterative process that receives requirements, refine and approve them for end product, also it put up any variation in requirements.
Also, Figure 9 shows the list of authenticated users to the system who are identified by their phone number, user ID and date of account creation.Further, Fig-

System Evaluation
Field study was conducted using the final prototype, for system evaluation.The study comprised of 37 East African's (EA) citizens and travellers with an average age of 31 years old from six partner states who reside in Arusha and at Namanga borders of Tanzania and Kenya.The statistics of EA partner states participation to the system is as follows, Southern Sudan, Burundi, Rwanda, Uganda, Kenya and Tanzania has 3%, 5%, 11%, 19%, 24% and 38% respectively, refer to Figure 11.

Conclusions
The study aimed at improving access to health services beyond Tanzania and Kenya borders, that include mapping of the nearest health facilities both online and offline, dissemination of health-related information from global repositories, also listing vaccines required to enter Tanzania or Kenya such as Anti-malaria, Yellow fever, Hepatitis A, Covid-19 Test.In addition, the work indicates the exchange rates for currency conversion and showcase tourist attractions when visiting either Kenya or Tanzania.Moreover, the Android application will be available in both languages such as Swahili and English language so as to facilitate health facilities' access to most EA citizens.However, data from the user, heath facilities details and related information, have been gathered and stored to a live database which enables data synchronization for both online and offline.
Data visualization on users' validation and authentication, daily engagement and retention on App usage are based on their smartphone using M & E tool.Lastly, application performance will be tested based on functional and non-functional requirements.The developed system indicates not only a substantial digital solution to residents and travelers crossing borders but also to system Admin for ease data visualization.Considering the system's security where the application signing-key certificates such as message direct (MD5) certificate fingerprint, SHA-1 certificate fingerprint and SHA-256 certificate fingerprint has been used as the generated encryption standards, interoperability and performance, system maintenance becomes less complex to system Admin.
The demand for a centralized health service system that serves the needs of EA citizens within the region and across borders is very high due to the fact that

Figure 1 .
Figure 1.Market share of mobile operating systems in Africa between Jan 2018 and Jan 2021 [3].

Figure 2 .
Figure 2. Penetration rate of voice telecom and internet service in Tanzania between 2013 and 2019 [6].

Figure 5 Figure 3 .
Figure 5 describes the system flowchart diagram of the developed Android Application.Users use their smartphone devices to open the App.While usingthe App, they are required to select language Swahili or English.Thereafter, they will perform the phone number verification and complete user registration to have an account.Furthermore, user will be authorized through the SMS code sent to their phone for authentication procedures.When user get in touch with the application's dashboard and choose to select facilities or mapped facilities, these procedures are encountered to retrieve details in AFYA Digital App.Firstly, the App sends a request to the cPanel server to attain all information

H.
Alexander et al.DOI: 10.4236/jsea.2021.148021354 Journal of Software Engineering and Applications made possible without using internet connections, that task is completed by SQLite database (DB) embedded with the Android OS [29].This DB has the ability to synchronize data stored in live DB (cPanel) from online to offline mode, synching process is enabled by getWritableDatabase function (SQLiteDatabase db = this.GetWritableDatabase()) which transfer the stored data on a live DB to SQLite DB (a permanent offline DB) to match the prerequisite of an App.Whenever new facilities are added to the live DB, the SQLite DB has the responsibility to delete the existing DB and generate a new one by using (database.Delete (TABLE_NAME_FACILITIES, null, null)).

Figure 6 .
Figure 6.System components.(a) Phone number verification; (b) Mapped facilities; (c) Show route to the specialized facility.

3 )
Location Module: Mapped facilities component retrieves facilities on a Google map implemented by Google map API.In order to locating health facilities and track user's current position, GPS technology embedded in AOS Smartphones is required, this process is supported by GPS satellite to an App.The above functionalities of the AFYA Digital App are crucial, they can be accessed both online and offline mode by users whenever seek for medical attention.However, with exception to "show route" function, that can only be accessed online since the App requires permission to user's current location on Google Map access.Figure 6(b) and Figure 6(c) demonstrates the location module.4) System Administrator Module: Admin is tasked to insert, delete, update or create a new facility within the database on a cPanel server in order to appear on the map.Also, responsible for deleting and disabling user accounts as a result of any unusual activity occurred within an application.5) Performance Monitoring Module: Performance monitoring aims to provide indications of improvement, failure or lack in the achievement of results using an organized assessment tool based on objective of an on-going or completed project [31].In addition, performance monitoring process is made possible through web application platform called Firebase technology.This technology offers in built functionality for analysing and authentication services.Therefore, data generated can be extracted through Excel file (.xlsx) and CSV files (.csv).The visualized data will only be accessed online.6) Health Information Dissemination Module: This section displays the online health information access based on TB, HIV, Malaria and Covid-19 from
ure 10 demonstrates number of users who retain the application usage between December 2020 and April 2021 analysis.

Figure 8 .
Figure 8. Analysis of active users of the App between March 20, 2021 and April 15, 2021.

Figure 9 .
Figure 9. Analysis of authenticated user for the App between December 2020 and April 2021.

Figure 11 .
Figure 11.System analysis on the number of Users from EA partner states who evaluates the app.

Table 1 .
Description of various research contributions on health services accomplished using different technologies.

Table 2 .
System requirements verification featured in the interview.