Top Banner
SmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT Submitted to the Faculty of the Department of Computing Sciences Texas A&M University-Corpus Christi Corpus Christi, Texas In Partial Fulfillment of the Requirements for the Degree of Master of Science in Computer Science By Md Mominul Islam Spring 2018 Committee Members Dr. Dulal C. Kar Committee Chairperson Dr. Ajay Katangur Committee Member
54

SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

Aug 11, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

SmartTraGuide: An Integrated TravelApplication for Android When User on

Move

GRADUATE PROJECT

Submitted to the Faculty ofthe Department of Computing SciencesTexas A&M University-Corpus Christi

Corpus Christi, Texas

In Partial Fulfillment of the Requirements for the Degree ofMaster of Science in Computer Science

By

Md Mominul IslamSpring 2018

Committee Members

Dr. Dulal C. KarCommittee Chairperson

Dr. Ajay KatangurCommittee Member

Page 2: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

ii

ABSTRACT

In present tourism system, a tourist appoints a guide to know more about

the place whenever they visit famous spots. The hired guide narrates the history of

the place. Now a day’s a mobile phone has become a necessary part of one’s life.

There is a continuous rise in the number of mobile computing applications, centered

around peoples daily life. In such applications, location dependent systems have

been identified as an important application. Such application which presents the

architecture and implementation of such a location is commonly known as Smart

Travel Guide. This is a standalone application developed for android based smart

phones and tablets. This android “SmartTraGuide” application is able to provide

tourism information to the mobile users conveniently. This system takes advantage

of light-weighted mashup technology that can combine more than one data source

to create value-added services, while overcomes the limitations of mobile devices.

The mobile application “SmartTraGuide” installed on tourist’s mobile can act as a

guide. The main objective of this application is providing tour guidance information

to the traveler queried through an Internet map service such as Google Maps on

the move. By Smart Travel Guide app, users can obtain detailed information on

attractions; including text, picture and video. The features available in this app are:

The selected places to visit, such as tourist attractions, restaurants, hotels can be

viewed using Google maps. This app also provides the weather report of the visited

city; find videos, capture images, and calculates the distance and duration between

two points.

Page 3: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

iii

TABLE OF CONTENTS

CHAPTER Page

ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii

TABLE OF CONTENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii

LIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v

LIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii

1 BACKGROUND AND RATIONALE . . . . . . . . . . . . . . . . . . . . 1

1.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.2 Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.3 Android Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.4 Android Studio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.5 Mashup Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.5.1 How is a Web Mashup Built? . . . . . . . . . . . . . . . . . . . 5

1.5.2 Mobile Travel Guide System Based On Mashup . . . . . . . . . 5

1.6 Existing Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.6.1 Problems in Existing Systems . . . . . . . . . . . . . . . . . . . 6

1.7 SmartTraGuide App . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.7.1 Functionalities of SmartTraGuide App . . . . . . . . . . . . . . 7

1.8 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 SYSTEM DESIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1 Modules Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . 9

2.1.2 The main Components of Mashup Server . . . . . . . . . . . . 11

2.1.3 Communication Protocols . . . . . . . . . . . . . . . . . . . . . 12

2.2 Design Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.3 Use Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.4 User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.4.1 Login Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

2.4.2 Launch Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

Page 4: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

iv

CHAPTER Page

2.4.3 Distance and Duration Measure . . . . . . . . . . . . . . . . . 17

2.4.4 Weather . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

2.4.5 Attractive Places . . . . . . . . . . . . . . . . . . . . . . . . . . 19

2.4.6 Nearby Restaurants . . . . . . . . . . . . . . . . . . . . . . . . 20

2.4.7 Nearby Hotels . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

2.4.8 Related Video . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.4.9 Take Picture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.4.10 Log Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3 IMPLEMENTATION OF APPLICATION MODULES . . . . . . . . . . 24

3.1 Registration and Login . . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.2 Android Permissions in AndroidManifest.xml File . . . . . . . . . . . 25

3.3 Creating the Current Location Finder . . . . . . . . . . . . . . . . . . 25

3.4 City Weather Forecast . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3.5 Searching Videos during Travel . . . . . . . . . . . . . . . . . . . . . 28

3.6 Video Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.7 Web Browser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.8 Camera Functionality for taking pictures . . . . . . . . . . . . . . . . 30

4 TESTING AND EVALUATION . . . . . . . . . . . . . . . . . . . . . . . 31

4.1 Launching the application . . . . . . . . . . . . . . . . . . . . . . . . 31

