







































 

 P-ISSN : 2715-2448 | E-ISSSN : 2715-7199  

Vol.2 No.2 July 2021  

Buana Information Tchnology and Computer Sciences (BIT and CS) 

 

55 | Vol.2 No.2, July 2021 

 

Implementation Location-Based Service (LBS) on Mobile Application  

for Searching Dormitory 

 

Moh Hasan Basri 1  

Information System 

Faculty of Engineering And Computer Science 

University Buana Perjuangan 

Karawang 

si17.mohbasri@mhs.ubpkarawang.ac.id 

Aprilia Hananto 2 

Information System 

Faculty of Engineering And Computer Science 

University Buana Perjuangan 

Karawang 

aprilia.hananto@ubpkarawang.ac.id 

 

 ‹β› 

Siti Masruroh 3 

Information System 

Faculty of Engineering And Computer Science 

University Buana Perjuangan 

Karawang 

siti.masruroh@ubpkarawang.ac.id

Abstract—The growth of mobile features, especially 

Smartphones at this time can be said to be very developed. 

Judging from the increasing number of mobile users, the 

availability of various mobile features is also growing very 

rapidly. In line with these facts, the author aims to create a 

mobile Dormitory application using Location-Based Service 

(LBS) technology with the application of the Haversine 

method, making it easier for users to find the closest 

Dormitoryto their place of work with appropriate facilities. 

This application is not only to search for Dormitorys, it can 

also place orders online, this is also an opportunity for the 

manager or owner of the Dormitoryto promote their 

Dormitory. Methods of data collection are done by 

observation, interviews, literature studies, and 

documentation. The development of this application system 

uses the Waterfall method. The final result of this research 

will create an android-based Dormitory mobile application 

that can make it easier for Dormitoryseekers to search and 

book Dormitorys as well as a means of promotion for 

Dormitoryowners and managers. 

Keywords—Android, Haversine, Location-Based Service, 

Mobile Dormitory, Waterfall 

Abstrak—Pertumbuhan fitur mobile khususnya Smartphone 

saat ini dapat dikatakan sangat berkembang. Dilihat dari 

peningkatan jumlah pengguna ponsel, ketersediaan berbagai 

fitur ponsel juga berkembang sangat pesat. Sejalan dengan 

fakta tersebut, penulis bertujuan untuk membuat aplikasi 

mobile kost menggunakan teknologi Location Based Service 

(LBS) dengan penerapan metode Haversine, sehingga 

memudahkan pengguna untuk mencari kost terdekat dengan 

tempat kerjanya dengan tepat. fasilitas. Aplikasi ini tidak 

hanya untuk mencari tempat kost, juga dapat melakukan 

pemesanan secara online, hal ini juga menjadi peluang bagi 

pengelola atau pemilik kost untuk mempromosikan kostnya. 

Metode pengumpulan data dilakukan dengan observasi, 

wawancara, studi pustaka, dan dokumentasi. Pembangunan 

sistem aplikasi ini menggunakan metode Waterfall. Hasil 

akhir dari penelitian ini akan membuat sebuah aplikasi 

mobile kost berbasis android yang dapat mempermudah 

pencari kost untuk mencari dan memesan kost serta sebagai 

sarana promosi bagi pemilik dan pengelola kost. 

Kata Kunci—Android, Haversine, Layanan Berbasis Lokasi, 

Mobile Dormitory, Waterfall 

 

I. PRELIMINARY 

 Karawang Regency is an area in West Java province 

which has an area of 1,753.27 Km2 or 3.73 percent of the area 

of West Java province with a population of 2,336,009 people 

[1]. Karawang is known as a big industrial city in Indonesia. 

This can be seen from the number of companies that are 

established in Karawang. Therefore, many immigrants from 

various cities come to work for companies in this city. 

Migrants who mostly don't know the area in Karawang 

generally have problems finding Dormitorys around the 

company where they work, especially Dormitorys with the 

closest distance from the company. On the other hand, 

Dormitoryowners find it difficult to promote or publicize 

available rooms or Dormitorys. 

