Android Map

Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/372643496

Enhancing Campus Navigation with Mobile Applications

Thesis · July 2023


DOI: 10.13140/RG.2.2.25803.36649

CITATIONS READS
0 117

1 author:

Bereket Haile
Mekelle University
4 PUBLICATIONS 47 CITATIONS

SEE PROFILE

All content following this page was uploaded by Bereket Haile on 26 July 2023.

The user has requested enhancement of the downloaded file.


EIT-M

MEKELLE

SCHOOL OF ELECTRICAL AND COMPUTR


ENG COMPUTER STRAM

THESIS REPORT

TITLE:- CAMPUS MAP

NAME ID

BEREKET HAILE 0432/04

AMANUAL DESTA 1668/04

FANIEL HEDGU 1903/04


Declaration
This is to declare that this project has been done by students Bereket haile,Faniel Hadgu and
Amanual Desta Our advisor is Mr.Tekelay. The project is done as Thesis in Mekelle University,
Institute of technology, School of Electrical And Computer Engineering and we hereby declare that
this project work has not received any previous academic credit in the department or any other
universities. And the sources used in the project were duly acknowledged.

Name Id

1 Bereket haile 0432/04

2 Faniel Hadgu 1903/04

3 Amaneual Desta 1668/04

I hereby approve that this project should be submitted to examination committee.

Name:

Signature:
ABSTRACT
This project campus map guide students, parents, visitors or generally for those who are not familiar
with campus to find the desired places in campus with more ease. Depending on its current location.
Well it consists of entire details of those locations or how to reach the location as well as other. This
project is mainly beneficial for those who have no idea about the places they want to visit. By
providing geographic based information system In this paper we are proposing a tour guide
application called Mobile Campus on android based mobile platform for Mekelle University main
campus. This tour guide application includes functionality such as locating current location of users,
showing university campus map, route direction of university shuttle and gives small description &
contact information of important places on campus and it have different map view types like normal,
hybrid, satellite and traffic view types .
ACKNOWLEDGMENT
We would like to thank all those people who have helped us in one or another way to finish this
project. We would like to thank Ins. Tekalay, our project advisor, for taking active interest in this
project. His suggestions and guidance has helped as accomplish this project. Lastly, we would like to
thank all the people who directly or indirectly support this project.
ABSTRACT ..................................................................................................................................... 1

ACKNOWLEDGMENT .................................................................................................................. 4

CHAPTER 1 INTRODUCTION ..................................................................................................... 7

1.1 OVERVIEW OF THE STUDY ............................................................................................ 9

1.2 STATEMENT OF THE PROBLEM ........................................................................................ 9

1.3 OBJECTIVE ............................................................................................................................ 9

1.3.1 GENERAL OBJECTIVES ................................................................................................ 9

1.3.2 SPECIFIC OBJECTIVES .................................................................................................. 9

1.4 SCOPE AND LIMITATION .............................................................................................. 10

1.5 FEASIBILITY OF THE STUDY ..............................................Error! Bookmark not defined.

1.6 SIGNIFICANT OF THE STUDY .......................................................................................... 10

CHAPTER 2 LITERATURE REVIEW ....................................................................................... 11

2.1 WHAT IS ANDROID? .......................................................................................................... 11

2.2 WHAT IS GOOGLE MAP? ................................................................................................... 14

2.3 Map types............................................................................................................................... 15

2.4 Android - Application Components ........................................................................................ 16

2.5 Why Android? ........................................................................................................................ 19

2.6 RELATED WORKS .............................................................................................................. 21

CHAPTER 3 METHODOLOGY .................................................................................................. 25


3.1 INFORMATION GATHERING ............................................................................................ 25

3.2 METHODS ............................................................................................................................ 25

3.3 SOFTWARE AND HARDWARE REQUIREMENT ......................................................... 25

3.3.1 SOFTWARE REQUIREMENT ....................................................................................... 25

3.3.2 HARDWARE REQUIREMENT ..................................................................................... 25

3.4 FLOW CHART AND DESIGN ............................................................................................. 26

3.5 IMPLEMENTATION ............................................................................................................ 26

3.6 TESTING............................................................................................................................... 31

CHAPTER 4 RESULT AND DISCUSSION................................................................................. 33

CHAPTER 5. CONCLUSION AND RECOMMENDATION ..................................................... 35

5.1 CONCLUSION ...................................................................................................................... 35

5.2 RECOMMENDATION .......................................................................................................... 35

6. REFERENCES ........................................................................................................................... 36

APPENDIX .................................................................................................................................... 37
Figure 1 about android .................................................................................................................. 19

Figure 2 Architecture of android .................................................................................................. 21

Figure 3 flow chart ......................................................................................................................... 26

Figure 4 installing play service ...................................................................................................... 27

Figure 5 Enabling Google map ...................................................................................................... 27

Figure 6 creating project ............................................................................................................... 28

Figure 7 Enabling the project ........................................................................................................ 28

Figure 8 getting the api key ........................................................................................................... 29

Figure 9 android key ...................................................................................................................... 29

Figure 10 getting the SHA1 inCMD .............................................................................................. 30