4.2 Indicating Current Location on Maps . . . . . . . . . . . . . . . . . . 32

4.3 Measuring Distance and Duration on Maps . . . . . . . . . . . . . . . 33

4.4 Display the Weather Forecasts . . . . . . . . . . . . . . . . . . . . . . 34

4.5 Video Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

4.6 Play the searched Video . . . . . . . . . . . . . . . . . . . . . . . . . 36

4.7 Camera to take pictures . . . . . . . . . . . . . . . . . . . . . . . . . 36

4.8 Logout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

4.9 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

5 CONCLUSION AND FUTURE WORK . . . . . . . . . . . . . . . . . . . 39

5.1 CONCLUSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

5.2 FUTURE WORK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

APPENDIX A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Page 5: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

v

LIST OF FIGURES

FIGURE Page

1 Global market share held by smartphone operating systems [1] . . . . 3

2 Architecture of SmartTraGuide application. . . . . . . . . . . . . . . 9

3 Design Flow Diagram of SmartTraGuide Application. . . . . . . . . . 13

4 Use Case Diagram of SmartTraGuide Application. . . . . . . . . . . 14

5 Login Screen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

6 Launched map indicates user current position. . . . . . . . . . . . . . 16

7 Distance and duration measure screen on a map. . . . . . . . . . . . 17

8 Change city to view city weather forecasts. . . . . . . . . . . . . . . . 18

9 Attractive places shown from user current position. . . . . . . . . . . 19

10 List of nearby restaurants. . . . . . . . . . . . . . . . . . . . . . . . . 20

11 List of nearby hotels shown. . . . . . . . . . . . . . . . . . . . . . . . 21

12 Related video search shown on video search. . . . . . . . . . . . . . . 22

13 Camera on the menu item to take a picture. . . . . . . . . . . . . . . 23

14 Login Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

15 Permissions in AndroidManifest.xml file. . . . . . . . . . . . . . . . . 25

16 Adding libraries to build.gradle file to find current location. . . . . . 26

17 Codes to how GPS provider works to find a user’s current location. . 26

18 Codes to display city weather forecasts. . . . . . . . . . . . . . . . . 27

Page 6: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

vi

FIGURE Page

19 Java codes to search related videos for travel. . . . . . . . . . . . . . 28

20 Code for video player activity. . . . . . . . . . . . . . . . . . . . . . . 29

21 Camera function to take pictures. . . . . . . . . . . . . . . . . . . . . 30

22 Launching the SmartTraGuide application. . . . . . . . . . . . . . . . 31

23 Indicating current location of the user (Corpus Christi) on maps. . . 32

24 Measured distance and duration between two points on maps. . . . . 33

25 Current city weather forecast. . . . . . . . . . . . . . . . . . . . . . . 34

26 TAMUCC videos searched on search screen. . . . . . . . . . . . . . . 35

27 TAMUCC video is playing. . . . . . . . . . . . . . . . . . . . . . . . 36

28 Camera screen for taking pictures. . . . . . . . . . . . . . . . . . . . 37

29 Part of LoginActivity code. . . . . . . . . . . . . . . . . . . . . . . . 42

30 Part of MainActivity code. . . . . . . . . . . . . . . . . . . . . . . . 43

31 Part of MapsActivity code. . . . . . . . . . . . . . . . . . . . . . . . 44

32 Part of WeatherActivity code. . . . . . . . . . . . . . . . . . . . . . . 45

33 Part of SearchActivity code. . . . . . . . . . . . . . . . . . . . . . . . 46

34 Part of CameraActivity code. . . . . . . . . . . . . . . . . . . . . . . 47

Page 7: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

vii

LIST OF TABLES

TABLE Page

1 List of Questions in Feedback and their Average Rating. . . . . . . . 38

Page 8: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

1

CHAPTER 1

BACKGROUND AND RATIONALE

1.1 Introduction

Travel is for fun, that’s why people like to travel when they find free time with

families or for business purpose. There is greatly enriched travel information provided

to the tourists on the Internet. Various travel organization are available on the web.

Over the last few decades technology has improved a lot. One of the best and biggest

technological advancements is the invention of the smartphone. Although, a problem

is shown that tourists are not able to get travel information timely when they are

on the move. Planning a trip the travelers need to have prior knowledge about the

most visited places, restaurants, and hotels in any particular city they travel [4]. For

this, travelers spend much time browsing multiple websites for the travel planes on

mobile devices and PCs. The travel app named “SmartTraGuide” for android based