The growth of mobile features, especially smartphones at this 

time, can be said to be very developed. Judging from the 

increasing number of mobile users, the availability of mobile 

features is also growing very rapidly and internet technology 

has progressed very drastically. The Internet has become a 

very effective means of information and communication. 

With the internet, various information in the world can be 

obtained quickly. Currently, android applications are widely 

used in various fields, one of which is in the field of business 

which has implemented many android applications and has 

been proven to provide benefits to the community [2]. 

Based on this background, the author aims to design an 

application with the title "Mobile Dormitory Application 

Karawang Using Location-Based Service (LBS)", which can 

be used as a means to assist users in finding Dormitorys based 

on the closest distance and knowing the Dormitory address 

and information about other Dormitorys. , and on the 

application, you can order Dormitorys online. With the 

presence of this Dormitory application, users can search for 



 

56 | Vol.2 No.2, July 2021 

 

the nearest Dormitoryand book a Dormitory. This application 

is made with the Java programming language based on 

Android and to determine the closest distance by utilizing 

Location Based Service (LBS) using the Haversine Formula 

[3]. 

II. RESEARCH METHODS 

The methods used in this study are data collection 

methods, Waterfall system development methods, Haversine 

Formula to determine the closest distance in finding a 

Dormitoryin the application built, and Location-Based 

Service to connect the user's location by utilizing the Global 

Positioning System which is already available on mobile 

devices. 4].   

 

1. Method of collecting data 

In the data collection method, the researchers used four 

ways, including: 

1)Observation 

Researchers visited and made direct observations to 

several Dormitorys in Karawang, these observations were 

like seeing and checking the overall state of the 

Dormitorysuch as the state of the Dormitory rooms and 

available facilities. The results of observations are in the form 

of facts and information about the state of the Dormitory. 

2)Interview 

Conduct direct interviews with Dormitoryowners about 

how to order, pay and market the Dormitoryand ask for 

information about the Dormitorysuch as the name of the 

Dormitory, Dormitory address, Dormitory rules, and others. 

The results of this interview are in the form of Dormitory data 

that can be used as material for designing applications to be 

made. Then, interview the Dormitoryseekers about how or 

the methods used so far to search for Dormitorys and how to 

order them. The results of interviews with 

Dormitoryresidents are in the form of information that can 

later be used as the need for designing applications to be 

made. 

3) Literature Study 

This literature study was conducted to obtain theoretical 

references related to the research topic raised, this theory can 

be obtained from several sources such as journals and theses. 

4) Documentation 

The documentation carried out in this study such as taking 

pictures of the Dormitorywith a smartphone camera, existing 

facilities, and other images that support the process of this 

research. 

2. System Development Method 

The development of this system uses the Waterfall 

method [5], while the stages in the development of this 

system are as follows: 

 

 

 

Figure 1 Model Waterfall 

 

1) Needs Analysis (Requirements Analysis) 

At this stage, intensive requirements collection is carried 

out to determine software requirements so that users can 

understand the type of software needed [6]. 

2) Design (Design) 

 System design is a stage that focuses on the appearance 

of the system, including data structures, system software 

architecture, and system interfaces. This stage is designed to 

meet user needs by using a system in the form of designing a 

mobile application system display, such as searching for 

Dormitory rooms based on location or Location-Based 

Service (LBS) with the Haversine method [3]. 

3) Implementation (Coding) 

 This stage is the coding stage of the program which is 

the implementation process in the form of an order or the 

realization process of the command form, and the computer 

can use a programming language to understand the process. 

The Mobile Application System that will be created uses the 

Java programming language using Android Studio and the 

Firebase Database. This implementation phase includes the 

application of the Haversine Formula to determine the closest 

Dormitory distance in the application [7]. 

4) Testing (Testing) 

This testing stage is to ensure that the system that has 

been completed is by the designer's design, to find out 

whether the implemented functions can be used in the process 

of making and designing the Mobile application system. 

3.  Haversine Formula 

The Harvesine method is used to calculate the longitude 

of two points on the earth's surface based on latitude and 