Figure 11 getting the SHAI in android studio ............................................................................... 30

Figure 12 inserting in Google console............................................................................................ 30

Figure 13 saving the api key .......................................................................................................... 31

Figure 14 adding the api key to android studio ............................................................................ 31

Figure 15 xml code ......................................................................................................................... 31

Figure 16 output ............................................................................................................................. 32

Figure 17 Map ................................................................................................................................ 33

Figure 18 Map type ........................................................................................................................ 34

Figure 19 searching ........................................................................................................................ 34


Table 1 components of android ..................................................................................................... 16

Table 2 content provider ............................................................................................................... 18

Table 3 features of android ............................................................................................................ 19


CHAPTER 1 INTRODUCTION

1.1 OVERVIEW OF THE STUDY

Campuses can be quite large and confusing. Visitors, new students, and staff can have a difficult time
getting around. Even when they are asking for directions, they often time cannot find the destination
because the directions involve knowing the surrounding buildings and landmarks of the campus. In
addition, the campus is growing fast, with new buildings and facilities being added. This can get quite
stressful, especially considering people are often on a schedule and need to get to a certain location on
time. Eliminating this stress and confusion would improve the overall atmosphere on campus. Since
smartphones are a ubiquitous technology nowadays, it makes sense to use them to facilitate campus
directions.

1.2 STATEMENT OF THE PROBLEM

In Mekelle university every year More than 6000 Freshman Students are joining Mekelle University,
they face different problems to find a specific place .and it have different staff workers who are not
familiar with campus and new visitor every day so they always ask to find specific place on the
campus so this project will solve the basic problems.

1.3 OBJECTIVE
1.3.1 GENERAL OBJECTIVES

The main objective of the project is to help students and anyone unfamiliar with the campus, by
giving the current location using GIS based and find their way around the school campus more easily
and improve their knowledge of where things are located around campus

1.3.2 SPECIFIC OBJECTIVES

 Application knows current location on campus and displays this on a map.


 Searchable campus map
 Find the shortest path
 Zoom locates the building on the map for you as you click the building
1.4 SCOPE AND LIMITATION

The app would include a GUI, a search button to search for specific place on the campus and modules
to implement the various functions of the app.it have different map views like satellite, normal, hybrid
and traffic and a function to determine what the shortest path to the user’s destination is. It would also
have a navigator to show the user their location on campus. And it only has information about the
main campus.

1.5 SIGNIFICANT OF THE STUDY

This application will help the students or to those who are not familiar to the campus to find the
desired location.it consists of entire details of those locations or how to reach the location as well as
other emergency facilities like hospital, bus stop etc. by providing a geographical based information.
CHAPTER 2 LITERATURE REVIEW

2.1 WHAT IS ANDROID?

Android (operating system) is a mobile operating system (OS) currently developed by Google, based
on the Linux kernel and designed primarily for touchscreen mobile devices such as smartphones and
tablets. It has been the best-selling OS on tablets and on smartphones since 2013, and has the largest
installed base.

Android's user interface is mainly based on direct manipulation, using touch gestures that loosely
correspond to real-world actions, such as swiping, tapping and pinching, to manipulate on-screen
objects, along with a virtual keyboard for text input. The operating system's current design language is
Google's Material Design. Android's primary app store is Google Play, with over one million Android
applications published and 50 billion downloads as of July 2013. In addition to touchscreen devices,
Google has further developed Android for television, cars, and wristwatches, each with a specialized
yet similar interface. Variants and forked versions of Android are also used on notebooks, game
consoles, digital cameras, and other electronics.

Android was initially authored by Android, Inc., which Google bought in 2005, and unveiled it in
2007, along with the founding of the Open Handset Alliance – a consortium of hardware, software,
and telecommunication companies devoted to advancing open standards for mobile devices. A 2013
survey of mobile application developers found that 71% of developers create applications for Android
from April to May, and a 2015 survey found that 40% of full-time professional developer’s priority
sees Android as their target platform, compared to Apple's IOS on 37% with both platforms far above
others. In September 2015, Android had 1.4 billion monthly active users.

Android's source code is released by Google under open source licenses, although most Android
devices ultimately ship with both open source and proprietary software, including required proprietary
components for Google's services. It is popular with technology companies that require an optimized,
low-cost and customizable operating system for high-tech devices. Its open nature has encouraged a
large community of developers and enthusiasts to use the open-source code as a foundation for
community-driven projects, which add new features for advanced users or bring Android to devices
originally shipped with other operating systems. However, Android has no central update protocol
and most devices fail to receive security updates: 2015 research concluded that almost 90% of
Android phones in use had known but unpatched security vulnerabilities due to lack of updates and
support. The success of Android has made it a target for patent litigation as part of the so-called
"smartphone wars" between technology companies.

Features

Interface