smartphones and tablets uses mashup technology to solve this problem. Nowadays

smartphones are becoming more powerful in terms of communication and compu-

tational capabilities. A great number of travel mobile phone applications appeared

recently, many of which are location related. An important class of context-aware

applications is Location-dependent services which answer location-related queries.

To search a particular city’s tourist attractions, weather forecasts, restaurants, and

hotels is time consuming over different mobile applications.

A travel guide or guide book is “a book of information about a place designed

for the use of visitors or tourists”. This application “SmartTraGuide” permits users

to customize their search for places and get tour guidance information they need

anytime and anywhere. In specific, the tourist data could be browsed or queried

Page 9: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

2

through an Internet map service such as Google Maps. Moreover, smart travel guide

application calculates the distance between two points very accurately.

1.2 Android

Android is a mobile operating system developed by Google, based on the Linux

Kernel and designed primarily for touch screen mobile devices such as smartphones

and tablets [9]. Moreover for touch screen devices, Google has more progressed An-

droid Wear for wrist watches, Android Auto for cars, and AndroidTV for televisions,

each with a specialized user interface [9].

In present world, Android is the leading mobile operating system. Android

is a fully open-source platform which was created completely for smart phones and

similar devices like tablets. Android operating system is a very flexible system and

easy to acquire skills with their rich user interface and robust Android SDK (Soft-

ware Development Kit). Android applications (“apps”) can be downloaded from the

Google Play store, which features over 3.5 million apps as of 2017 [9]. This project

is developed on Android SDK by using the Android Studio IDE.

Figure 1 [1] shows the global market share held by smartphone OS, in terms

of smartphone shipments worldwide, from 2009 to 2017. According to Statista (an

on-line data analysis website), in 2017, about 85.9 percent of all smartphones sold

to end users were phones with the android operating system [1]. From Figure 1 it

can be seen that every year android users are increasing. Android has the largest

installed base of any operating system as of May 2017; it has 2 billion monthly active

users.

Page 10: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

3

Figure 1. Global market share held by smartphone operating systems [1]

1.3 Android Applications

A typical android app is designed for a smartphone or a tablet PC running

on the Android OS and the Android platform is built for mobile devices. Android

apps use Java core libraries and are written in the Java programming language. The

Dalvik is a virtual machine which is specially designed for mobile devices. From the

Android website developers may download the Android software development kit

(SDK). The SDK includes tools, sample code and relevant documents for creating

Android apps.

Java supports the Go programming language, although with a limited set of

application programming Interfaces (API). In May 2017, Google announced support

for Android app development in the Kotlin programming language. At first, Google’s

supported integrated development environment (IDE) was Eclipse using the Android

Page 11: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

4

Development Tools (ADT) plug-in; in December 2014, Google released Android Stu-

dio, based on IntelliJ IDEA, as its primary IDE for Android application development

[9].

1.4 Android Studio

Android Studio is the official IDE for Android app development, built based

on JetBrains IntelliJ IDEA. In December 2014 the first stable build of android studio

was released and from then it replaced Eclipse Android Development Tools (ADT)

as primary IDE for native Android application development [7]. In the current stable

version Android Studio has features such as Gradle-based build support, Android-

specific refactoring and quick fixes, Pro Guard integration and app-signing capa-

bilities, various build variants, and multiple app file generation, Code templates to

help build common app features, good layout and theme editor, Lint tools to catch

performance, support for Google Cloud Messaging (GCM) and Google App Engine,

and Android Virtual Device (Emulator) to run and debug apps.

1.5 Mashup Technology

A mashup, in web development, is a web page, or web application, that uses

content from more than one source to create a single new service displayed in a

single graphical interface. The term implies easy, fast integration, frequently using

open API and data sources to produce enriched results that were not necessarily the

original reason for producing the raw source data.

Page 12: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

5

1.5.1 How is a Web Mashup Built?

A web application that takes information from one or more sources and dis-

plays it with a unique layout or in a new way is called a web mashup. Now a day’s

the key driving power of the Internet is information, and a mashup is an application

that takes that information and shows it to you in a unique way. For example, the

Nitendo Wii (a home video game) has been difficult to find in stores. From various

stores like EB Games and other websites like EBay a web mashup might help by

taking the data and combining this information with Google maps to present an

easy-to-use interface for finding a Wii in that area.

Because of the web is continuously growing, there are many websites that

have opened up application programming interfaces (API’s) that allow developers

to get at their core information. A key example of this is Google Maps, which is