longitude. Haversine Formula requires inputting the 

longitude and latitude of the user's location. The following is 

the formula of Haversine [8].  

 

 

Figure 2 Haversine Formula 

Information : 

Lat1 = Degree latitude of starting point 

Long1 = Degree longitude starting point 

Lat2 = Degree latitude of destination point 

Long2 = Degree longitude of destination point 

x = Longitude (Longitude) 

y = Latitude (Latitude) 

d = Distance (Km) 

1 degree = 0.0174532925 radians 

R = 6371 Km 

From the above formula, the following is a distance 

calculation using the Haversine Formula and an analysis of 



 

57 | Vol.2 No.2, July 2021 

 

the Haversine Formula calculation. This calculation is to 

measure the distance by using a sample of two locations, 

namely from the starting point of Karawang International 

Industrial City to the destination point of Griya Kost. 

Location 1 Karawang International Industrial City 

Is known : 

Latitude = -6.359197486564478 

Longitude = 107.2742426711646 

Location 2 Griya Kost 

Is known : 

Latitude = -6.352268604491233 

Longitude = 107.309655751302 

Difference in Longitude Locations 1 and 2 

Difference = Longitude Location 1 - Longitude Location 2 

Difference = 107.2742426711646–107.3096557511302 

Difference = -0.03541307997 

Convert Latitude Location 1,Location 2,Longitude 

Difference to Rad 

Conversion result Latitude Location 1 = -0.110988933924 

rad 

Latitude Location 2 = -0.110868002119 rad . conversion 

result 

Longitude Difference conversion result = -0.000618074843 

rad 

Calculates SIN from latitude of Locations 1 and 2 which has 

been converted to Rad 

SIN calculation results Location 1 = -0.1107612039 

SIN calculation results Location 2 = -0.1106410154 

Calculates COS from latitude of Location 1, Location 2 and 

Longitude Difference converted to Rad 

COS calculation results Location 1 = 0.9938470484 

COS calculation results Location 2 = 0.9938604357 

COS calculation result Longitude Difference = 0.999999809 

Calculates the distance between Location 1 to Location 2 

Distance = (SIN Location 1 * SIN Location 2) + (COS 

Location 1 * COS Location 2 * COS Longitude Difference) 

Distance =(-0.1107612039 * -0.1106410154) + 

(0.9938470484 * 0.9938604357 * 0.999999809) 

Distance = 0.9999998039 

Calculating distance result to ACOS 

Distance = ACOS (0.9999998039) 

Distance = 0.00062618 

Convert ACOS distance results to Degrees 

Distance = 0.03587747121559 

Converting distance results from Degrees to Kilometers 

(KM) 

Distance = 0.03587747121559 * 60 * 1.1515 

Distance = 2,478774486 

Determine the final result 

Distance = 2.478774486 * 1.609344 

Distance = 3.989200846 KM 4 KM 

The result of the above calculation is 3.989200846 km 

which is calculated from the starting point of Karawang 

International Industrial City and the destination point of 

Griya Kost. 

 

III. RESULTS AND DISCUSSION 

1. Running System Analysis 

The current system analysis aims to see the process of 

finding a Dormitoryin Karawang City which is still being 

carried out by visiting from one Dormitoryto another to see 

the state of the Dormitorydirectly. The following is a 

flowmap on a system that is ongoing or currently running [9]. 

 

Figure 3 Flowmap of the Running System 

2. Proposal System 

This design aims to meet all the needs of the users of the 

system to provide a clear and understandable picture. The 

proposed system describes the system to be built. The system 

design is made in the form of a Flowmap, starting from the 

user opening the application, until the user manages to get a 

Dormitory. The system design to be built is described in the 

form of a Flowmap as shown in the following figure:  



 

58 | Vol.2 No.2, July 2021 

 

 

Figure 4 Flowmap of the Proposed System 

3.   Usecase Diagram  

Usecase Diagram is a description of the actors and the 

needs of the usecase functions needed in the system [10]. The 

following is an image of the proposed use case diagram: 

 

Figure 5 Usecase Diagram of the Proposed System 