Android's default user interface is mainly based on direct manipulation, using touch inputs that
loosely correspond to real-world actions, like swiping, tapping, pinching, and reverse pinching to
manipulate on-screen objects, along with a virtual keyboard. Game controllers and full-size physical
keyboards are supported via Bluetooth or USB. The response to user input is designed to be
immediate and provides a fluid touch interface, often using the vibration capabilities of the device to
provide haptic feedback to the user. Internal hardware, such as accelerometers, gyroscopes and
proximity sensors are used by some applications to respond to additional user actions, for example
adjusting the screen from portrait to landscape depending on how the device is oriented, or allowing
the user to steer a vehicle in a racing game by rotating the device, simulating control of a steering
wheel.

Android devices boot to the home screen, the primary navigation and information "hub" on Android
devices that is analogous to the desktop found on personal computers. (Android also runs on regular
personal computers, as described below). Android home screens are typically made up of app icons
and widgets; app icons launch the associated app, whereas widgets display live, auto-updating
content, such as the weather forecast, the user's email inbox, or a news ticker directly on the home
screen. A home screen may be made up of several pages, between which the user can swipe back and
forth, though Android's home screen interface is heavily customisable, allowing users to adjust the
look and feel of the devices to their tastes Third-party apps available on Google Play and other app
stores can extensively re-theme the home screen, and even mimic the look of other operating systems,
such as Windows Phone. Most manufacturers, and some wireless carriers, customise the look and feel
of their Android devices to differentiate themselves from their competitors. Applications that handle
interactions with the home screen are called "launchers" because they, among other purposes, launch
the applications installed on a device.

Along the top of the screen is a status bar, showing information about the device and its connectivity.
This status bar can be "pulled" down to reveal a notification screen where apps display important
information or updates, such as a newly received email or SMS text, in a way that does not
immediately interrupt or inconvenience the user Notifications are persistent until read by tapping it,
which opens the relevant app, or dismissed by sliding it off the screen. Beginning on Android 4.1,
"expanded notifications" can display expanded details or additional functionality; for instance, a
music player can display playback controls, and a "missed call" notification provides buttons for
calling back or sending the caller an SMS message.

Android provides the ability to run applications that change the default launcher, and hence the
appearance and externally visible behaviour of Android. These appearance changes include a multi-
page dock or no dock, and many more changes to fundamental features of the user interface.

Applications

Applications ("apps"), which extend the functionality of devices, are written using the Android
software development kit (SDK) and, often, the Java programming language that has complete access
to the Android APIs. Java may be combined with C/C++, together with a choice of non-default
runtimes that allow better C++ support; the Go programming language is also supported since its
version 1.4, which can also be used exclusively although with a restricted set of Android APIs. The
SDK includes a comprehensive set of development tools, including a debugger, software libraries, a
handset emulator based on QEMU, documentation, sample code, and tutorials. Initially, Google's
supported integrated development environment (IDE) was Eclipse using the Android Development
Tools (ADT) plugin; in December 2014, Google released Android Studio, based on IntelliJ IDEA, as
its primary IDE for Android application development. Other development tools are available,
including a native development kit (NDK) for applications or extensions in C or C++, Google App
Inventor, a visual environment for novice programmers, and various cross platform mobile web
applications frameworks. In January 2014, Google unveiled an framework based on Apache Cordova
for porting Chrome HTML 5 web applications to Android, wrapped in a native application shell.
Android has a growing selection of third-party applications, which can be acquired by users by
downloading and installing the application's APK (Android application package) file, or by
downloading them using an application store program that allows users to install, update, and remove
applications from their devices. Google Play Store is the primary application store installed on
Android devices that comply with Google's compatibility requirements and license the Google Mobile
Services software. Google Play Store allows users to browse, download and update applications
published by Google and third-party developers; as of July 2013, there are more than one million
applications available for Android in Play Store. As of July 2013, 50 billion applications have been
installed. Some carriers offer direct carrier billing for Google Play application purchases, where the
cost of the application is added to the user's monthly bill.

Memory management

Since Android devices are usually battery-powered, Android is designed to manage processes to keep
power consumption at a minimum. When an application is not in use the system suspends its
operation so that, while available for immediate use rather than closed, it does not use battery power
or CPU resources.

Android manages the applications stored in memory automatically: when memory is low, the system
will begin invisibly and automatically closing inactive processes, starting with those that have been
inactive for longest. Life hacker reported in 2011, that third-party task killers were doing more harm
than good.

Virtual Reality

At Google I/O on May 2016, Google announced Daydream, a virtual reality operating system, which
relies on a smartphone and provides VR capabilities with a virtual reality headset and controller
designed by Google itself. The operating system will be built into android starting with N,
differentiating from standalone support for VR capabilities.

The software is already released for developers, and will be released fully on Fall 2016.

Hardware

2.2 WHAT IS GOOGLE MAP?

Google map is a desktop web mapping service developed by Google. It offers satellite imagery, street
maps, 360° panoramic views of streets (Street View), real-time traffic conditions (Google Traffic),
and route planning for traveling by foot, car, bicycle (in beta), or public transportation.