a very popular interface to use in mashups. Google authorizes developers to access

their maps through API’s. To create something new and unique the developer can

then combine these maps with another stream of data. However, newer mashups

sometimes only use a single source of information. TwitterSpy is a good example of

this, which only pulls data from Twitter.

1.5.2 Mobile Travel Guide System Based On Mashup

Web-based applications are becoming richer by using Mashup technology and

related technologies are becoming more mature. Mashups based on open web appli-

cation programming interfaces (API’s) have shown the power of integrating appli-

cations and data sources to create novel and situational web services to serve needs

of users. The main characteristics of a mashup are visualization, combination, and

aggregation. A mashup can combine two or more data sources (content or service)

Page 13: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

6

to provide several new services or contents to the users. More importantly, it is a

lightweight web application program. It is important to make existing data more

useful, for personal and professional use. In the mashup server side the data or

contents are mashed up. Mashups are generally client applications or hosted online

to be able to permanently access the data of other services. Moreover, no matter

whether the mobile client is using a web browser or not, it is able to understand the

format of the data or contents. The application of mobile devices is greatly exploited

using mashup technology.

1.6 Existing Systems

There are many mobile applications and different websites providing tourist

information, but those are mostly location related. An important class of context-

aware applications is Location-dependent services, which answer location-related

queries. There are many mobile travel applications available such as travel, ToGo,

TravelReminder, TravelGuide, TravelAgent, that are providing location related infor-

mation, location-dependent services and some websites providing tips, advice, and

travel packages to places all over the world, such as tripadvisor.com, Kayak.com,

Orbitz.com, Nomadicmatt.com, Travelocity.com, and Travel + Leisure.

1.6.1 Problems in Existing Systems

These existing systems just provide the list of all available hotels, restaurants,

and tourist attractions [4], but do not provide weather forecasts of the travel city,

distance between two places, and tourist attraction place videos as the user needs.

In the tourism industry, tourist information is acquired mainly through magazines,

newspaper, radio and other simple ways those are available easily [5]. The problem

Page 14: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

7

is that when they are on the move, they are not able to get travel information on a

timely basis.

There are many mobile travel guide applications available. These mobile

apps have some limitations, not providing videos and other guidance information; as

a result people cannot make decisions objectively and cannot understand the tourist

attractions. Also due to continued acquisition of the bandwidth the application on

these mobiles works slowly. Hence, the mobile end-user’s operation is very difficult,

and the contents displayed on the screen of mobile device are limited.

1.7 SmartTraGuide App

The main purpose of this project is when users are on the move, it is able to

provide rich and concise information and make them access the service at anytime

and anywhere. The SmartTraGuide app is based on request and response, so there is

no continuous acquisition of the bandwidth and overcomes the problems of current

location based travel system. This application is also helpful for the user who is

visiting a new city and helps them to obtain the current location, map, and distance

between two points, weather report, and finds videos.

1.7.1 Functionalities of SmartTraGuide App

The functionalities in this application are

• Location Finder: This module is accountable to retrieve user’s current latitude

and longitude using GPS. This will convert the coordinates into street address

using Geo-coding technology.

• This module can indicate the tourist attractions, hotels, and restaurants on

the map.

Page 15: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

8

• Distance and Duration Measure: This module is responsible to calculate the

distance and duration between two points whenever a user wants.

• Video Search: Using Google’s search engine this module is responsible in

searching for videos. The result of search is list of videos related to the user’s

current location.

• Video Player: This module is responsible to play the video which user selects.

• Weather Forecast: This module is responsible to retrieve the weather informa-

tion from Open Weather Map and display it to the user.

• Camera: This module allows users to take pictures when they are on move and

store on the device.

1.8 System Requirements

The following are the requirements to develop this android application:

• Operating System: Windows 7 or above

• IDE: Android Studio

• Android Google API 15 or higher

• Open Weather Map API

• Software: Android SDK (Software Development Kit), Java SE 7 or higher

• Android Device: Android phone or Tablet

• The mobile should have GPS and GPRS features.

Page 16: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

9

CHAPTER 2

SYSTEM DESIGN

2.1 Modules Description

In this section a detailed overview of the system is presented. It comprises

system architecture which describes the basic architecture of system, the main com-

ponents of Mashup Server, and the communication protocols of the system. The

architecture of the developed “SmartTraGuide” application is shown in Figure 2.

Figure 2. Architecture of SmartTraGuide application.

2.1.1 System Architecture

The architecture of this system contains three layers: (i) Presentation Layer,