The proposed system uses a use case diagram explaining 

the system to be built with actors such as Dormitoryseekers, 

Dormitoryowners, and admins with their respective access. 

4.   Sequence Diagram 

The sequence is generally used to describe a scene or a 

series of steps taken in response to an event to produce a 

certain output, as well as what has changed internally and 

what kind of output has been produced. The following is a 

modeling of the Mobile Kost Karawang application using a 

Sequence Diagram. Below is an image of the Sequence 

Diagram of the proposed search: 

 

Figure 6 Kost Search Sequence Diagram 

The picture above is a sequence diagram for the 

Dormitorysearch, in which the user enters the search keyword 

on the home page, then the system processes the search and 

the system results will display the search Dormitory results 

taken from the Dormitory data. 

4.   Class Diagram  

Class diagrams or class diagrams describe the structure of 

the system in terms of defining the classes that will be created 

to build the system. With class diagrams, you can make 

detailed diagrams by paying attention to the specific codes 

needed by the program and this can be applied to the structure 

described. The following is a class diagram on a Dormitory 

mobile application. 

 

 

 

Figure 7 Class Diagram of the Mobile Dormitory 

Application 

5.   Implementasi Location-Based Service (LBS)  

Location-Based Service (LBS) is used in the system, 

especially in conducting searches that can be connected to 

google maps. The result of Location-Based Service (LBS) is 

the point from the place or location of the Dormitorythat will 

be stored in the system [11]. 



 

59 | Vol.2 No.2, July 2021 

 

LBS implementation begins by finding the last location 

with latitude and longitude points from the Global 

Positioning Service (GPS) connected to the user's mobile 

device. This LBS is connected to google maps so that when 

it is determined the google maps display will match the user's 

location. 

6.   Implementasi Haversine 

The distance determination is generated from calculations 

using the Haversine Formula, the values used are the 

longitude and latitude points from the starting point to the 

destination point. 

The Haversine Formula begins by calculating the 

difference between the initial longitude point and the 

destination longitude point. Then the value of the latitude of 

the starting point and the latitude of the destination and the 

difference between the longitudes are converted into radians. 

Then calculate sin and cos from the results that have been 

converted from the value of the starting point and the 

destination point, but to calculate cos including the results of 

calculating the difference in longitude of each point [8]. 

The distance generated from the product of the starting 

point sin and the destination point sin is added up by the 

product of the starting point cos and destination point cos and 

the longitude difference cos. The result is converted to 

kilometers after finding across and multiplied by 60 * 1.1515 

and multiplied by 1.609344 to produce the distance in 

kilometers [12]. 

 

 

7.   Haversine Formula Calculation Analysis  

The analysis of the Haversine Formula calculation uses 

three sample data. The results of calculations with the 

Haversine Formula can be seen in the following table: 

Table 1 Calculation Results of Haversine 

 

After calculating with the Haversine Formula, the researcher 

made an experiment using Google Measurement to measure 

the distance. This experiment was made by entering the 

coordinates of the start point and endpoint in Google Maps to 

measure, then using the distance measurement function by 

drawing a straight line from the starting point to the endpoint 

that was already available on Google Maps. This distance 

calculation experiment can be seen in the following figure: 

 

Figure 8 Google Measurement 

Based on the comparison of distance measurements using 

Haversine Formula and Google Maps, there are differences 

in distance measurement results of 0-10 meters. comparison 

of distance measurement results as in the following table: 

Table 2 Comparison of Distance Measurement 

8.   Interface Design 

The design of the interface or the interface on the software 

is used to connect the interaction between the user and the 

software to be made [13]. Interface design or system display 

is made using pencil software. The interface design of the 

system building can be seen as shown below [14]. 

 

    No Titik Mulai Titik Tujuan 
Haversine 

Latitude 1 Longitude 1 Latitude 2 Longitude 2 

1. -6,359197487 107,2742427 -6,352268604 107,3096558 3.98 km 

2. -6,327623336 107,2877780 -6,323338243 107,3012788 1.56 km 