Google Maps began as a C++ desktop program designed by Lars and Jens Eilstrup Rasmussen at
Where 2 Technologies. In October 2004, the company was acquired by Google, which converted it
into a web application. After additional acquisitions of a geospatial data visualization company and a
real time traffic analyser, Google Maps was launched in February 2005. The service's front end
utilizes JavaScript, XML, and Ajax. Google Maps offers an API that allows maps to be embedded on
third-party websites, and offers a locator for urban businesses and other organizations in numerous
countries around the world. Google Map Maker allows users to collaboratively expand and update the
service's mapping worldwide.

Google Maps' satellite view is a "top-down" or "birds eye" view; most of the high-resolution imagery
of cities is aerial photography taken from aircraft flying at 800 to 1,500 feet (240 to 460 m), while
most other imagery is from satellites. Much of the available satellite imagery is no more than three
years old and is updated on a regular basis. Google Maps uses a close variant of the Mercator
projection, and therefore cannot accurately show areas around the poles.

The current redesigned version of the desktop application was made available in 2013, alongside the
"classic" (pre-2013) version. Google Maps for mobile was released in September 2008 and features
GPS turn-by-turn navigation. In August 2013, it was determined to be the world's most popular app
for smartphones, with over 54% of global smartphone owners using it at least once. In 2012, Google
reported having over 7,100 employees and contractors directly working in mapping.

2.3 Map types

There are many types of maps available within the Google Maps Android API. A map's type governs
the overall representation of the map. For example, an atlas usually contains political maps that focus
on showing boundaries, and road maps that show all of the roads for a city or region. The Google
Maps Android API offers four types of maps, as well as an option to have no map at all:

Normal Typical road map. Roads, some man-made features, and important natural features such as
rivers are shown. Road and feature labels are also visible.

Hybrid Satellite photograph data with road maps added. Road and feature labels are also visible.

Satellite Satellite photograph data. Road and feature labels are not visible.

Terrain Topographic data. The map includes colours, contour lines and labels, and perspective
shading. Some roads and labels are also visible.
None No tiles. The map will be rendered as an empty grid with no tiles loaded.

2.4 Android - Application Components

Application components are the essential building blocks of an Android application. These
components are loosely coupled by the application manifest file AndroidManifest.xml that describes
each component of the application and how they interact. There are following four main components
that can be used within an Android application:

Table 1 components of android

Components Description

Activities They dictate the UI and handle the user interaction to the smart phone
screen

Services They handle background processing associated with an application.

Broadcast Receivers They handle communication between Android OS and applications.

Content Providers They handle data and database management issues.

Activities

An activity represents a single screen with a user interface; in-short Activity performs actions on the
screen. For example, an email application might have one activity that shows a list of new emails,
another activity to compose an email, and another activity for reading emails. If an application has
more than one activity, then one of them should be marked as the activity that is presented when the
application is launched. An activity is implemented as a subclass of Activity class as follows −

public class MainActivity extends Activity {}


Services

A service is a component that runs in the background to perform long-running operations. For
example, a service might play music in the background while the user is in a different application, or
it might fetch data over the network without blocking user interaction with an activity.A service is
implemented as a subclass of Service class as follows

public class MyService extends Service {}

Broadcast Receivers

Broadcast Receivers simply respond to broadcast messages from other applications or from the
system. For example, applications can also initiate broadcasts to let other applications know that some
data has been downloaded to the device and is available for them to use, so this is broadcast receiver
who will intercept this communication and will initiate appropriate action.

A broadcast receiver is implemented as a subclass of BroadcastReceiver class and each message is


broadcaster as an Intent object.

