Project Report
Project Report
Project Report
A PROJECT REPORT ON
OF
BACHELOR OF ENGINEERING
IN
INFORMATION TECHNOLOGY
BY
UNDER GUIDANCE OF
CERTIFICATE
This is to certify that the project entitled
‘GPS BASED VEHICLE GROUPING AND
NAVIGATION SYSTEM‘
submitted by
Date: / /
Acknowledgement
First and foremost, we would like to thank our project guide, Prof. Dr.
Preeti D. Bhamre, for her guidance and support. We will forever remain
grateful for the constant support and guidance extended by our guide, in
making this preliminary project report. Through our many discussions,
she helped us to form and solidify ideas.
We would also like to thank our wonderful colleagues and friends for
listening our ideas, asking questions and providing feedback and sugges-
tions for improving our ideas.
Mrunmayee Kulkarni
Dimpal Khairnar
Prasad Panchakshari
Ankita Sonje
ABSTRACT
1 Introduction 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . 1
4 Design 9
4.1 Architecture . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 High Level Design of the Project . . . . . . . . . . . . . 10
4.2.1 Data Flow Diagram . . . . . . . . . . . . . . . . 10
4.2.2 Use Case Diagram . . . . . . . . . . . . . . . . 12
4.2.3 Activity Diagram . . . . . . . . . . . . . . . . . 13
4.2.4 Class Diagram . . . . . . . . . . . . . . . . . . 14
4.2.5 Implementation screenshots . . . . . . . . . . . 15
5 Implementation 21
5.1 Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.2 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.3 Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
7 Project Plan 38
8 Conclusion 39
References 40
List of Figures
Chapter 1
Introduction
1.1 Motivation
When we go to picnic or to some other spot, with our family or friends,
more than one vehicles are required. If a person in one vehicle wants to
know the location of another vehicle, then that person tries to communi-
cate with the person in another vehicle, but if this communication is not
Chapter 2
Android Studio
Android SDK
Chapter 3
3.2.1 GPS
GPS satellites circle the Earth twice a day in a precise orbit. Each
satellite transmits a unique signal and orbital parameters that allow GPS
devices to decode and compute the precise location of the satellite. GPS
receivers use this information and transliteration to calculate a user’s ex-
act location. Essentially, the GPS receiver measures the distance to each
satellite by the amount of time it takes to receive a transmitted signal.
With distance measurements from a few more satellites, the receiver can
determine a user’s position and display it electronically to measure your
running route, map a golf course, find a way home or adventure anywhere.
b. To be used in Tourism
3.5 Objectives
a. Friendly mobile application for real time sharing of location
b. User can easily create and join any group using this system
Chapter 4
Design
4.1 Architecture
In the very first step user will have to download the application from
store. Once application is installed in android device user can use the ap-
plication. Internet connectivity is must for application to operate. When
user will open the application some permissions will be notified. If user
grants the permission he/she can use the further application. Permissions
include location(GPS), Data connection, access to maps etc. In the next
step user will have to register to the system. If user has already regis-
tered, user can directly log in. All the data will be stored on the Firebase
server during the process of registration and will be validated during log
in. Next step will lead you to the dashboard. Dashboard will show you
options like create group, track location etc. Create group will show user
further option to add members. Added members will receive a request via
notification on application. If added member accepts the request he/she
will be added else not. User can easily exit through the application when-
ever wished.
Chapter 5
Implementation
5.1 Algorithm
Updating Algorithm-
Location updation is primary responsibility of the application. Updation
operation is performed continuously on the server. Current location up-
dation is done after 10ms of time. Updated latitude and longitude are
updated to server continuously. Updated data is retrieved from server af-
ter similar time period by all members of common group.
Searching algorithm-
Whenever a group is to be created by the user, details of all registered user
will be displayed on the screen. User has to select members by selecting
the check boxes. Searching algorithm is used to search and display all
users present on server. Searching algorithm is also used to search for all
group members commonly collected. All members falling into one group
will be able to share location information with each other.
5.2 Modules
1. Login and registration:-The very first step while using application
is registration. User has to enter some of the personal details for us-
ing the applications. Details include name, contact number, email-id
and address. Once registered, user can log in to the system any time.
Entered data at log in time will be validated from the data stored on
cloud server at registration.
5.3 Code
Android Manifest file
1 <?xml v e r s i o n =” 1 . 0 ” e n c o d i n g =” u t f −8”?>
2 <m a n i f e s t xmlns : a n d r o i d =” h t t p : / / s c h e m a s . a n d r o i d . com / apk / r e s / a n d r o i d ”
3 p a c k a g e =”com . e x a m p l e . c a r t r a c k i n g ”>
4 <!−−
5 The ACCESS COARSE / FINE LOCATION p e r m i s s i o n s a r e n o t r e q u i r e d t o u s e
6 Google Maps A n d r o i d API v2 , b u t you must s p e c i f y e i t h e r c o a r s e o r
fine
7 l o c a t i o n p e r m i s s i o n s f o r t h e ’ MyLocation ’ f u n c t i o n a l i t y .
8 −−>
9 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n .
ACCESS FINE LOCATION” />
10 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n .CAMERA” />
11 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . INTERNET” />
12 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n .
ACCESS COARSE LOCATION” />
13 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . SEND SMS” />
14 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n .
ACCESS NETWORK STATE” />
15 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . ACCESS WIFI STATE ”
/>
16 <u s e s −p e r m i s s i o n a n d r o i d : name=”com . g o o g l e . a n d r o i d . c2dm . p e r m i s s i o n .
RECEIVE” />
17 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . WAKE LOCK” />
18 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n .
WRITE EXTERNAL STORAGE” />
19 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . READ PHONE STATE”
/>
20 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n .
READ EXTERNAL STORAGE” />
21 <u s e s −p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . WRITE SETTINGS” />
22 <p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n .CAMERA” />
23 <p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . WRITE SETTINGS” />
24 <p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . WRITE EXTERNAL STORAGE”
/>
25 <p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . READ EXTERNAL STORAGE”
/>
26 <p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . INTERNET” />
27 <p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . ACCESS COARSE LOCATION”
/>
28 <p e r m i s s i o n a n d r o i d : name=” a n d r o i d . p e r m i s s i o n . ACCESS FINE LOCATION” />
29 <a p p l i c a t i o n
30 a n d r o i d : a l l o w B a c k u p =” t r u e ”
31 a n d r o i d : i c o n =”@mipmap / i c l a u n c h e r ”
32 a n d r o i d : l a b e l =” @ s t r i n g / app name ”
33 a n d r o i d : r o u n d I c o n =”@mipmap / i c l a u n c h e r r o u n d ”
34 a n d r o i d : s u p p o r t s R t l =” t r u e ”
35 a n d r o i d : theme =” @ s t y l e / AppTheme ”>
36 < a c t i v i t y a n d r o i d : name=” . L o g i n A c t i v i t y ”>
37 <i n t e n t −f i l t e r >
38 < a c t i o n a n d r o i d : name=” a n d r o i d . i n t e n t . a c t i o n . MAIN” />
39 <c a t e g o r y a n d r o i d : name=” a n d r o i d . i n t e n t . c a t e g o r y . LAUNCHER” />
40 </ i n t e n t − f i l t e r >
41 </ a c t i v i t y >
42 < a c t i v i t y a n d r o i d : name=” . A d d M e m b e r A c t i v i t y ” />
43 < a c t i v i t y a n d r o i d : name=” . M a i n A c t i v i t y ” />
44 < a c t i v i t y a n d r o i d : name=” . D a s h b o a r d A c t i v i t y ” />
45 < a c t i v i t y a n d r o i d : name=” . G r o u p I n f o A c t i v i t y ” />
46 < a c t i v i t y a n d r o i d : name=” . R e g i s t r a t i o n A c t i v i t y ” />
47 < a c t i v i t y a n d r o i d : name=” . S h o w G r o u p D e t a i l ” />
48 <!−−
49 The API key f o r Google Maps−b a s e d APIs i s d e f i n e d a s a s t r i n g
resource .
50 ( See t h e f i l e ” r e s / v a l u e s / g o o g l e m a p s a p i . xml ” ) .
51 Note t h a t t h e API key i s l i n k e d t o t h e e n c r y p t i o n key u s e d t o s i g n
t h e APK .
52 You n e e d a d i f f e r e n t API key f o r e a c h e n c r y p t i o n key , i n c l u d i n g t h e
r e l e a s e key t h a t i s u s e d t o
53 s i g n t h e APK f o r p u b l i s h i n g .
54 You c a n d e f i n e t h e k e y s f o r t h e debug and r e l e a s e t a r g e t s i n s r c /
debug / and s r c / r e l e a s e / .
55 −−>
56 <meta−d a t a
57 a n d r o i d : name=”com . g o o g l e . a n d r o i d . geo . API KEY ”
58 a n d r o i d : v a l u e =” @ s t r i n g / g o o g l e m a p s k e y ” />
59 <a c t i v i t y
60 a n d r o i d : name=” . M a p s A c t i v i t y ”
61 a n d r o i d : l a b e l =” @ s t r i n g / t i t l e a c t i v i t y m a p s ” />
62 </ a p p l i c a t i o n >
63 </ m a n i f e s t >
Map Activity
1 p a c k a g e com . e x a m p l e . c a r t r a c k i n g ;
2 import android . ∗ ;
3 import android . Manifest ;
4 i m p o r t a n d r o i d . app . P r o g r e s s D i a l o g ;
5 import android . content . SharedPreferences ;
6 i m p o r t a n d r o i d . c o n t e n t . pm . P a c k a g e M a n a g e r ;
7 import android . g r ap h i c s . Color ;
8 import android . l o c a t i o n . Address ;
9 i m p o r t a n d r o i d . l o c a t i o n . Geocoder ;
10 i m p o r t a n d r o i d . s u p p o r t . v4 . app . A c t i v i t y C o m p a t ;
11 i m p o r t a n d r o i d . s u p p o r t . v4 . app . F r a g m e n t A c t i v i t y ;
12 i m p o r t a n d r o i d . os . Bundle ;
13 i m p o r t a n d r o i d . view . View ;
14 import android . widget . Button ;
15 import android . widget . EditText ;
16 i m p o r t a n d r o i d . w i d g e t . TextView ;
17 import android . widget . Toast ;
18 i m p o r t com . e x a m p l e . c a r t r a c k i n g . Modules . D i r e c t i o n F i n d e r ;
19 i m p o r t com . e x a m p l e . c a r t r a c k i n g . Modules . D i r e c t i o n F i n d e r L i s t e n e r ;
20 i m p o r t com . e x a m p l e . c a r t r a c k i n g . Modules . R o u t e ;
21 i m p o r t com . f i r e b a s e . c l i e n t . D a t a S n a p s h o t ;
22 i m p o r t com . f i r e b a s e . c l i e n t . F i r e b a s e ;
23 i m p o r t com . f i r e b a s e . c l i e n t . F i r e b a s e E r r o r ;
24 i m p o r t com . f i r e b a s e . c l i e n t . V a l u e E v e n t L i s t e n e r ;
25 i m p o r t com . g o o g l e . a n d r o i d . gms . maps . C a m e r a U p d a t e F a c t o r y ;
26 i m p o r t com . g o o g l e . a n d r o i d . gms . maps . GoogleMap ;
27 i m p o r t com . g o o g l e . a n d r o i d . gms . maps . OnMapReadyCallback ;
28 i m p o r t com . g o o g l e . a n d r o i d . gms . maps . S u p p o r t M a p F r a g m e n t ;
29 i m p o r t com . g o o g l e . a n d r o i d . gms . maps . model . B i t m a p D e s c r i p t o r F a c t o r y ;
30 i m p o r t com . g o o g l e . a n d r o i d . gms . maps . model . LatLng ;
31 i m p o r t com . g o o g l e . a n d r o i d . gms . maps . model . Marker ;
32 i m p o r t com . g o o g l e . a n d r o i d . gms . maps . model . M a r k e r O p t i o n s ;
33 i m p o r t com . g o o g l e . a n d r o i d . gms . maps . model . P o l y l i n e ;
34 i m p o r t com . g o o g l e . a n d r o i d . gms . maps . model . P o l y l i n e O p t i o n s ;
35 import java . io . IOException ;
36 import java . io . UnsupportedEncodingException ;
37 import java . u t i l . ArrayList ;
38 import java . u t i l . List ;
39 import java . u t i l . Locale ;
40 publ ic c l a s s MapsActivity extends FragmentActivity implements
OnMapReadyCallback , D i r e c t i o n F i n d e r L i s t e n e r {
41 / / p r i v a t e GoogleMap mMap ;
42 p u b l i c s t a t i c GoogleMap mMap ;
43 p r i v a t e A r r a y L i s t <LatLng> l i s t L a t L n g ;
44 SharedPreferences . Editor editor ;
45 SharedPreferences sharedPreferences ;
46 S t r i n g groupName ;
47 p r i v a t e Button btnFindPath ;
48 private EditText etOrigin ;
49 private EditText etDestination ;
50 p r i v a t e L i s t <Marker> o r i g i n M a r k e r s = new A r r a y L i s t <>() ;
51 p r i v a t e L i s t <Marker> d e s t i n a t i o n M a r k e r s = new A r r a y L i s t <>() ;
52 p r i v a t e L i s t <P o l y l i n e > p o l y l i n e P a t h s = new A r r a y L i s t <>() ;
53 private ProgressDialog progressDialog ;
54 public s t a t i c i n t f l g =0;
55 @Override
56 p r o t e c t e d void o n C r e a t e ( Bundle s a v e d I n s t a n c e S t a t e ) {
57 super . onCreate ( savedInstanceState ) ;
58 se tC o n t e n t V i e w (R . l a y o u t . a c t i v i t y m a p s ) ;
59 / / O b t a i n t h e S u p p o r t M a p F r a g m e n t and g e t n o t i f i e d when t h e map i s
r e a d y t o be u s e d .
60 S u p p o r t M a p F r a g m e n t mapFragment = ( S u p p o r t M a p F r a g m e n t )
getSupportFragmentManager ( )
61 . f i n d F r a g m e n t B y I d ( R . i d . map ) ;
62 mapFragment . getMapAsync ( t h i s ) ;
63 s h a r e d P r e f e r e n c e s = g e t S h a r e d P r e f e r e n c e s ( ” groupName ” , 0 ) ;
64 editor=sharedPreferences . edit () ;
65 groupName= s h a r e d P r e f e r e n c e s . g e t S t r i n g ( ” groupName ” , ” ” ) ;
66 b t n F i n d P a t h = ( Button ) findViewById (R . i d . b t n F i n d P a t h ) ;
67 e t O r i g i n = ( E d i t T e x t ) findViewById (R . i d . e t O r i g i n ) ;
68 e t D e s t i n a t i o n = ( E d i t T e x t ) findViewById (R . i d . e t D e s t i n a t i o n ) ;
69 b t n F i n d P a t h . s e t O n C l i c k L i s t e n e r ( new View . O n C l i c k L i s t e n e r ( ) {
70 @Override
71 p u b l i c v o i d o n C l i c k ( View view ) {
72 sendRequest ( ) ;
73 }
74 }) ;
75 f i n a l P r o g r e s s D i a l o g d l g = new P r o g r e s s D i a l o g ( M a p s A c t i v i t y . t h i s ) ;
76 dlg . s e t T i t l e ( ” Please wait . ” ) ;
77 dlg . setMessage ( ” loading . . . Please wait . ” ) ;
78 d l g . show ( ) ;
79 f i n a l F i r e b a s e f i r e b a s e = new F i r e b a s e ( C o n f i g . FIREBASE URL + ” /
GroupInfo ” ) ;
80 i f ( f l g ==0)
81 f i r e b a s e . a d d V a l u e E v e n t L i s t e n e r ( new V a l u e E v e n t L i s t e n e r ( ) {
82 @Override
83 p u b l i c v o i d onDataChange ( D a t a S n a p s h o t d a t a S n a p s h o t )
84 String ss = ” count : ” + dataSnapshot . getChildrenCount ( ) ;
85 i n t cnt = 0;
86 i f ( f l g ==0)
87 for ( DataSnapshot postSnapshot : dataSnapshot . getChildren ( ) ) {
88 GroupInfo post = postSnapshot . c h i l d ( ” GroupInfo ” ) . getValue ( GroupInfo .
class ) ;
89 S t r i n g memb [ ] = p o s t . getMember ( ) ;
90 f o r ( i n t i = 0 ; i <memb . l e n g t h ; i ++)
91 {
92 i f ( memb [ i ] . t o S t r i n g ( ) . e q u a l s ( D a s h b o a r d A c t i v i t y . c o n t a c t ) )
93 {
94 etDestination . setText ( post . getDestination () ) ;
95 c n t ++;
96 f l g =1;
97 }
98 }
99 }
100 dlg . dismiss ( ) ;
101 }
102 @Override
103 public void onCancelled ( F i r e b a s e E r r o r f i r e b a s e E r r o r ) {
104 System . o u t . p r i n t l n ( ” The r e a d f a i l e d : ” + f i r e b a s e E r r o r . g e t M e s s a g e ( ) ) ;
105 }
106 }) ;
1 p a c k a g e com . e x a m p l e . c a r t r a c k i n g ;
2 i m p o r t a n d r o i d . app . A c t i v i t y ;
3 i m p o r t a n d r o i d . app . A l e r t D i a l o g ;
4 i m p o r t a n d r o i d . app . S e r v i c e ;
5 import android . content . Context ;
6 import android . content . DialogInterface ;
7 import android . content . I n t e n t ;
8 import android . content . SharedPreferences ;
9 i m p o r t a n d r o i d . c o n t e n t . pm . P a c k a g e M a n a g e r ;
10 import android . l o c a t i o n . Location ;
11 import android . l o c a t i o n . LocationListener ;
12 import android . l o c a t i o n . LocationManager ;
13 i m p o r t a n d r o i d . os . Bundle ;
14 import a n d r o i d . os . I B i n d e r ;
15 import android . provider . S e t t i n g s ;
16 i m p o r t a n d r o i d . s u p p o r t . v4 . app . A c t i v i t y C o m p a t ;
17 i m p o r t a n d r o i d . s u p p o r t . v4 . c o n t e n t . C o n t e x t C o m p a t ;
18 i m p o r t a n d r o i d . u t i l . Log ;
19 import android . widget . Toast ;
20 i m p o r t com . f i r e b a s e . c l i e n t . F i r e b a s e ;
21 /∗ ∗
22 ∗ C r e a t e d by e m e r g i n g on 2 / 1 5 / 1 6 .
23 ∗/
24 p u b l i c c l a s s GPSTracker e x t e n d s S e r v i c e {
25 p r i v a t e C o n t e x t mContext ;
26 / / F l a g f o r GPS s t a t u s
27 boolean isGPSEnabled = f a l s e ;
28 / / Flag f o r network s t a t u s
29 boolean isNetworkEnabled = f a l s e ;
30 / / F l a g f o r GPS s t a t u s
31 boolean canGetLocation = f a l s e ;
32 Location location ; / / Location
33 double l a t i t u d e ; / / L a t i t u d e
34 double long itude ; / / Longitude
35 / / The minimum d i s t a n c e t o c h a n g e U p d a t e s i n m e t e r s
36 / / p r i v a t e s t a t i c f i n a l l o n g MIN DISTANCE CHANGE FOR UPDATES = 1 0 0 0 ;
/ / 10 m e t e r s
37 / / The minimum t i m e b e t w e e n u p d a t e s i n m i l l i s e c o n d s
38 / / p r i v a t e s t a t i c f i n a l l o n g MIN TIME BW UPDATES = 1000 ∗ 60 ∗ 1 ; / /
1 minute
39 p r i v a t e s t a t i c f i n a l l o n g MIN DISTANCE CHANGE FOR UPDATES = 1 ; / / 10
meters
40 / / The minimum t i m e b e t w e e n u p d a t e s i n m i l l i s e c o n d s
41 p r i v a t e s t a t i c f i n a l l o n g MIN TIME BW UPDATES = 1 ; / / 1 m i n u t e
42 / / D e c l a r i n g a L o c a t i o n Manager
43 p r o t e c t e d LocationManager locationManager ;
44 Activity activity ;
45 p u b l i c s t a t i c S t r i n g c o n t a c t =” ” ;
46 p u b l i c s t a t i c S t r i n g name=” ” ;
47 SharedPreferences . Editor editor ;
48 SharedPreferences sharedPreferences ;
49 p u b l i c GPSTracker ( ) {
50 }
51 p u b l i c GPSTracker ( C o n t e x t c o n t e x t , A c t i v i t y a c t i v i t y ) {
52 t h i s . mContext = c o n t e x t ;
53 this . activity = activity ;
54 Firebase . setAndroidContext ( t h i s ) ;
55 s h a r e d P r e f e r e n c e s = c o n t e x t . g e t S h a r e d P r e f e r e n c e s ( ” groupName ” , 0 ) ;
56 editor=sharedPreferences . edit () ;
57 getLocation () ;
58 }
59 public Location getLocation () {
60 try {
61 l o c a t i o n M a n a g e r = ( L o c a t i o n M a n a g e r ) mContext . g e t S y s t e m S e r v i c e (
LOCATION SERVICE ) ;
62 / / G e t t i n g GPS s t a t u s
63 isGPSEnabled = locationManager
64 . i s P r o v i d e r E n a b l e d ( L o c a t i o n M a n a g e r . GPS PROVIDER ) ;
65 / / G e t t i n g network s t a t u s
66 isNetworkEnabled = locationManager
67 . i s P r o v i d e r E n a b l e d ( L o c a t i o n M a n a g e r . NETWORK PROVIDER) ;
68 i f ( ! i s G P S E n a b l e d && ! i s N e t w o r k E n a b l e d ) {
69 / / No n e t w o r k p r o v i d e r i s e n a b l e d
70 } else {
71 t h i s . canGetLocation = true ;
72 i f ( isNetworkEnabled ) {
73 i n t requestPermissionsCode = 50;
74 locationManager . requestLocationUpdates (
75 L o c a t i o n M a n a g e r . NETWORK PROVIDER,
76 MIN TIME BW UPDATES ,
77 MIN DISTANCE CHANGE FOR UPDATES , m L o c a t i o n L i s t e n e r ) ;
78 Log . d ( ” Network ” , ” Network ” ) ;
79 i f ( l o c a t i o n M a n a g e r != n u l l ) {
80 location = locationManager
81 . g e t L a s t K n o w n L o c a t i o n ( L o c a t i o n M a n a g e r . NETWORK PROVIDER) ;
82 i f ( l o c a t i o n != n u l l ) {
83 latitude = location . getLatitude () ;
84 longitude = location . getLongitude () ;
85 }
86 }
87 }
88 }
89 / / I f GPS e n a b l e d , g e t l a t i t u d e / l o n g i t u d e u s i n g GPS S e r v i c e s
90 i f ( isGPSEnabled ) {
91 i f ( l o c a t i o n == n u l l ) {
92 i f ( ContextCompat . c h e c k S e l f P e r m i s s i o n ( a c t i v i t y , M a n i f e s t . p e r m i s s i o n .
137 {
138 groupName=” g r o u p ” ;
139 }
140 F i r e b a s e r e f = new F i r e b a s e ( C o n f i g . FIREBASE URL + ” / l o c a t i o n ” ) ;
141 S h a r e L o c a t i o n l o c =new S h a r e L o c a t i o n ( ) ;
142 loc . setContact ( contact ) ;
143 l o c . s e t L a t i t u d e ( l a t i t u d e +” ” ) ;
144 l o c . s e t L o n g i t u d e ( l o n g i t u d e +” ” ) ;
145 l o c . setGroupName ( groupName ) ;
146 loc . s e t S t a t u s ( ” yes ” ) ;
147 l o c . setName ( name ) ;
148 T o a s t . makeText ( mContext , ” c : ”+ c o n t a c t , T o a s t . LENGTH LONG) . show ( ) ;
149 i f ( c o n t a c t != ” ” ) {
150 ref . child ( contact ) . setValue ( loc ) ;
151 }
152 }
153 }
154 @Override
155 p u b l i c void onStatusChanged ( S t r i n g p r o v i d e r , i n t s t a t u s , Bundle
extras ) {
156 }
157 @Override
158 public void onProviderEnabled ( S t r i n g provider ) {
159 }
160 @Override
161 public void onProviderDisabled ( S t r i n g provider ) {
162 }
163 };
164 /∗ ∗
165 ∗ Function to get l a t i t u d e
166 ∗ ∗/
167 public double g e t L a t i t u d e ( ) {
168 i f ( l o c a t i o n != n u l l ) {
169 latitude = location . getLatitude () ;
170 }
171 // return latitude
172 return latitude ;
173 }
174 /∗ ∗
175 ∗ Function to get longitude
176 ∗ ∗/
177 public double getLongitude ( ) {
178 i f ( l o c a t i o n != n u l l ) {
179 longitude = location . getLongitude () ;
180 }
181 / / return longitude
182 return longitude ;
183 }
184 /∗ ∗
185 ∗ F u n c t i o n t o c h e c k GPS / Wi−F i e n a b l e d
Chapter 6
1. Local Unit tests which are tests that are performed using JVM only.
They are meant for testing business logic that is not interacting with
the operating system.
2. Instrumented unit tests are tests used for testing logic interconnected
with Android API. They are performed on physical emulator and thus
take more time than local tests.
2. Beta Testing : Beta Testing also known as field testing, takes place in
the customers environment and involves some extensive testing by a
group of customers who use the system in their environment.
Test
Test Case Test Case De- Expected Re-
Case Actual Result Status
Name scription sult
ID
To validate All User All Users are reg-
whether all users should get istered with User
User Regis-
U-1 get registered registered with name, Email-id, Pass
tration
with User name User name Address and
and password And Password Password
To validate All User
All User are
whether all user should get
Logged in with
U-2 User Login get Login with Login with Pass
User name and
User name And User name
Password
Password and Password
To create a new New group
Creation of New group is cre-
U-3 group for valid should be Pass
group ated for valid user
user created
Notification will Group will be Group joined
Joining of
U-4 be sent for join- joined if re- when request Pass
group
ing group quest accepted accepted by user
Accurate loca- Current location
Check To display user’s
U-5 tion is to be of valid user is Pass
location current location
displayed displayed
Check To simulta- Location
location neously view should be Accurate Loca-
U-6 Pass
of group location of other displayed with tion displayed
members group members varied colors
Test
Test Case Test Case De- Expected Re-
Case Actual Result Status
Name scription sult
ID
An application
Start an ap- To start an appli- Application get
F-1 should get Pass
plication cation started
start
To validate
New user
User Regis- whether new user New user regis-
F-2 appropriately Pass
tration appropriately tration is created
registers
registers
To validate User could log
Login in success-
F-3 User Login whether user can in to the appli- Pass
ful
login cation
To validate Valid existing
Valid existing
Existing whether existing user should
F-4 user logged in to Pass
user Login user is able to get logged into
the system
login to system the system
Group should
Group created
Group should be be formed
Create with member
F-5 created by valid and mem- Pass
group list displayed on
user bers could be
application
added
Group joined Group joined
F-6 Join group To join any group if notification when notification Pass
accepted accepted
Check To simulta- Location
location neously view should be Accurate Loca-
F-7 Pass
of group location of other displayed with tion displayed
members group members varied colors
Chapter 7
Project Plan
Phase
Activity Work Done Duration
Number
Topic Finalization and Paper Studying paper related to dif-
1 3 Weeks
searching ferent domain
2 Base Paper Study Through Study of base paper 2 Weeks
3 Literature Study Finding Existing System 4 Weeks
4 Scope of Work Deciding Scope of Project 2 Weeks
Deciding algorithm and flow
5 Methodology 2 Weeks
of work
6 Design Draw UML Diagrams 2 Weeks
7 Implementation Implementation of module 4 Weeks
8 Testing Testing of module 2 Weeks
Chapter 8
Conclusion
GPS vehicle grouping and navigation system will be able track multi-
ple vehicles under one android device. System developed is an Android
application which is capable of creating groups and establish secure con-
nection between them. System will be able to create and join group on
user’s wish. Any user can easily add into a group and leave group on
their wish. When user wishes to create group he/she must enter necessary
information and add members into group from the list appeared on appli-
cation. Added members will receive notification request on application
accordingly. If group request is accepted then he/she will be added into
group else not. Once group is formed each member will be able to see
other member’s location continuously. If user wishes to see his/her loca-
tion with other group member’s location then they can easily see through
’Track location’ feature on dashboard.
Bibliography
[3] H. Qi, Y.-H. Liu, L.-D. Qu, and D. Wei, Design and implementation
of cache system for vehicular central navigation system, Jilin Daxue
Xuebao GongxuebanJournal Jilin Univ. Eng. Technol. Ed., vol 42,
no 3, pp 689-695, 2012.
[7] C.-C. Chang and C.-J. Lin, LIBSVM: A library for support vector
machines, ACM Trans. Intell. Syst. Technol., vol 2, no 3, pp 1-27,
2011.