3. -6,301365223 107,2780176 -6,304240781 107,2978055 2,19 km 

    No Titik Mulai Titik Tujuan 
Haversine 

Google 

Maps 

Latitude 1 Longitude 1 Latitude 2 Longitude 2 

1. -6,359197487 107,2742427 -6,352268604 107,3096558 3.98 km 3.99 km 

2. -6,327623336 107,2877780 -6,323338243 107,3012788 1.56 km 1.57 km 

3. -6,301365223 107,2780176 -6,304240781 107,2978055 2,19 km 2,20 km 

1. Homepage 2. Dormitory Details Page 



 

60 | Vol.2 No.2, July 2021 

 

 

 

9.   System View Implementation 

After performing the previous stage of analyzing the 

current system and designing the proposed system, then the 

process of implementing the system display Here is the 

display of the Dormitory mobile application: 

                      

  

 

                 

Figure 1 is the home page, on this page, there is a 

Dormitory search column to find a Dormitoryby inputting the 

company name or Dormitoryname, then when pressing the 

search button a list of Dormitorys will appear based on the 

closest distance from the destination company. Figure 2 is a 

page for displaying Dormitory in detail such as addresses, 

categories, ratings or ratings, as well as available Dormitory 

facilities 

Figure 3 is a Dormitory booking page, this page displays 

Dormitory orders and can be seen in detail by selecting an 

order, a page like a Figure 4 will appear which contains 

ordering data and can be inputted by the customer as needed. 

10.  Black Box Test 

Black Box testing is centered on the functional 

requirements of the software. Black box testing makes it 

possible in software engineering to obtain a set of input, 

process, and output conditions that are completely in sync 

with the functionality of a program. 

The system testing phase is carried out after the system 

implementation phase is complete. The execution of the test 

phase is to re-examine all the phases that have been run to 

find or find errors. The purpose of system testing is to ensure 

that the system that has been built will function as expected. 

The following is a table of the results of testing the system 

interface function using Black Box testing [15]. 

Table 3 System Interface Testing 

No. Test 

Name 

User Expected results Test 

result 

Status

Uji  

1. Login 

Page 

Dormitor

y Finder, 

Dormitor

y Owner, 

Admin 

The system can display the login 

page interface when opening the 

Mobile system. The login process 

can be done by inputting text or 

logging in via a Google account 

automatically 

the login 

page can 

be 

displayed. √ 

2. Homep

age 

Cost 

Finder 

The system can display the home 

page interface after successful 

login. 

the home 

page can 

be 

displayed. 
√ 

3. Dormit

ory 

Details 

Page 

Cost 

Finder 

The system can display the 

Dormitory detail page 

Dormitory 

detail page 

can be 

displayed 

√ 

3. Order Page 4. Order Details Page 

1. Homepage 2. Dormitory Details Page 

3. Order Page 4. Order Details Page 



 

61 | Vol.2 No.2, July 2021 

 

4. Search 

Page 

Cost 

Finder 

The system can display a list of 

Dormitorys that are sought in order 

based on the closest to the furthest 

distance 

the search 

page can 

be 

displayed 

√ 

5. Order 

Page 

Cost 

Finder 

The system can display the order 

page 

order page 

can be 

displayed 
√ 

6. Dormit

ory 

Manage

ment 

Page 

Dormitor

y Owner, 

Admin 

The system can display a 

Dormitory management page, on 

this page the Dormitoryowner can 

add, view, change and delete 

Dormitorys. Admin can view and 

disable Dormitory 

Dormitory 

manageme

nt page can 

be 

displayed 

√ 

 

IV. CONCLUSIONS AND SUGGESTIONS 

Based on the research that has been done and the test 

results of the mobile Dormitory application using Location-

Based Service (LBS) with the Haversine Formula, it can be 

concluded that: 

1. A Dormitory mobile application has been built that 

can display the location of the closest Dormitoryfrom 

a company in Karawang, this method uses the 

Haversine Formula to determine the closest distance 

where Haversine is a formula that measures the 

distance between two points by drawing a straight line 