public class MyReceiver extends BroadcastReceiver {

public void onReceive(context,intent){}

Content Providers
A content provider component supplies data from one application to others on request. Such requests
are handled by the methods of the ContentResolver class. The data may be stored in the file system,
the database or somewhere else entirely.

A content provider is implemented as a subclass of ContentProvider class and must implement a


standard set of APIs that enable other applications to perform transactions.

public class MyContentProvider extends ContentProvider {

public void onCreate(){}

We will go through these tags in detail while covering application components in individual chapters.
Additional Components There are additional components which will be used in the construction of
above mentioned entities, their logic, and wiring between them. These components are −

Table 2 content provider

Components Description

Fragments Represents a portion of user interface in an Activity.

Views UI elements that are drawn on-screen including buttons, lists forms etc.

Layouts View hierarchies that control screen format and appearance of the views.

Intents Messages wiring components together.

Resources External elements, such as strings, constants and drawable pictures.

Manifest Configuration file for the application.


2.5 Why Android?

Figure 1 about android

Features of Android are a powerful operating system competing with Apple 4GS and supports great
features. Few of them are listed below:

Table 3 features of android

Feature Description

Beautiful UI Android OS basic screen provides a beautiful and intuitive user interface.

Connectivity GSM/EDGE, IDEN, CDMA, EV-DO, UMTS, Bluetooth, Wi-Fi, LTE, NFC and
WiMAX.

Storage SQLite, a lightweight relational database, is used for data storage purposes.

Media support H.263, H.264, MPEG-4 SP, AMR, AMR-WB, AAC, HE-AAC, AAC 5.1, MP3,
MIDI, Ogg Vorbis, WAV, JPEG, PNG, GIF, and BMP

Messaging SMS and MMS

Web browser Based on the open-source WebKit layout engine, coupled with Chrome's V8
JavaScript engine supporting HTML5 and CSS3.

Multi-touch Android has native support for multi-touch which was initially made available in
handsets such as the HTC Hero.

Multi-tasking User can jump from one task to another and same time various application can
run simultaneously.

Resizable Widgets are resizable, so users can expand them to show more content or shrink
widgets them to save space

Multi-Language Supports single direction and bi-directional text.

GCM Google Cloud Messaging (GCM) is a service that lets developers send short
message data to their users on Android devices, without needing a proprietary
sync solution.

Wi-Fi Direct A technology that lets apps discover and pair directly, over a high-bandwidth
peer-to-peer connection.

Android Beam A popular NFC-based technology that lets users instantly share, just by touching
two NFC-enabled phones together.

2.6 Android - Architecture

Android operating system is a stack of software components which is roughly divided into five
sections and four main layers as shown below in the architecture diagram.

Figure 2 Architecture of android

Linux kernel

At the bottom of the layers is Linux - Linux 3.6 with approximately 115 patches. This provides a level
of abstraction between the device hardware and it contains all the essential hardware drivers like
camera, keypad, display etc. Also, the kernel handles all the things that Linux is really good at such as
networking and a vast array of device drivers, which take the pain out of interfacing to peripheral
hardware.

Libraries

On top of Linux kernel there is a set of libraries including open-source Web browser engine WebKit,
well known library libc, SQLite database which is a useful repository for storage and sharing of
application data, libraries to play and record audio and video, SSL libraries responsible for Internet
security etc.

Android Libraries

This category encompasses those Java-based libraries that are specific to Android development.
Examples of libraries in this category include the application framework libraries in addition to those
that facilitate user interface building, graphics drawing and database access. A summary of some key
core Android libraries available to the Android developer is as follows −

android.app − Provides access to the application model and is the cornerstone of all Android
applications.

android.content − Facilitates content access, publishing and messaging between applications and
application components.

android.database − Used to access data published by content providers and includes SQLite database
management classes.

android.opengl − A Java interface to the OpenGL ES 3D graphics rendering API.

android.os − Provides applications with access to standard operating system services including
messages, system services and inter-process communication.

android.text − Used to render and manipulate text on a device display.

android.view − The fundamental building blocks of application user interfaces.


android. Widget − A rich collection of pre-built user interface components such as buttons, labels, list
views, layout managers, radio buttons etc.

android.webkit − A set of classes intended to allow web-browsing capabilities to be built into


applications.

Having covered the Java-based core libraries in the Android runtime, it is now time to turn our
attention to the C/C++ based libraries contained in this layer of the Android software stack.

Android Runtime

This is the third section of the architecture and available on the second layer from the bottom. This
section provides a key component called Dalvik Virtual Machine which is a kind of Java Virtual
Machine specially designed and optimized for Android.

The Dalvik VM makes use of Linux core features like memory management and multi-threading,
which is intrinsic in the Java language. The Dalvik VM enables every Android application to run in its
own process, with its own instance of the Dalvik virtual machine.

The Android runtime also provides a set of core libraries which enable Android application
developers to write Android applications using standard Java programming language.

Application Framework

The Application Framework layer provides many higher-level services to applications in the form of
Java classes. Application developers are allowed to make use of these services in their applications.

The Android framework includes the following key services −

Activity Manager − Controls all aspects of the application lifecycle and activity stack.

Content Providers − Allows applications to publish and share data with other applications.

Resource Manager − Provides access to non-code embedded resources such as strings, color settings
and user interface layouts.
Notifications Manager − Allows applications to display alerts and notifications to the user.

View System − An extensible set of views used to create application user interfaces.

Applications

You will find all the Android application at the top layer. You will write your application to be
installed on this layer only. Examples of such applications are Contacts Books, Browser, Games etc.

2.7 RELATED WORKS

Recent technological advancements have gain popularity finding many applications in everyday
activities. There are many devices and different applications that focus on directing the user to desired
locations. Today’s drivers are well equipped for travel thanks to the GPS units many have in their
cars. GPS applications allow users to enter a destination and based on their current coordinates
display the fastest way to the destination. Additional features have evolved over time, such as
displaying congested routes, which allow users to make smart driving decisions and improve driving
safety. This saves time and stress when going to unfamiliar places or taking long trips. Google Maps
and GPS systems have become indispensable in recent years, with vast amounts of users relying on
them for directions, but their capabilities have not yet been fully applied to university campuses.
Directions within campuses are not available using the Google maps application.
CHAPTER 3 METHODOLOGY

3.1 INFORMATION GATHERING

In order to get familiar with android we start by reading related books and YouTube tutorials, then we
start developing sample android applications after that we gat some information’s about android
programing and android studio

3.2 METHODS

The methods and techniques we were following are

 Reading related books


 Watching You tube tutorials
 Design the system flow
 Implementing the system
 Adding some features
 Testing the app
 Generating the .apk file

3.3 SOFTWARE AND HARDWARE REQUIREMENT


3.3.1 SOFTWARE REQUIREMENT