(ii) Logical Layer and (iii) Data Source Layer.

Page 17: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

10

(i) Presentation Layer

In the system architecture, the presentation layer is the top most layer and it

provides the interaction between the end-users and the system. Through the mobile

web browser the mobile end-users usually interact with the mashup server. In this

layer, the content displaying the issue needs to be addressed because of the limitations

of the mobile device.

(ii) Logical Layer

The logical layer is the most important layer of the system. This layer deals

with data and services from the data sources layer and the mobile end-users. The

conversion of XSL transforms the format of XML which is from the data source layer

into the format of WML (Wireless Markup Language), which is the ability to deliver

the result to the mobile web browser by the Wireless Application Protocol (WAP).

(iii) Data Source Layer

Data source is a back end layer in which the system information is stored. By

the open web APIs and databases this layer provides data, content, and service to

be mashed-up. Currently, more and more websites provide APIs to developers. The

Google Maps APIs is most widely used in diverse areas. The most popular protocols

used by the APIs are REST (Representational State Transfer), SOAP (Simple Object

Access Protocol), and RSS (Rich Site Summary)/Atom. For those data in the silo,

we can extract the content using other technologies such as screen scraping. These

protocols which have their own advantages should be chosen according to the actual

needs. Therefore the Google Maps APIs [2, 3], Open Weather Map APIs [6] are

chosen as the data sources in this project. Based on APIs by REST, the mashup

server communicates with data sources .

Page 18: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

11

2.1.2 The main Components of Mashup Server

• Geo-coding Widget: The geo-coding widget converts end-users location infor-

mation into latitude and longitude coordinates that Google Maps can identify

and mark in the maps.

• XSL StyleSheet: Contents or the data from data sources that is XML format

one be transformed into WML format by the XSL StyleSheet. Therefore, to

provide better services mobile service providers can proficiently use existing

resources.

• Mashup Module: This component is the most important part of the mashup

server. It identifies what kind of services will provide to the mobile end-users.

Data sources transfer the data or contents to the mashup server according to

the receiving command. The received data or contents need to be simplified by

the information extraction technology due to the limitation of mobile device

screen. Then, contents or the data from different data source are mashed up

into the maps, which are provided to the mobile end-user.

• Translation Software: To solve the language problems from domestic and for-

eign tourists, the translation software is designed .

• Security Management: The mashup technology emphasizes openness, but the

end-users private information should be protected. This is contradictory, so

how to effectively protect (and collect) end-users information is a problem.

Page 19: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

12

2.1.3 Communication Protocols

The communication is a very important link of the system. It is to connect

data or contents with each layer. Although SOAP, WSDL (Web Services Descrip-

tion Language), JSON (JavaScript Object Notation) and REST are the standard for

delivering data or contents between mashup server and data sources, REST is the

abstraction mode which is a more effective protocol for the server mode. Compared

to Simple Object Access Protocol (SOAP), it is more structured, not only a specifi-

cation, so the complex protocols are not taken into account. Among mashup server,

Google Maps therefore chooses REST to communicate.

2.2 Design Flow Diagram

The flow of the dynamic aspects of the SmartTraGuide application is described

in Figure 3. The Design Flow diagram is a flowchart to represent the flow from one

activity to another activity. It uses defined symbols like rectangles, circles and arrows,

plus short text labels, to show data inputs, outputs, storage points and the routes

between each destination.

Page 20: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

13

Figure 3. Design Flow Diagram of SmartTraGuide Application.

2.3 Use Case Diagram

Use case diagrams are used to describe a set of actions (use cases) and usually

are referred to as behavior diagrams that some system or systems (subject) should

or can perform in collaboration with one or more external users of the system (ac-

tors). The purpose of a use case diagram is to present a graphical overview of the

functionality provided by a system in terms of actors, their goals (use cases), and any

dependencies between those use cases [4]. The prime reason of a use case diagram is

to show what system functions are performed by which actor. The use case diagram

for SmartTraGuide is shown in Figure 4.

Page 21: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

14

Figure 4. Use Case Diagram of SmartTraGuide Application.

2.4 User Interface

The following section gives the overview of user interface of the application.

The entire execution flow of the “SmartTraGuide” application is described in this

section.

Page 22: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

15

2.4.1 Login Screen

The Login screen checks for the authentication of the user to prevent the ap-

plication from unauthorized use. Figure 5 shows the Login screen, which is the first

screen of the application. Here the user should submit their email and password

(optional) for verification/authentication in order to be allowed to use the “Smart-