between the two points. This formula ignores terrain 

or obstacles when measuring these two points. 

2. The application can provide detailed Dormitory 

information needed by Dormitoryseekers such as 

Dormitory addresses, Dormitory pictures, available 

facilities, prices, and other information. 

REFERENCE 

[1] “Karawang Kabupaten.” [Online]. Available: 

sumber:https://karawangkab.bps.go.id. 

[2] Bayu Priyatna and Fitria Nurapriani, “Implementasi 

Koordinat Google dan Citra Kamera Pada Aplikasi 

Monitoring Petugas Berbasis Android,” Buana Ilmu, vol. 

5, no. 1, pp. 106–121, 2020. 

[3] G. F. Laxmi, F. Satrya, and F. Kusumah, “Perancangan 

Location Based Service ( Lbs ) Pada Pencarian Event 

Aplikasi Sahabat Jasa Berbasis Android,” pp. 297–306, 

2018. 

[4] I. A. Murdiono, “Naskah publikasi perancangan aplikasi 

mobile location based service (lbs) untuk pencarian lokasi 

rumah kos di kota sleman berbasis android,” 2020. 

[5] D. Rancadaka, “Aplikasi Penjualan Padi Berbasis Web 

Dengan Menggunakan Metode,” vol. 1, no. 1, pp. 29–33, 

2020. 

[6] B. Priyatna, S. Shofia Hilabi, N. Heryana, and A. 

Solehudin, “Aplikasi Pengenalan Tarian Dan Lagu 

Tradisional Indonesia Berbasis Multimedia,” 

Systematics, vol. 1, no. 2, p. 89, 2019. 

[7] B. Huda and B. Priyatna, “Penggunaan Aplikasi Content 

Management System (CMS) Untuk Pengembangan 

Bisnis Berbasis E-commerce,” Systematics, vol. 1, no. 2, 

p. 81, 2019. 

[8] H. Kusniyati and H. Fadhillah, “Aplikasi Pencarian 

Ustadz Untuk Wilayah Dki Jakarta Menggunakan 

Algoritma Haversine Formula Berbasis Android,” Petir, 

vol. 9, no. 2, pp. 102–111, 2019. 

[9] H. Gunawan and A. K. H. Saputro, “Pemanfataan 

Aplikasi Mobile Untuk Mempercepat Pencarian Tempat 

Indekos Berbasis Android,” J. Muara Sains, Teknol. 

Kedokt. dan Ilmu Kesehat., vol. 1, no. 2, pp. 85–96, 2018. 

[10]S. Anton, I. C. Alex, and N. Kristiawan, “Sistem 

Penilaian Kinerja Pegawai dalam Pelayanan Nasabah 

pada … (Sujarwo dkk.),” Penilaian, Sist. Pegawai, 

Kinerja Nasabah, Pelayanan Kinerja, Abstr. Lang. 

Unified Model., pp. 270–275, 2019. 

[11]M. Ahmad, S. Al-Ikhsan, and F. Satri, “Pengembangan 

Aplikasi Pencarian Wisata Kuliner Kota Bogor Berbasis 

Range Harga Dan Metode LBS (Location Base Servise) 

Pada Android,” Inovatif, vol. 1, no. 2, pp. 1–5, 2018. 

[12]A. M. Abdillah, R. Rianto, and N. I. Kurniati, “Penerapan 

Metode Haversine Pada Aplikasi Layanan Perbaikan 

Kendaraan Berbasis Location Based Service,” JUITA  J. 

Inform., vol. 7, no. 2, p. 81, 2019. 

[13]B. Priyatna and A. Hananto, “Implementation of 

Application Programming Interface (API) in Indonesian 

Dance and Song Applications,” Systematics, vol. 2, no. 2, 

pp. 47–57, 2020. 

[14]Gelinas, Ulric, Oram, Alan, Wiggins, and William, 

“Accounting Information System,” pp. 17–30, 1990. 

[15]A. Ukur, “Sistem Informasi Monitoring Kualitas Alat 

Ukur,” no. Ciastech, pp. 419–428, 2020.

 