 Java JDK6 or later version


 Android SDK
 Java Runtime Environment (JRE) 6
 Android Studio

3.3.2 HARDWARE REQUIREMENT

 pc with RAM 4 and above to develop the app


 android phone to test the app
3.4 FLOW CHART AND DESIGN

Figure 3 flow chart

3.5 IMPLEMENTATION

Languages used to implement are

 Java
 xml

Setting up android studio to work with Google maps

Step 1- download and install Google map play service and Google Respiratory it should be up to date
To install Go to SDK manager than in the SDK Tools Manu select the android Google play service
Google Respiratory it should be up to date
Figure 4 installing play service

Step 2- Enable android Google Maps API and get the api key to use Google map in our application go
to Google API Console (http://console.developers.google.com/apis)

Figure 5 Enabling Google map

Creating a Project, To create a new project, click on the my project menu then the click Create Project
button.name it what you like we name it mu-map
Figure 6 creating project

.Enabling the Maps API

After creating the project Enable the GOOGLE MAP ANDROID API

Figure 7 Enabling the project

Step 3- Creating an Android API Key

After enabling the Google Maps API, click on the Credentials item under APIs in the side navigation
to get a key to access the Maps API in your application. When you are presented with the Credentials
dialog, press the blue Add Credentials button and select API Key.
Figure 8 getting the api key

Then select the Android Key Button

Figure 9 android key

Give it a name what you like we name it Android Key 1 than add the package name and the
fingerprint we got it from our project the fingerprint can be find on the android studio Google map
api.xml file or it can be generated using the command line (keytool -list -v -keystore
c:\Users\Administrator\.android\debug.keystore -alias androiddebugkey -storepass android -keypass
android}
Figure 10 getting the SHA1 inCMD

Or from the android studio Google map Api .xml file

Figure 11 getting the SHAI in android studio

Figure 12 inserting in Google console

After saving the inputs data’s then we got the Api Key
Figure 13 saving the api key

Than copy and past it in the Google map Api .xml file

Figure 14 adding the api key to android studio

After adding the above information’s we start developing the layout of the app using the xml codes

Figure 15 xml code

the java code also add parallel with xml code

3.6 TESTING

To test the application we use android phone with minimum android version of 4.3 and up dated
android Google play service
Figure 16 output
CHAPTER 4 RESULT AND DISCUSSION
After completing the development of the campus map android app and prototype of the project, we
installed it on android phone to test its functionality. Some of the results are as flow

Full campus map with some common location

Figure 17 Map
Change map view type

Figure 18 Map type

Searching for specific places on map

Figure 19 searching
CHAPTER 5. CONCLUSION AND RECOMMENDATION

5.1 CONCLUSION

In this paper, we presented the design and implementation of a mobile application called MOBILE-
CAMPUS, with which mobile users can get valuable information on different landmarks of a
university campus and guide students/parents/visitors to find the desired places in campus with more
ease anytime and anywhere. By Mobile-campus, users can get an detailed information about
important landmarks in text and pictures A campus is a complex infrastructure. Especially new
students and people who are on it for the first time have a hard time to orientate themselves and find
places. The campus occupies more than two square kilometres and thus is even larger than that. The
campus has many different buildings. Even if there are maps at some points on the campus, users do
not have continuous help to get to their destination. In this paper we presented a campus map
application developed on an Android platform. The application provides

 current location on the campus


 markers for the common places
 search option
 the shortest path
 find paths on campus to user defined locations.

5.2 RECOMMENDATION

A person who wants to do more on this topic can refer some materials and with enough skill make the
application to work with databases. The project has some functionality. We believe this is the first
step to build complex application for our university, having more features and running on smart
phones and tablets. The system can further be advanced by adding some features such as notification
for new events, campus wide emergency alerts, navigation services for users, class, exam and other
event schedules.
6. REFERENCES
1. Android Development Tutorial by Lars Vogel Version 11.2
2. An introduction to android development by Alejandro Troccoli
3. Walter Savitch Absolute Java 2nd edition
4. Introduction to android programming lecture note by Randeep Bhatia
5. Android application development fundamentals from Lynda.com
6. http://www.tutorialpoint.com date march 10 2016
APPENDIX
Xml code

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:background="@color/blue"
android:orientation="vertical">

<fragment xmlns:android="http://schemas.android.com/apk/res/android"

xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/map"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.ebook.system.mu_map.MapsActivity"
tools:layout="@layout/abc_action_bar_title_item"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="@+id/button5" />

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search"
android:id="@+id/button5"
android:onClick="geoLocate"
android:background="@color/darkred"
android:layout_below="@+id/editText2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />

<Button
android:background="@color/darkred"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/change"
android:id="@+id/but"
android:onClick="change"
android:layout_alignTop="@+id/editText2"
android:layout_alignRight="@+id/map"
android:layout_alignEnd="@+id/map" />

<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/editText2"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_toLeftOf="@+id/but"
android:layout_toStartOf="@+id/but" />

</RelativeLayout>
Android code

package com.ebook.system.mu_map;

import android.Manifest;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.location.Address;
import android.location.Geocoder;
import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;
import android.widget.Toast;

import com.google.android.gms.appindexing.Action;
import com.google.android.gms.appindexing.AppIndex;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.maps.CameraUpdate;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
import com.google.android.gms.maps.model.PolylineOptions;

import java.io.IOException;
import java.util.List;

public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {

private GoogleMap mMap;


private EditText mText;
private CharSequence[] maptype = {"MAP", "Satellite", "Hybrid", "Terrain"};
PolylineOptions line=
new PolylineOptions().add(new LatLng(40.70686417491799,
-74.01572942733765),
new LatLng(40.76866299974387,
-73.98268461227417),
new LatLng(40.765136435316755,
-73.97989511489868),
new LatLng(40.748963847316034,
-73.96807193756104))
.width(5).color(Color.RED);
private static final double lat = 13.480253, lng = 39.484906,
latasho = 13.476956, lngasho = 39.482454, hidasilat = 13.478773,
hidasilng = 39.483639, comoroslat = 13.478315, comoroslng = 39.485979,
techerslat = 13.484065, techerslng = 39.485809
,reglat=13.477698,reglng=39.484454,
ladlat=13.478558,ladlng=39.481640;
private static final double
boysaholat=13.477851,boysaholng=39.481595,loclat=13.479952,loclng=39.481959,africal
at=13.481421,africalng=39.482535

,canlat=13.482155,canlng=39483850,arclat=13.481295,arclng=39.484487,technolat=13.48
0035,technolng=39.483292,

gedamlat=13.481714,gedamlng=39.487153,agrilat=13.479711,agrilng=39.485479,entlat=13
.476160,entlng=39.483864;
private static final float dzoom = 100;

/**
* ATTENTION: This was auto-generated to implement the App Indexing API.
* See https://g.co/AppIndexing/AndroidStudio for more information.
*/
private GoogleApiClient client;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps);
// Obtain the SupportMapFragment and get notified when the map is ready to
be used.
Toast.makeText(MapsActivity.this, "WELCOME TO MK",
Toast.LENGTH_SHORT).show();
SupportMapFragment mapFragment = (SupportMapFragment)
getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
if (ActivityCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
ActivityCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[]
permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the
documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
mMap.setMyLocationEnabled(true);

// ATTENTION: This was auto-generated to implement the App Indexing API.


// See https://g.co/AppIndexing/AndroidStudio for more information.
client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();

/**
* Manipulates the map once available.
* This callback is triggered when the map is ready to be used.
* This is where we can add markers or lines, add listeners or move the camera.
In this case,
* we just add a marker near Sydney, Australia.
* If Google Play services is not installed on the device, the user will be
prompted to install
* it inside the SupportMapFragment. This method will only be triggered once
the user has
* installed Google Play services and returned to the app.
*/
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;

if (ActivityCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&
ActivityCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
// TODO: Consider calling
// ActivityCompat#requestPermissions
// here to request the missing permissions, and then overriding
// public void onRequestPermissionsResult(int requestCode, String[]
permissions,
// int[] grantResults)
// to handle the case where the user grants the permission. See the
documentation
// for ActivityCompat#requestPermissions for more details.
return;
}
LatLng sydney = new LatLng(-34, 151);
mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in
Sydney"));
mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
mMap.addMarker(new MarkerOptions().position(new LatLng(entlat,entlng)).
title("Entrance Gate
").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE)));
mMap.addMarker(new MarkerOptions().position(new LatLng(reglat,reglng)).

title("Registra").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactor
y.HUE_AZURE)));
mMap.addMarker(new MarkerOptions().position(new LatLng(ladlat,ladlng)).
title("Female Student
Dorm").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE
)));
mMap.addMarker(new MarkerOptions().position(new
LatLng(boysaholat,boysaholng)).
title("Ashegoda Male student
Dorm").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE
)));
mMap.addMarker(new MarkerOptions().position(new LatLng(loclat,loclng)).
title("Lucy Male student
Dorm").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE
)));
mMap.addMarker(new MarkerOptions().position(new
LatLng(africalat,africalng)).
title("Africa Male student
Dorm").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE
)));
mMap.addMarker(new MarkerOptions().position(new LatLng(canlat,canlng)).
title("Kennan Male Student
Dorm").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE
)));
mMap.addMarker(new MarkerOptions().position(new LatLng(arclat,arclng)).
title("Architecture
Building").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_A
ZURE)));
mMap.addMarker(new MarkerOptions().position(new LatLng(gedamlat,gedamlng)).
title("Gedam Male Student
Dorm").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE
)));
mMap.addMarker(new MarkerOptions().position(new LatLng(agrilat,agrilng)).
title("Agriculture
Library").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZ
URE)));
mMap.addMarker(new MarkerOptions().position(new LatLng(latasho,lngasho)).
title("Ashogoda Class
Rooms").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZUR
E)));
mMap.addMarker(new MarkerOptions().position(new
LatLng(hidasilat,hidasilng)).
title("Hidasi
Cafe").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE
)));
mMap.addMarker(new MarkerOptions().position(new
LatLng(comoroslat,comoroslng)).

title("Comoros").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory
.HUE_AZURE)));
mMap.addMarker(new MarkerOptions().position(new
LatLng(techerslat,techerslng))
.title("Techers Gust
Houes").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZUR
E)));
mMap.addMarker(new MarkerOptions().position(new
LatLng(13.476680,39.484469)).
title("Doctor
Meteku").icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZU
RE)));
mMap.getUiSettings().setZoomControlsEnabled(true);
mMap.setMyLocationEnabled(true);

