Upload
independent
View
2
Download
0
Embed Size (px)
Citation preview
CHAPTER 1
INTRODUCTION
1.0 PROJECT OVERVIEW
The concept of mobile tourism is a recent technology that is developed to provide a tourist with
information and navigation services [4]. Due to the increase in tourism related industries, a large
number of people who travel and visit other places of interest (POI) emerge from different
nationalities around the world every year.
Mobile application is an efficient way of informing and guiding these visitors through their
places of interest for better tour experience.
In general Mobile devices e.g. smart phones, PDA’s present many unique characteristics that
make them ubiquitous and convenient. This includes the easy access to information,
personalization through wireless web portals, and, most of all global positioning system (GPS)
advantages [1].
The aim of this project is to provide a tourist with a better experience of tourism using mobile
technology. It presents the user with customized experiences that matches personal preferences
better than a standard guide book.
Since the application is for tourist who possesses little or no knowledge of their choice of tour
location, the application provides brief information of such location.
The application would not require the user to input personal information, but in the event of an
emergency, the application provides a support functionality containing emergency contact
numbers.
1
1.1 AIM
The aim of this project is to assist and guide a tourist through mobile technology.
With the recent advances in internet and mobile technologies, there are increasing demands for
electronic access to tourist information systems for service coordination and process integration.
Mobile computing and mobile devices are used to implement various tourist services (e.g. digital
interactive maps, and tourist e-commerce transactions), however, due to disparate tourist
information and services, resources such as airlines, hotels and tour operators, it is still difficult
for tourists to use them effectively during their trips or even in the planning stage.
To overcome this problem, we propose the analysis, design and implementation of the “Android
Tourist guide Application” that can be accessedthrough a wireless smart device.
OBJECTIVES
The objectives of this project include:
To provide information services to tourists.
To provide geographic and Navigation services of Major Places of Interests (POIs).
To provide support for tourists in terms of Emergency services.
(A) PROVIDINGINFORMATION SERVICES TO TOURISTS
A mobile application (or mobile app) is a software application designed to run on smart phones,
tablet computers and mobile devices. [8]. since these devices can be carried about, applications
installed in them can be accessed at the convenience of the user. Tourists require adequate
information about the location the wish to carry out their tour, this would enable them have a
better tour experience with satisfaction. This information would be provided in our application,
stored in a server and accessed through hyperlink.
2
(ii) TO PROVIDE GEOGRAPHIC AND NAVIGATION SERVICES
To be able to locate places, we need geographic service (e.g. Map). The map provides us an
efficient way to navigate through places without much Difficulty.
The Application would provide map services to tourists to enable them locate their places of
Interest as they Navigate through them.
(iii) TO PROVIDE SUPPORT TO TOURISTS (In terms of emergency)
There is always a probability that a tourist might face an emergency or more during the course of
tour. The application will provide tourists with Emergency contacts including the police, fire
service etc., to enable them minimize and handle incidents that might occur during tours.
1.2PROBLEM STATEMENT
Rigidity in accessing information of places of interests (POIs).
Poor tour experiences due to little or no geographic &Navigation services.
(A)RIGIDITY IN INFORMATION AND NAVIGATION ACCESSING
The rigorous process undertaken to acquire these tour services sometimes eliminates the beauty
of tourism. There is no flexibility in travelling, because the degree of satisfaction is tantamount
on the amount of fee/value of fee for such services. Also, some of these tourism companies have
not adapted to the recent technological changes of tourism and still provide outdated forms of
information services to tourists.
(B)POOR TOUR EXPERIENCES DUE TO GEOGRAPHIC& NAVIGATION ISSUES
In the traditional method of tour guides, a tour can be delayed or cancelled due to lack of enough
geographic &navigation information. This leads to poor tour experiences at the end of the tour in
general.
3
CHAPTER 2
BACKGROUND
2.0 LITERATURE REVIEW
Our recent research was on the mobile application “Trip Journal” a similar mobile application
which is more sophisticated as it provides services like trip tracking, recording, documentation
and sharing features. It is currently available for the Apple Iphone and Android smart phones.
Let’s see the trip journal in Detail;
(A)TRIP JOURNAL
Trip journal is the #1 Google awarded travel Application with the best trip tracking, recording,
documenting and sharing features currently available for iphone, Android, symbian and
Facebook.
Trip journal allows you to document vacation experiences and share them with your friends and
family. Impress everybody with real time updates from the visited destinations and let people see
proof of your latest adventures, as you journey unfolds.
Trip journal is also integrated with favoritesocial networks and content sharing portals, including
facebook, flickr, Picasa, YouTube and twitter to bring about more interactivity.
However, Trip journal does not plan trips, and this is where our Application comes in. [16]
Other Tourist Guiding Applications includes;
(B)MOBILE TOURIST SYSTEM BASED ON MASHUP
This application makes use of mashupsbased on open web APIs which have the power of
integrating applications and data sources to create novel and situational web services to serve
needs of users. A mashup can combine two or more data sources (content or service) to provide
several new services or contents to the users. More importantly, it is a lightweight web
application program. The data or contents are mashed up in the MAHUP server side.
4
- System Architecture of the Mash up service
The architecture of the system contains three layers: presentation layer, logical layer and
Data source layer.
Presentation Layer provides the interaction between the end-users and the system. The
mobile end-users usually interact with the mashup server through the mobile web
browser.
FIG 2.0: ARCHITECTURE OF A MASH UP SERVICE
- Limitation of the mash up system
The smart travel guide does not plan trip for tourist just as the trip journal, but it enables
tourist share favorite’s attractions on social media [14].
(C)CRUMPET
The EU funded research project CRUMPET addresses factors that affect tourist who travel light
and love to mix business with pleasure. It tends to build a new information delivery and service
integration systems for a far more heterogeneous tourist population than any system in the past.
The services proposed by CRUMPET takes advantage of integrating four key emerging
technology domains and applying to the tourism domain: personalized services, smart
component- based middleware or “Smart- ware” that uses multi- agent technology, location-
aware services and transparent mobile data communication.
5
The CRUMPET makes use of location –based services (LBS) consisting of web mapping
interface ,the geographic mark-up Language (GML) which uses direct rendering in order to
transform GML into graphic format. [17].
(D)TRIPIT TRAVEL PLANNING GUIDE
Trip it is a travel guide that enables you combine all of your travel plans into a single Itinerary
that is easy to access wherever you are in the world.
It forwards your entire planned trip to [email protected].
It organizes destination guides into regions.
One can have Europe itinerary, California road rip itinerary, Costa Rica itinerary etc all in one
planned trip [6].
(E)GO TOUR – A MOBILE TOUR GUIDE FOR TRIP PLANNING (ISTANBUL)
This is a novel tourist guide project that works on the Smartphone with Android OS. This project
is designed for Istanbul city which is one of the most popular touristic cities. In order to find
tourist location and to show tourist on the map GoTour works with both GPS and Google Map.
By using GoTour, tourists are able to view all the spots based on the categories (Shopping,
restaurant, parks, Museums, antiques, and consulate), make his/her favorite spots list, view
weather condition and current time. In addition tourists can see all the nearest spots on the map
including museums, restaurants and other points of interest according to their current location.
The most significant feature that distinguishes GoTour from similar applications that are
presented in the previous section is the ability to suggest a trip plan in a smart way.
6
(F)CROTUNE
CROTUNE application is another tourist navigator that helps tourist when he/she travels to
Croatia country. It works on Windows mobile operating system. This application contains all
needed information for the tourist during his/her trip to Croatia.
The CROTUNE database is extremely large. The number of spots that are stored in the database
is 2000. There are five tabs in CROTUNE application namely: categories tab, places tab, service
info tab, search tab, and favorites tab. When the user selects any spots then the user can find
short description, contact telephone number, mail, addresses, website address, geo- location and
price list. Geo location uses Google maps and GPS system and enables user to view nearby
spots, the distance to the desired spot and the preferred route.
Although CROTUNE has more features than trip journal, it does not suggest any trip plan to the
tourist as the previous application [3].
(G)DUBAI GUIDEPAL
This mobile application supports both iphone and Android platforms.
The application lets tourists to see all attractive places which are organized by categories. The
application provides offline map of Dubai with its all attractive places. Tourist can follow him
/her on the map via GPS signals [7].
SUMMARY
All of the above systems are mobile based tourist guide applications uniquely with their mode of
performance.
Trip journal allows you to document vacation experiences and share them with your
friends and family. Impress everybody with real time updates from the visited
destinations and let people see proof of your latest adventures, as your journey unfolds. It
is also integrated with multimedia and social networks.
7
The mobile based tourist system based on mashup integrates with open web services to
integrate to provide tour services to tourists. The services proposed by CRUMPET takes
advantage of integrating four key emerging technology domains and applying to the
tourism domain: personalized services, smart component- based middleware or “Smart-
ware” that uses multi- agent technology, location-aware services and transparent mobile
data communication.
The crotune is similar to the crumpet, only that it has a higher Database but does not
suggest trip plan for tourist.
The Dubai Guidepal is also another mobile based tourist application available for iphone
and android smart phones. It allows for sharing of pictures but does not suggest trip
planning for tourist
2.1EXISTING SYSTEMS
The use of travel guides dates back to the 50’s [12]. Also in [12], it is stated that the first travel
guide was a standard book guide, which originated from the United States of America (USA) and
was developed by Mobil in 1958.
The first version covered only five (5) states in the southwest of the country. However, in 1960,
the guide was revised and volumes covering the north eastern states were added e.g. California
State. [9]. Then, In October 2009, Exxon Mobil licensed its brand to a five (2) star ratings
corporation and entered into licensing agreement with Forbes media.
Also in 2011, it is stated in [9] that a web based travel guide developed by Forbes named
“Forbestravelguide.com” was launched and that marked the last year of publication of the
traditional printed guide book series.
Then came the revolution of Mobile Applications and the first of its kind was a tourist guide
developed for BiH called “BiH guide” developed in 2011. It was made available on the Android
play store and Apple store. It was created with support of Oxfam cooperation in order to promote
eco-tourism in BiH.BiH (Bosnia and Herzegovina) with capital as Sarajevo in Eastern Europe.
8
However, the application however did not use global positioning system to locate places; rather
places are saved as favorite websites and are more easily available. [10]
CYBERGUIDE and GUIDE mobile tourist guides during this period were also developed
basically for indoor usage which used short infrared localization system and needed renting at
registration desk [2]. It also makes use of Active badge system
In October, 2011, Toozla (A Russian IT Company) created the first mobile GPS guide for
Tverskaya Street in Moscow, Russia. [11]. the application was developed in java and uses GPS
to integrate map services whilst providing users directions around the street and outdoor
purposes. It was mainly available on PDAs.
2.2LIMITATIONS OF EXISTING SYSTEM
Some of the weaknesses of the existing system include:
Does not provide offline availability of information to user.
For areas that are not well mapped, it doesn’t give accurate Navigation Information
2.3STRENGTHS OF EXISTING SYSTEM
It allows friends and family to easily see your travelling routes, visited locations, full
screen photos, comments and blog entries by using Google earth integration.
Provides basic information ,description and navigation to places of interests(POIs)
2.4BRIDGING THE GAP
Our Application will improve on some weaknesses of the Existing system by;
Providing offline Availability of information. This will be achieved by combining the
Android Java files on the front –End and the HTML 5 which allows caching of stored
information on the server.
9
Providing the tourist with a Dynamic, general and broad and Interactive Map to enhance
a better geographical and Navigation Service.
2.5 STATISTICAL DATA ON APPLICATION VALUE
We used the Questionnaire technique to determining how a few Android Smartphone users
would value the application. The statistics helped us to build the Application. Below is the
Statistics Table;
Fig 2.5: BAR CHART SHOWING STATISTICAL DATA
In the bar chart above, the Portability (easy use) feature of the application gained the highest
percentage above other Features. This shows that users of the Android smart Devices enjoyed
ease of usage of Applications the Android Smartphone offers.
10
CHAPTER 3
PROPOSED WORK (MAIN PROJECT)
3.0 DESIGN
The user interface (UI) of the Application will consist of seven (7) modules. Each module will
have a sub module or information to display when a user clicks on them.
In Fig 3.0, a proposed design of the User interface is depicted.
FIG 3.0: A PROPOSED DESIGN OF THE USER INTERFACE
11
3.1 MODULE DESCRIPTION
(A) GUIDE
In the “GUIDE” module, we are providing the tourist with a list of pre-defined tour places, these
places are the most likely places Tourists go to or need during their tour, and they include:
Hotels
Restaurants
Shopping mall
Airports
Bus stations
Miscellaneous( Beaches, Resorts, etc)
Markets
In Fig 3.1, On choosing a Category of choice of place, the tourist is giving suggestion of a list of
POI’s in ALL or in REGIONS.
FIG 3.1: THE UI ABOVE SHOWS HOW A USER CLICKS ON THE ‘GUIDE’ MODULE AND
GETS LIST OF CATEGORY OF POIs.
12
A tourist wishing to know about the Airports in Ghana selects the Airport category as shown in
Fig 3.1.0 below and is shown the ‘ALL’ and “REGIONS category.
On selecting the ‘ALL’ category, the tourist is giving the list of all the Airports in Ghana with
their descriptions
On selecting the ‘REGIONS’ category, the tourist is given the list of the ten (10) regions in
Ghana to select, and therefore, given the Airport in that region.
However, only four (4) regions in Ghana have Airports, with one as the only International
Airport, and two (2) with Air strips.
FIG 3.1.0: A UI SHOWING THE SUB CATEGORY DISPLAYED WHEN THE USER CLICKS
ON THE ‘AIRPORT’ SUB MODULE.
13
(B)MAP
At the initialization of the map module, a general Map is displayed.
Map will not be dynamic in this version.
TOUR MAP
Tour Map will contain a Dynamic Map with a World Map, which is not only restricted to Ghana,
but can be used by the World.
It would be Able to Show Current Location using Google Places API functionalities and also
display distance between Current Location and Destination based on user preference.
3.2CHALLENGES FACED
Creating Dynamic Map in each module for the Application
Shrinking the application’s size to optimize its performance
(A) CREATING DYNAMIC MAP AT EACH POINT
This has proven difficult due to the number of modules proposed in the application. The map can
be developed in a separate execution if we have to achieve the interactive dynamic map we
proposed.
(B) SHRINKING THE APPLICATION’S SIZE FOR OPTIMIZED PERFORMANCE
Due to the large size of the application, it tends to run slower on lesser versions of the Android
operating system class. Therefore, it needs shrinking to remove redundant codes that make the
application run slower.
14
3.3FLOW CHART
The Flow chart below in Fig 3.3 depicts the movement of data in the application.From the
initialization of the Application to the exit.
yes
no
FIG 3.3: A FLOW DIAGRAM OF HOW THE APPLICATIONS FUNCTIONS
15
guide aboutabtF
All airpt
airport
StartStart
abtgh map attractnn
supprt
If all
regns Sel Airport
View location
Shwmap
exit
Emergencyno
Dispattrtn
CHAPTER FOUR
TESTING AND EXPERIMENTAL RESULTS
(A) TOUR APP
Software Testing Documents always play an important role in Project development/testing
phase. Keeping things documented whenever possible without relying on verbal communication.
Documentation is very important because in long run saving a lot of money on training and more
importantly on fixing issues caused due to lack of development and testing documents.
Documentation certainly brings a systematic approach in testing process, leaving the ad hoc
testing behind.
4.0 Test Method
A test case or method has components that describe an input, action or event and an expected
response, to determine if a feature of an application is working correctly.
Black box testing – Internal system design is not considered in this type of testing. Tests are
based on requirements and functionality.
White box testing – This testing is based on knowledge of the internal logic of an application’s
code. Also known as Glass box Testing. Internal software and code working should be known
for this type of testing. Tests are based on coverage of code statements, branches, paths,
conditions.
Unit testing – Testing of individual software components or modules.This is typically done by
the programmer and not by testers, as it requires detailed knowledge of the internal program
design and code.
4.1 Test Scenarios for Functionality:
(1) Test with different screen resolutions like 1024 x 768, 1280 x 1024, etc.
(2) Application should be tested on variety of displays like LCD, CRT, Notebooks, Tablets, and Mobile phones.
16
Compatibility testing:Testing how well software performs in a particular hardware/software/operating system/network environment and different combinations of above.
This testing was performed by us on a few tablets and versions of Android O.S. We noticed that the application ran faster on the higher versions i.e. (4.0 and higher).
Alpha testing: In house virtual user environment can be created for this type of testing. Testing
is done at the end of development. Still minor design changes may be made as a result of such
testing.
Beta testing: This was done by us, and a few students we installed the application on their smart
phones.
4.2 Sample Data and Result
(1) Application was tested on Android 4.2(jellybean) emulator which was the target environment
Splash screen loading time: - 40 seconds
Modules response time: - 20 seconds depending on user thumbprint accuracy.
Map loading time from server: - 5 seconds on an average Edge network connection.
Image loading time: - 2seconds
(2) Application was tested on Android 4.3.2(jellybean) tablet
Splash screen loading time: - 20 seconds
Modules response load time: - 60seconds
Map loading time from Google server: - 10seconds on average EDGE network connection
17
A .Unit and integration testing
Unit testing is the process of testing individual units in the system in order to check that it is working as required without any debugging errors [29]. We test the 5 components and that are all workiNg.
Then we added each component to another to ensure they work together. Results of this test show that TourApp passed integration and unit testing.
B.Performance and stress testing
For measure of performance, we used the application manager on android mobile phone, and then we measured the performance of our application. It measured performance based on memory and allocated sdcard.
Performance testing shows that application is slower on a non target environment
Application takes more time to load, initialize map and use web connectivity.
C.User Acceptance Testing
In this test, we asked the users to test our application and share their feedback with us to improve our application before deployment. The numbers of user are 3 and they are all older than 18 years old. All of them have a technical background, and have the ability to deal with mobile application.
The Table below in shows the task and task description.
18
task Task description
T1 Use the guide module
T2 View places of interest(POIs) and respective maps
T3 get directions to places of interest(POIs)
In this test, our application is measured by Satisfaction, effectiveness and efficiency.
4.3 SCREENSHOT OF WORKING APPLICATION
In this module, the user is able to view the POIs based on the region selected. There is also a brief description of such place on interest. An Example is depicted in the screenshot below.
19
FIG 4.3: THE SCREENSHOT OF THE UI ABOVE SHOWS THE INFORMATION PROVIDED TO THE
USER WHEN USING THE “BUS STATION” MODULE.
In the Screenshot below in Fig 4.3.0, an interface shows when a user returns to the Menu option
where all the Modules are displayed
20
FIG 4.3.0: THE SCREENSHOT OF THE UI ABOVE SHOWS WHEN A USER CLICKS ON THE ‘GUIDE’
MODULE
The screenshot below in Fig 4.3.1 shows the “About Ghana” Module, where a user views the
entire Region in the Country and also a Static Map displaying positions of the Regions.
21
FIG 4.3.1: THE SCREENSHOT OF THE UI SHOWS WHEN THE USER CLICKS ON THE
“ABOUTGHANA” MODULE.
The Screenshot below depicts the Map Module, which contains a Dynamic but not interactive
Map for user to view the Entire Ghana.
The Map module has an Auxiliary application named “TourMap” which any user using the
“TourApp” would need for GPS and Navigation services.
22
FIG 4.3.2: THE SCREENSHOT OF THE UI ABOVE SHOWS WHEN A USER CLICKS ON THE ‘MAP’
MODULE.
The Screenshot Below shows the Support Module, where a user is able to access emergency and
security agent contacts in an event of an unwanted situation.
23
FIG 4.3.3: THE SCREENSHOT OF THE UI ABOVE SHOWS WHEN A USER CLICKS ON THE
‘SUPPORT’ MODULE.
The screenshot below in Fig 4.3.4 shows when a user makes use of the “Attraction” module and
based on the region selected is presented with attractions in that region
24
FIG 4.3.4: THE SCREENSHOT OF THE UI ABOVE SHOWS WHEN A USER CLICKS ON THE
‘ATTRACTION’ MODULE.
The screenshot below depicts the “about App” module of the Application, with brief description
of the functionality.
25
FIG 4.3.5: THE SCREENSHOT OF THE UI ABOVE SHOWS WHEN A USER CLICKS ON THE ‘ABOUT’
MODULE.
CHAPTER FIVE
SUMMARY
5.0APPLICATION SUMMARY
26
TOUR APP
Tour App is a mobile based tourist application that enables portability in tourism. It
allows tourist to view places of interest of the specified location (Ghana).
It was designed for Android jelly bean environment, integrated with Google map API.
Tour App is specifically built for Android Operating system and cannot be used by other
platform.
The Application offers information and navigation services for Tourist visiting Ghana.
It supports single user functionality rather than group.
TOUR MAP
Tour Map is a complimentary application of Tour App.
It displays a Dynamic map that shows Users current Location and a distance between
Users current Location and destination in (km).
5.1MAJOR STRENGTHS OF THE WORK
Tour App works both offline and online.
Tour Map mainly works online because it needs to synchronizewith Google Map server.
Provides information and Navigation services.
5.2 LIMITATION OF OUR WORK
Tour App is only designed to show Major Places of interest (POIs) in Ghana.
27
Map Availability is still an issue due to considerations of Size of Application.
Application is not very fast due to memory allocation.
5.3 FUTURE ENHANCEMENT
Application expansion could be achieved by adding more modules to Application and
adding more places of interest (POIs) to Web server.
Integration of more maps to application
Optimization of application can be achieved by allocating more memory.
CHAPTERSIX
GLOSSARY
6.0 SAMPLE CODE
28
Android Xml code
<?xmlversion="1.0"encoding="utf-8"?><manifestxmlns:android="http://schemas.android.com/apk/res/android"package="com.tourapp.tourapp"android:versionCode="1"android:versionName="1.0"><meta-dataandroid:name="com.google.android.maps.v2.API_KEY"android:value="AIzaSyCMeVrXdYTD-FCdGF6VoFN2oVl1qZg4J8U"/>
<uses-permissionandroid:name="android.permission.INTERNET"/><uses-permissionandroid:name="android.permission.ACCESS_FINE_LOCATION"/><uses-sdkandroid:minSdkVersion="8"android:targetSdkVersion="18"/>
<applicationandroid:allowBackup="true"android:icon="@drawable/ic_launcher"android:label="@string/app_name"android:theme="@style/AppTheme"><activityandroid:name="com.tourapp.tourapp.MainActivity"android:label="@string/app_name"><intent-filter><actionandroid:name="android.intent.action.MAIN"/>
<categoryandroid:name="android.intent.category.LAUNCHER"/></intent-filter></activity></application>
</manifest>
Main Java package com.tourapp.tourapp;
importandroid.annotation.SuppressLint;
importandroid.app.Activity;
importandroid.os.Bundle;
importandroid.webkit.WebView;
public class MainActivity extends Activity {
@SuppressLint("SetJavaScriptEnabled")
@Override
29
protected void onCreate(Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView(R.layout.activity_main);
WebViewwebView = (WebView)findViewById(R.id.webView1);
webView.setInitialScale(1);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setLoadWithOverviewMode(true);
webView.getSettings().setUseWideViewPort(true);
webView.setScrollBarStyle(WebView.SCROLLBARS_INSIDE_OVERLAY);
webView.setScrollbarFadingEnabled(true);
webView.loadUrl("file:///android_asset/www.onehousenet.com/index.html");
//webView.loadData(data.toString(), "text/html", "UTF-8"); }
6.1 MAP ACTIVITY CODE:
packagecom.anuc.geometer.app;
importjava.io.IOException;
30
importjava.util.List;
importcom.google.android.gms.maps.CameraUpdateFactory;importcom.google.android.gms.maps.GoogleMap;importcom.google.android.gms.maps.MapFragment;importcom.google.android.gms.maps.UiSettings;importcom.google.android.gms.maps.GoogleMap.OnMapClickListener;importcom.google.android.gms.maps.model.LatLng;
importandroid.app.Activity;importandroid.app.AlertDialog;importandroid.content.Context;importandroid.content.DialogInterface;importandroid.location.Address;importandroid.location.Geocoder;importandroid.location.Location;importandroid.location.LocationListener;importandroid.location.LocationManager;importandroid.os.Bundle;importandroid.view.Menu;importandroid.view.MenuItem;importandroid.widget.Toast;//we are catching an exception in the program where when google'sgeocoder cannot resolve your location//
public class UIMainScreen extends Activity implements OnMapClickListener,LocationListener{ privateGoogleMapgoogleMap;private Location currentLocation;private Location destinationLocation;
//we are subclassingUIMainscreen from the parent class "Activity" and inplementing interfaces OnMapClickListener and LocationListener////the "implements" keyword allows you to have multiple inheritance.//
@Overrideprotected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);this.setContentView(R.layout.ui_main_screen);
//the visibilility is protected and it returns no value////onCreate is a child class to be given public functions
//"super"keyword is used to access methods of the base class"Activity" when the child class is used"//it is a constructor of the base class////"this" is used to access methods of the current class "onCreate"
this.initializeMapView();//constructed to access method of current class,thatMapview should be initialized when "onCreate" child class is toggled//
}
31
private void initializeMapView()// creating another child class to initialize Mapview{
if(this.googleMap == null)//if google map is not initialized, then getfragmentManager().getMap()//
{this.googleMap = ((MapFragment)
getFragmentManager().findFragmentById(R.id.map)).getMap();if(this.googleMap != null)//if googleMap is not equal to null//{
this.googleMap.setMyLocationEnabled(true);//enable locationthis.googleMap.setOnMapClickListener(this);//construct on
current class//
this.googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);//set map type
UiSettingsgoogleMapUiSettings = this.googleMap.getUiSettings();googleMapUiSettings.setZoomControlsEnabled(true);//instances of objects are created//LocationManagerlocationManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
locationManager.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0,this);
//instances of objects are initialized////this gets current location of user//
}}
}
@OverridepublicbooleanonCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.getMenuInflater().inflate(R.menu.main_menu, menu);return true;
}
@OverridepublicbooleanonOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will// automatically handle clicks on the Home/Up button, so long// as you specify a parent activity in AndroidManifest.xml.int id = item.getItemId();switch (id) {caseR.id.action_about:
32
showMessageDialog("About", "Tour Map was built by AnyanwuChimaobim&Meshack Hart Tamunoiduari of Computer Engineering Department of All Nations University College, Ghana");
break;caseR.id.action_help:
showMessageDialog("Help", "Tour Map is complimentary to Tour App.");
break;}
return super.onOptionsItemSelected(item);// we want the item(object) to access the parent class "onCreateOptionsMenu" after the user has viewed the showdialogmessage
}
public void showMessageDialog(String title,String message)//child class to handle exiting of show dialog message{
newAlertDialog.Builder(UIMainScreen.this)//alertdialog.builder is an object explicitly created for the first time and is accessing the subclass activity UIMainscreen
.setTitle(title)
.setMessage(message)
.setNeutralButton("Ok", new DialogInterface.OnClickListener() {
@Overridepublic void onClick(DialogInterface dialog, int which) {
dialog.dismiss();}
}).show();}
@Overridepublic void onMapClick(LatLngclickedPoint) {
this.googleMap.animateCamera(CameraUpdateFactory.newLatLng(clickedPoint));this.currentLocation = this.googleMap.getMyLocation();this.destinationLocation = new
Location(LocationManager.NETWORK_PROVIDER);this.destinationLocation.setLongitude(clickedPoint.longitude);this.destinationLocation.setLatitude(clickedPoint.latitude);//we are constructing these objects on the current classfloat distance = this.currentLocation.distanceTo(destinationLocation);distance = distance/1000f;
33
Geocodergeocoder = new Geocoder(this);// geocoder is explicitly being created thats why we use "new" and "this" is a constructor of the object on the current class "OnMapClick"
if(geocoder.isPresent()){try {
List<Address> addresses = geocoder.getFromLocation(this.destinationLocation.getLatitude(), this.destinationLocation.getLongitude(),10);
Address bestAddress = addresses.get(0);String streetName = bestAddress.getAddressLine(0);streetName = (streetName != null)? streetName : "your
destination";newAlertDialog.Builder(this).setTitle("Estimated Distance").setMessage("The distance between your current location and " +
streetName + " is " + String.valueOf(distance) + " Kilometers.").setNeutralButton("Ok",newDialogInterface.OnClickListener() {
//calculates distance btw current location and destination@Overridepublic void onClick(DialogInterface dialog, int which) {
}}).show();// the geocoder object is created when a ne location is
determined and distance btw current location and destination is to be found"
} catch (IOException e) {showMessageDialog("Error","OOPS!!!Google's geocoder can't
resolve details of your desired destination due to lack of map data");//Exception if lack of map data does not allow for distance to be calculated}
}
}
@Overridepublic void onLocationChanged(Location location) {
this.googleMap.clear();}
@Overridepublic void onStatusChanged(String provider, int status, Bundle extras) {
34
}
@Overridepublic void onProviderEnabled(String provider) {
}
@Overridepublic void onProviderDisabled(String provider) {
}}
6.2 REFERENCES
[1]Andrew Nusca (20 August 2009).”Smartphone Vs. Feature phone arms race heats up;
which did you buy?ZDnet. Retrieved 2011 -12-15
35
[2]Cheverst, k, et al., “Experiences of developing and deploying context –aware Tourist
guide: The GUIDE project”. In proc.6th Annual International conference on Mobile
computing and Networking, P.20-31, ACM, 2000.
[3]Crotune - a mobile tour guide for trip planning, Khawlah A. Al- Rayes,
AiseZulalSevkli, Hebah F. Al-Moaiqel, Haifa M. Al-Ajlan, Khawlah M. Al-Salem, and
Norah I. Al- Fantoukh. December, 2011
[4], “Feature phone” phone scoop, 9.00pm, retrieved 2011-12-16.
[5]“Feature phone” phone scoop, 9.00pm, retrieved 2011-12-16.
[6] Go tour – a mobile tour guide for trip planning (Istanbul) Authors: Khawlah A. Al- Rayes, AiseZulalSevkli, Hebah F. Al-Moaiqel, Haifa M. Al-Ajlan, Khawlah M. Al-Salem, and Norah I. Al- Fantoukh? December, 2011.
[7] GUIDEPAL – www.guidepal.com/dubai
[8]Hosam El-sofany, Samir Abou El-Seoud, Mobile Tourist Guide- An Intelligent
Wireless System to Improve Tourism, Using Semantic web,
http://dx.doi.org/10.3991%2Fijim.v5i4.1695
[9] HTTP://www.startle.com/about/forbes-travel-guide, 10.00pm, 2013- 12-02.
[10]HTTP://www.sarajevotime.com/guide-through-BiH-on-the-phone 10.00pm, 2013 -
12-03.
[11]HTTP://student-travel.livejournal.com/550644.html, 10.58pm, 2013-12-03.
[12] Mobil travel guide to become forbestravelguide.com, associated press 2009-08-04.
[13]Mobile app, en.m.wikipedia.org/wiki/mobile_app.
[14]Smart travel guide application: for Android smart phones. Authors: DadapeJinendra R. JadhavBhagyashri R. GaidhaniPranav Y. VyavahareSeema U. AchaliyaParag.November 7, 2013, 11:00pm.
36
[15] Summerville, "Architectural design, Software testing in Software Engineering”, 8th ed. Harlow, England: Pearson Education Limited, 2007, ch.11, sec 11.2 and sec 11.3, pp.247-255, ch.23,sec 23.1, pp.540-543.
[16]Trip journal for iphone and Android. www.trip-journal.com/
[17]Tripit travel planning guide. www.tripit.com/destinations/ , November 7, 2013. 11:00pm.
37