TraGuide” app.

Figure 5. Login Screen.

Page 23: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

16

2.4.2 Launch Map

Here user views the current location of user’s current city on the map. In

the map, the user views the nearest hotels, restaurants, and attractive places by

searching. Figure 6 shows the current position on the map.

Figure 6. Launched map indicates user current position.

Page 24: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

17

2.4.3 Distance and Duration Measure

From the menu item clicking on Distance and Duration a user can measure

distance and duration between two points. Distance is calculated in kilometers and

the user easily gets an idea on how far and how long it takes to go for a nearest

restaurant or hotel or any other place. Also the user can measure any other city

distance from the current location. Figure 7 shows distance and duration measure

screen on maps.

Figure 7. Distance and duration measure screen on a map.

Page 25: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

18

2.4.4 Weather

User can view the weather forecast of any city in the weather screen of Smart-

TraGuide app as shown in Figure 8. Detailed weather information such as city name,

temperature, humidity, and pressure is provided.

Figure 8. Change city to view city weather forecasts.

Page 26: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

19

2.4.5 Attractive Places

This app is able to display user’s current position to nearest attractive places

on maps by searching. When the user wants to visit some places such as a museum,

zoo, park, etc from the current location, a list of places are displayed with detailed

information. Figure 9 shows the attractive places from user current position.

Figure 9. Attractive places shown from user current position.

Page 27: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

20

2.4.6 Nearby Restaurants

This app displays a list of nearest restaurants with pictures and detailed

information such as address, opening and closing time of restaurants, ratings etc as

shown in Figure 10.

Figure 10. List of nearby restaurants.

Page 28: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

21

2.4.7 Nearby Hotels

When a user travels to a new place they may require a hotel to stay. When a

user searches for hotels, it provides a list of nearest hotels with prices, pictures, and

some other information as shown in Figure 11.

Figure 11. List of nearby hotels shown.

Page 29: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

22

2.4.8 Related Video

Searching videos relates on the traveling city or any topic, a list of related

videos will display on the search activity screen. The searched video can be played

by using a video player which user selects. Figure 12 shows searches of related video

on search screen.

Figure 12. Related video search shown on video search.

2.4.9 Take Picture

This app provides a camera function to capture a moment. Figure 13 shows

camera option from the menu item to take a picture.

Page 30: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

23

Figure 13. Camera on the menu item to take a picture.

2.4.10 Log Out

When the user wants to logout of the application, they can click on the logout

option which will take the user back to the login screen. To utilize the services of

SmartTraGuide app the user needs to be logged in and the mobile’s GPS enabled.

Page 31: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

24

CHAPTER 3

IMPLEMENTATION OF APPLICATION MODULES

3.1 Registration and Login

This part of the application deals with registering a new user or validating an

existing user at login. First a new user is required to register before login to utilize the

services. Using an email account a user can register and login to SmartTraGuide ap-

plication. To login to the system READ CONTACTS permission request is required

in the AndroidManifest.xml file. A dummy authentication store contains known user

names and passwords. When a permission request has been completed a callback is

received. Attempts to sign in or register the account are specified by the login form.

Figure 14. Login Module.

Page 32: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

25

This method represents an asynchronous login/registration task which is used

to authenticate the user. Login method as shown in Figure 14 is invoked with user

provided username and password to login and to handle the response from the server.

3.2 Android Permissions in AndroidManifest.xml File

In every android application, an AndroidManifest.xml file is a must and all

the permissions are mentioned in this file. All the essential information about the

application is contained in the AndroidManifest.xml file. Internet permission is re-

quired to make a request to Google Maps API, OpenWeatherMap API, and Youtube

Data API. Access Fine Location permission allows the application to get information

about latitude, longitude values. Figure 15 displays the permissions in AndroidMan-

ifest.xml file for of “SmartTraGuide” application.

Figure 15. Permissions in AndroidManifest.xml file.

3.3 Creating the Current Location Finder

This module deals with creating the current location finder. To create a

location finder, it is required to enable the Google Maps Android API [3] in the

Google Cloud platform and also is required to add com.google.android.gms:play-

services and com.google.android.gms:play-services-maps in the build.gradle file as

shown in Figure 16. Using reverse geocoding the values will be converted into human

readable text format and displayed in text view. To find a user’s current location

Page 33: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

26

there GPS need be enabled in the mobile device and Figure 17 shows how a GPS

provider works.

Figure 16. Adding libraries to build.gradle file to find current location.