public void change(View view){

showMapTypeSelectorDialog();

}
private void showMapTypeSelectorDialog() {
// Prepare the dialog by setting up a Builder.
final String fDialogTitle = "Select Map Type";
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle(fDialogTitle);

// Find the current map type to pre-check the item representing the current
state.
int checkItem = mMap.getMapType() - 1;

// Add an OnClickListener to the dialog, so that the selection will be


handled.
builder.setSingleChoiceItems(
maptype,
checkItem,
new DialogInterface.OnClickListener() {

public void onClick(DialogInterface dialog, int item) {


// Locally create a finalised object.

// Perform an action depending on which item was selected.


switch (item) {
case 1:
mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
getlocation(lat,lng,dzoom);
break;
case 2:
mMap.setMapType(GoogleMap.MAP_TYPE_TERRAIN);
break;
case 3:
mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
break;
default:
mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
}
dialog.dismiss();
}
}
);

// Build the dialog and show it.


AlertDialog fMapTypeDialog = builder.create();
fMapTypeDialog.setCanceledOnTouchOutside(true);
fMapTypeDialog.show();
}
public void geoLocate(View v) throws IOException {
hideSoftKeybord(v);

EditText et = (EditText) findViewById(R.id.editText2);


String lo=et.getText().toString();
Geocoder go=new Geocoder(this);
List<Address> list =go.getFromLocationName(lo ,2);
Address add=list.get(10);
String local=add.getLocality();
Toast.makeText(this,local,Toast.LENGTH_LONG).show();

public void hideSoftKeybord(View v){

InputMethodManager
imm=(InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(v.getWindowToken(),0);
}
public void onStart() {
super.onStart();

// ATTENTION: This was auto-generated to implement the App Indexing API.


// See https://g.co/AppIndexing/AndroidStudio for more information.
client.connect();
Action viewAction = Action.newAction(
Action.TYPE_VIEW, // TODO: choose an action type.
"Maps Page", // TODO: Define a title for the content shown.
// TODO: If you have web page content that matches this app
activity's content,
// make sure this auto-generated web page URL is correct.
// Otherwise, set the URL to null.
Uri.parse("http://host/path"),
// TODO: Make sure this auto-generated app URL is correct.
Uri.parse("android-app://com.ebook.system.mu_map/http/host/path")
);
AppIndex.AppIndexApi.start(client, viewAction);
}
public void getlocation(double lae, double lng1, float dzoom){

LatLng ll=new LatLng(lat,lng);

CameraUpdate update=CameraUpdateFactory.newLatLng(ll);
mMap.moveCamera(update);

@Override
public void onStop() {
super.onStop();

// ATTENTION: This was auto-generated to implement the App Indexing API.


// See https://g.co/AppIndexing/AndroidStudio for more information.
Action viewAction = Action.newAction(
Action.TYPE_VIEW, // TODO: choose an action type.
"Maps Page", // TODO: Define a title for the content shown.
// TODO: If you have web page content that matches this app
activity's content,
// make sure this auto-generated web page URL is correct.
// Otherwise, set the URL to null.
Uri.parse("http://host/path"),
// TODO: Make sure this auto-generated app URL is correct.
Uri.parse("android-app://com.ebook.system.mu_map/http/host/path")
);
AppIndex.AppIndexApi.end(client, viewAction);
client.disconnect();
}

String

<resources>
<string name="app_name">MU-map</string>
<string name="title_activity_maps">MuMap</string>

<string name="map">Map</string>
<string name="seta">Satellite</string>
<string name="hyb">Hybrid</string>
<string name="tra">Terrain</string>
<string name="search">Search</string>
<string name="change">Setting</string>
<item name="blue" type="color">#33b5e5</item>
<item name="purple" type="color">#FFAA66CC</item>
<item name="green" type="color">#083508</item>
<item name="orange" type="color">#e60f0f10</item>
<item name="red" type="color">#bd635a64</item>
<item name="darkblue" type="color">#282b27</item>
<item name="darkpurple" type="color">#6e6971</item>
<item name="darkgreen" type="color">#FF669900</item>
<item name="darkorange" type="color">#6f453e37</item>
<item name="darkred" type="color">#864343</item>

<integer-array name="androidcolors">
<item>@color/blue</item>
<item>@color/purple</item>
<item>@color/green</item>
<item>@color/orange</item>
<item>@color/red</item>
<item>@color/darkblue</item>
<item>@color/darkpurple</item>
<item>@color/darkgreen</item>
<item>@color/darkorange</item>
<item>@color/darkred</item>
</integer-array>
</resources>

View publication stats

You might also like