Figure 17. Codes to how GPS provider works to find a user’s current location.

Page 34: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

27

3.4 City Weather Forecast

To view the current city or any other cities weather forecast a weather module

is needed. The “SmartTraGuide” app gets the weather forecast data from Open

Weather Maps. To communicate with SmartTraGuide app it is required to create

an API key in OpenWeatherMaps.org [6]. The code to display the weather forecast

module with city name, temperature, humidity, and pressure using JSON Object is

shown in Figure 18.

Figure 18. Codes to display city weather forecasts.

Page 35: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

28

3.5 Searching Videos during Travel

To find related videos during travel one needs to create a search activity and

the search function is responsible to provide a list of related videos. To create a

search activity requires enabling Youtube data API [8] in the Google Cloud platform

and also requires adding google-api-services-youtube-v3-rev137-1.20.0.jar file in libs

folder of android studio. API key is the medium for searching videos which will

communicate between SmartTraGuide and Google Cloud. Figure 19 shows the java

code for search activity function.

Figure 19. Java codes to search related videos for travel.

Page 36: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

29

3.6 Video Player

In this module, the video player is responsible to play the selected video. This

module has the option for adding captions to the videos and change video qualities

as show in Figure 20.

Figure 20. Code for video player activity.

3.7 Web Browser

During travel if the user needs to browse any website they can use the web

browser in the app. For this users no longer need to exit from SmartTraGuide app

and open default browser on the device. During travel this will save user time. This

web browser will redirect to the mobile device browser from the menu item.

Page 37: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

30

3.8 Camera Functionality for taking pictures

In the menu item the camera function is included. By using this function the

user can take pictures whenever they want. These pictures are stores in the mobile

device. Figure 21 shows the camera function to take a picture.

Figure 21. Camera function to take pictures.

Page 38: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

31

CHAPTER 4

TESTING AND EVALUATION

This application is tested using Samsung Galaxy S5 mobile phone with an-

droid version 6.1.1. This application is compatible with android version 4.0 and

latest. Each module of SmartTraGuide application is tested with all the possible

test cases.

4.1 Launching the application

A user downloads the application on his android smartphone/tablet device.

After installation when the user launches the application for the first time they will

see the login screen. A new user should register with the application. Figure 22

shows the login screen of SmartTraGuide app.

Figure 22. Launching the SmartTraGuide application.

Page 39: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

32

4.2 Indicating Current Location on Maps

When the user launches a map, it creates a location finder and identifies

the current position of the users. If the user wants to know a particular place or

restaurant or hotel, this application is responsible to find out that location. On

maps the user’s current position is shown as in Figure 23.

Figure 23. Indicating current location of the user (Corpus Christi) on maps.

Page 40: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

33

4.3 Measuring Distance and Duration on Maps

On maps this module allows the user to measure distance and duration be-

tween two places by clicking on two points. To get driving mode distance and

duration result a user needs to click on DRIVING MODE button and to get walk-

ing mode result needs to click on WALKING MODE button. On top of the map

is displayed the distance in kilometers and duration in minutes. Figure 24 shows

measured distance and duration between two points.

Figure 24. Measured distance and duration between two points on maps.

Page 41: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

34

4.4 Display the Weather Forecasts

This module is responsible for displaying any cities weather forecast. This

screen provides the city name, temperature, humidity and pressure of the selected

city. To gets another cities forecast the user should change city name, after which it

will display the new cities forecast. Figure 25 shows the current city (Corpus Christi)

weather forecast in weather activity screen.

Figure 25. Current city weather forecast.

Page 42: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

35

4.5 Video Search

In this module the user can search any kind of video. When the user types the

topic in the search space, it will display a list of related video on that topic. Figure

26 shows a search for tamucc video on the search activity screen.

Figure 26. TAMUCC videos searched on search screen.

Page 43: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

36

4.6 Play the searched Video

After searching for related videos, the video player is responsible to play the

video selected by the user. The video player displays captions in English as shown

in Figure 27.

Figure 27. TAMUCC video is playing.

4.7 Camera to take pictures

The menu item has a camera option to take a picture if the user needs to

capture images on the move. During travel this module allows the user to take

pictures and save time. Figure 28 shows the camera screen to take pictures.

Page 44: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

37

Figure 28. Camera screen for taking pictures.

4.8 Logout

Clicking on logout from the menu will take the user to the login screen. The

user should not be able to use any functionality of the application (except login)

until they log in again.

Page 45: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

38

4.9 Evaluation

In order to evaluate SmartTraGuide application feedback is collected from

seven users who used the application from 10 to 15 days. The feedback consists

of eight questions; the users have the option to rate each question between [0, 10],

where 0 indicates disagree and 10 indicates strongly agree. Table 1 shows the list of

questions and the average rating for each question.

Table 1. List of Questions in Feedback and their Average Rating.

No. Question Avg. Rating

1 On the maps it indicates the current location accurately. 9.43

2 Calculating the distance between two points is perfect. 9.29

3 When searching a place it provides detailed information on

maps.

9.57

4 To change the city name it displays the new city weather

forecast properly.

9.71

5 To search video it displays a list of related videos on the

topic.

8.57

6 Camera function is helpful to take any picture during

travel.

8.86

7 SmartTraGuide application is satisfying. 9.43

8 I would recommend SmartTraGuide app to other people. 9.57

Page 46: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

39

CHAPTER 5

CONCLUSION AND FUTURE WORK

5.1 CONCLUSION

SmartTraGuide is a new application for smart phones and tablets with android

operating system based on mashup technology, which aims to provide tour guidance

information to the users during travel. This application allows the user to login the

system using an email account. By Smart Travel Guide app, users can obtain attrac-

tion’s detailed information, including text, pictures and videos. In precise, Smart

Travel Guide app can provide users with location based information, which can be

browsed or queried through a map. When a user configures the distance between the

current location and the view spots, they can search the nearby attractions. When

the user migrates to the new location, the mobile phone will automatically send its

new position to the server side, and the corresponding attraction list will be received

by the user. Thus, this application overcomes the problems of existing applications

as mentioned in section 1.6.1, by providing light-weight mashup technology that can

combine more than one data source to create value-added services. Although it has

limitation such as it does not provide seven days of city weather information. It only

provides current weather information of the traveling city.

5.2 FUTURE WORK

This application can be improved by adding the following functionalities.

• Adding the option to sort the list of places of interest (Museums, Restaurants,

Hotels, etc.) based on features such as rating, price level in maps.

• Geo tag the pictures taken from camera and display on Google maps.

Page 47: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

40

• Display seven days of city weather forecast to make early travel plans.

Page 48: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

41

REFERENCES

[1] Global Market Share held by Smartphone Operating Systems (visited on Jan. 20,

2018), https://www.statista.com/statistics/263453/global-market-share-held-by-

smartphone-operating-systems/.

[2] Google Permissions for Android Application Development, (visited on Jan. 25,

2018) https://console.cloud.google.com/apis/library?project=smarttraguide

[3] Google Maps APIs Current Location Tutorials, (visited on Jan. 30,

2018) https://developers.google.com/maps/documentation/android-api/current-

place-tutorial

[4] K. Trijani, “A Customizable Travel Application- Travel-It” TAMUCC, Graduate

project, spring 2017

[5] M. R. Shahade and P. D. Watkar, “SMART TRAVEL GUIDE: APPLICATION

FOR MOBILE PHONE” International Journal of Research In Science and Engi-

neering (IJRISE), Volume 1, Special Issue 1, 2015

[6] OpenWeatherMap.org Access to API for Current Weather Data (visited on

March. 01, 2018), https://openweathermap.org/current

[7] S. Pamulapati, “iDoRemind: Location Based Reminder Application for Android”

TAMUCC, Graduate project, fall 2016

[8] YouTube Data API Overview, https://developers.google.com/youtube/v3/getting-

started (Visited on March 10, 2018)

[9] Wikipedia.org the system (visited on Jan. 10, 2018), Information about Android

(operating system) are Retrieved from: https://en.wikipedia.org/wiki/Android

Page 49: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

42

APPENDIX A

CODE FOR THE PROJECT

This section consists of few code snippets which perform the main tasks of

the project.

LoginActivity.java

Figure 29. Part of LoginActivity code.

Page 50: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

43

MainActivity.java

Figure 30. Part of MainActivity code.

Page 51: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

44

MapsActivity.java

Figure 31. Part of MapsActivity code.

Page 52: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

45

WeatherActivity.java

Figure 32. Part of WeatherActivity code.

Page 53: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

46

SearchActivity.java

Figure 33. Part of SearchActivity code.

Page 54: SmartTraGuide: An Integrated Travel Application for …sci.tamucc.edu/~cams/projects/529.pdfSmartTraGuide: An Integrated Travel Application for Android When User on Move GRADUATE PROJECT

47

CameraActivity.java

Figure 34. Part of CameraActivity code.