You are on page 1of 78

REMIND MY SCHEDULE – ANDROID APPLICATION

A Project

Presented to the faculty of the Department of Computer Science

California State University, Sacramento

Submitted in partial satisfaction of
the requirements for the degree of

MASTER OF SCIENCE

in

Computer Science

by

Vineeta Bhagbole

FALL
2015

REMIND MY SCHEDULE – ANDROID APPLICATION

A Project

by

Vineeta Bhagbole

Approved by:

__________________________________, Committee Chair
Dr. Jinsong Ouyang

__________________________________, Second Reader
Dr. Jun Dai

____________________________
Date

ii

Student: Vineeta Bhagbole

I certify that this student has met the requirements for format contained in the University

format manual, and that this project is suitable for shelving in the Library and credit is to

be awarded for the Project.

__________________________, Graduate Coordinator ________________
Dr. Jinsong Ouyang Date

Department of Computer Science

iii

All the current available applications give an event reminder before a fixed amount of time from the event start time. A user can set a fixed time for notifications to be sent before the event occurs. This estimation goes wrong if user starts travelling from different start location. in the current available apps. Though there are number of event reminder and calendar applications available for android. iv . This requires estimation of the time required for travel to reach the destination location from a fixed start location and accordingly set the notification time to avoid delays reaching the destination. none of them supports dynamic reminders based on user’s current location. Abstract of REMIND MY SCHEDULE – ANDROID APPLICATION by Vineeta Bhagbole In today’s fast paced life. This could lead to delays or even completely missing the event. Also. keeping track of all the events which has travel schedules is a tedious task. a user has to separately feed information about all the events with travel plans for which he/she wants to get reminders.

With my “RemindMySchedule” android application I am proposing a solution to the above problem. The application has been implemented using Android and its services for the front end. _______________________. mode of travel. and importance of the schedule. Notification will also include travel route information for users to start navigation. This application will send dynamic notifications based on user’s current location. Committee Chair Dr. “RemindMySchedule” also provides the event specific location sharing among selected group of members to keep track of each other’s whereabouts. App will automatically sync only those events which have travel information and send dynamic notifications. Jinsong Ouyang _______________________ Date v .

Jun Dai for his willingness to serve on the committee. ACKNOWLEDGEMENTS I would like to express my gratitude to Dr. Lastly. I thank him for his generous advice and encouragement which helped me to complete the project successfully. Jinsong Ouyang. Sacramento. my gratitude is extended to Dr. my project advisor for providing me an opportunity to work on this project. In addition. I would like to thank the entire faculty and staff of the Department of Computer Science Engineering at California State University. vi . which gave me a great exposure to develop the skills towards Android Application Development.

.......................................................5..........................................x Chapter 1.......................................................................3 2........................6 2...............................8 2................................................................1.................. INTRODUCTION ......3 Event Profiling ......................................................................................................................8 2...............................10 3.................. vi List of Figures ........................................................6 Sharing Location with Others ..............................................................................9 3...........................................2 View Scheduled Events ....................7 2......................7.....1 Factors considered for notification time .................3 2...................................................................6 2.....................................................7 System Requirements...................7..............................4 Settings .............................................................................................................8 3.................1 Activities ....5 Notifying User ..4 2....................................................................1........... TABLE OF CONTENTS Page Acknowledgements .........................................1 Software requirements ........1 2....................1 User Requirements ............ PROJECT REQUIREMENTS .......................................... ANDROID FRAMEWORK AND SOFTWARE ENVIRONMENT......................................2 Fragments .......................................................................................................................4 2....................................................................................................................................1 Components in Android Application .......2 Hardware requirements .....5 2......13 vii .............................................................................................................................9 3........

..........35 4................................................45 viii ...............................................................................1 Prerequisite installations .........14 3..................................................................................................................................1 Application Installation ....................................29 4.29 4......................21 3...............................................................................1.......................3 Check-in ....2..............................1 Time to send notification ............1...................................... FEATURES IMPLEMENTATION .........3......................5 Show Notifications.........................28 4.38 4............................................................................4 Setting policies for an event ..........3 Event Details ..........3.........28 3.................................................................................................28 3......3 Creating “Hello World” Sample Android Application ..........2 Application Home Page .................29 4....3.................36 4..................31 4.........................................................5....................................................4...........................................................24 3...............................................4 Running the App ...........................................................36 4.REMINDMYSCHEDULE ........................................37 4...2 Setup for Android Application Development ............2 Choose an account ....................1 Event date and time .......4 Broadcast Receivers ....................................2 Running an app on emulator .......1 Login information ..............2 Travel route ........21 3............................................................................................1..................................1..................................................................................3........41 4..........................................................3 Services ....33 4......................................................................4.......... 3....................17 3..............1 Installing and running an app on physical device ....................................................................42 4......4 Reminder Settings ......

.....................................................................................................................................66 ix .....................................56 4...........................56 4.1 Location sharing among group of friends ..................... 4...6.........................................................................51 4.....................................................................................8 Future Work .............7 Application Testing .................................................2 Location sharing.....................................................7..............................................48 4............................1 Dynamic notification ...............................7................................ CONCLUSION ...................64 5...6 Check-In and Location Sharing ..............................................60 4...................65 References ...............................

.....................2 Android Service Life Cycle ...........................................................4 Figure 2................7 Figure 3.....4 Development Phases in an Android Application......4 Event Details .........2 Choose an Account ............................23 Figure 3...............................................................27 Figure 4......................1 Android Activity Life Cycle ................................................................................................................................................................17 Figure 3.................16 Figure 3...................3 Steps to Make BroadcastReceiver ...............................35 x ..........................................4 Location Sharing with Others ...........31 Figure 4.............................................................................29 Figure 4................3 Profiling an Event ..............................................6 Creating New Android Project .......................................................................................................1 Application Installation – Login Screen ...........................................................25 Figure 3...........3 Application Home Page ..............24 Figure 3.....................................................12 Figure 3.....2 Display Scheduled Events ..3 Figure 2.................................................................................8 Default File Layout.......................................................... LIST OF FIGURES Figures Page Figure 2.....................5 Figure 2.........1 RemindMySchedule Use Case Diagram ...5 Starting New Android Project .......................................................33 Figure 4............7 “Hello World” Android Application ................................................................................26 Figure 3......................

....12 Event Details with Customized Policies and Settings ....................................17 Check-In Window of Two Different Users ............15 Event Details Window of Two Different Users ...............................57 Figure 4..............................................7 Create New Group ..................58 Figure 4..51 Figure 4..........................................................10 Travel Time to an Event with Default Policies and Settings.......16 Selected Group Members of Two Different Users ..................5 Set Event Policies .....................................................................57 Figure 4..............................63 xi ......11 Dynamic Notication for an Event with Default Policies and Settings ........................................6 Location Check-In ..14 Dynamic Notification for an Event with Customized Policies and Settings .......................................................39 Figure 4..62 Figure 4...........50 Figure 4.....8 Selecting Group and Adding Friends to Group ...............................................56 Figure 4...................52 Figure 4...............9 Event Details with Default Policies and Settings .................................Figure 4..61 Figure 4......13 Travel Time to an Event with Customized Policies and Settings ........59 Figure 4....................59 Figure 4.............

. The application extracts event details from Google calendar. The notification sent to user also includes the travel information to start navigation. Based on the provided details and policies set by user the application will intelligently notify user about the scheduled event. The event details are assumed to be pre-entered by user in Google calendar. Also user can do profiling for location access and reminder settings. It will run in background to access the user’s current location and calculate travel time with respect to mode of travel selected by user. 1 Chapter 1 INTRODUCTION There are bunch of schedule reminder android applications available today on play store providing static notification to user before a specified interval of time. and then application synchronizes the data with Google calendar. The application allows user to edit/modify each schedule to set the importance as well as mode of travel. RemindMySchedule is a solution to the above problem. This is a location based reminder application which dynamically notifies user so that they can be on or before time for an event. The static notifications will not be proven to be useful when travel time for user is considerably large with respect to reminder set for fixed time. Also this could cause delays in arriving at event location or even missing an event.

2 RemindMySchedule also has a very useful feature of location sharing among group of friends when they have common event. By using this feature a user can find out where their friends are with respect event location. Also it does not require texting or calling just to find out exactly where your friend is while they are driving or doing some other work. .

but also helps user reach event’s destination location on time. Figure 2.1 RemindMySchedule Use Case Diagram . 3 Chapter 2 PROJECT REQUIREMENTS 2. This application not only keeps track of scheduled events. View Scheduled Events Prioritize event Set mode of travel Share location with Set notification buffer other user groups time Set Location access (GPS) time Figure 2.1 shows all the functionality based operations that can be performed by user.1 User Requirements This mobile application is mainly objected to provide user a location-based travel reminder application.

3 Event Profiling This feature allows user to do profiling for individual events. Figure 2. Transit . In this user can edit the mode for travel. Car 2. Figure 2. Options provided to select mode of travel: 1.2 View Scheduled Events The application gets the event data from Google calendar and displays the list of first ten events on application home page.2 Display Scheduled Events 2.2 shows the functional flow in application to display scheduled events. 4 2. priority and add comments for individual event. Google calendar with Extract event details event details from Google Calendar Display event list on Filter first ten events application home with some destination screen location on it.

Figure 2. then his/her location will be accessed at every five minutes of interval. For example. Date and Time. Venue. Based on profiling done.4 Settings A user can do the custom settings for following: 1. Tap on an event from Display the details of list event: Name of event.3 Profiling an Event 2. Bicycling By default the mode of travel is set to “car” and priority is “normal” for all events. Walking 4. Priority and Remarks for individual event and save the changes. Figure 2. . option to edit Mode of travel. if a user enters five minutes. GPS time: It is the interval of time at which user’s current location is checked. Priority Provide user an and Remarks. Mode of travel.3 shows the user actions to do profiling on an event. 5 3. user will be notified for an event with travel route to the event location.

Buffer time: It is additional time used to notify user before starting travel for event location. User’s current location is ‘X’. Notification will be sent 30(travel time) + 15(buffer time) = 45 mins prior to event start. 2. 6 2.5. Buffer time selected by user is 15 mins. The additional time is decided by user as per his/her convenience to prepare before start. Event start time Time to send notification = Event start time – (Buffer time + Travel time) For example: There is an event at 2:00 PM in the afternoon at location ‘Y’. Time at which notification will be sent = 2:00 PM – 0:45 mins = 1. 2. Travel time from ‘X’ to ‘Y’ (Mode of travel selected is “car”) is 30 mins. Buffer time 2.15 PM . Travel time to event location 3.1 Factors considered for notification time The following factors are considered in sending notifications to user: 1.5 Notifying User The notification feature of an application is responsible for dynamically notifying the user prior to start of event based on his/her current location.

4 Location Sharing with Others .6 Sharing Location with Others This feature allows user to share their location with friends and family. Once user creates a group user can see the location of members in that group on Google maps. Figure 2. And to view other friends location user has to add people in a group. Access user’s current Provide an option to location through GPS check-in current location Other person can see Create a group of friends the user’s last with whom you want to checked-in location share your location. To share their location. user has to check-in their current location. In this way user’s friend or family will be able know the user’s location with respect to event location. on Google maps.4 shows the location sharing flow. 7 2. The feature will be useful when an event is common between a group of friends or family members. Figure 2.

2 Hardware requirements 1. Android SDK 3. 4 GB RAM recommended 2. emulator system images. 1280 x 800 minimum screen resolution .7 System Requirements An android application can ideally be developed on any of the following platforms: 1. At least 1 GB for Android SDK. Java Development Kit (JDK) 7 or later version 2. 8 2. 2 GB RAM minimum. 400 MB hard disk space 3. Android Studio 2.7. OS X 3. Linux 2. Windows 2. and caches 4.7.1 Software requirements 1.

run-time environment. application frameworks. Each type serves a distinct purpose and has a distinct lifecycle that defines how the component is created and destroyed.xml. Broadcast receivers . 3. Activities 2. An android application is built of different types of components. Fragments 3. Services 4. content providers. libraries and Linux kernel [1]. services. The application components are activities. The operating system is developed by Google and is made open source so that users can extend the functionality and usefulness of applications. The stack components consist of applications. 9 Chapter 3 ANDROID FRAMEWORK AND SOFTWARE ENVIRONMENT Android is a platform architected in the form of a software stack. The android applications are developed in java using android software development kit [2]. broadcast receivers. This file has all the essential information about each component of the application and how they interact [3]. These components are loosely coupled by the application manifest file AndroidManifest.1 Components in Android Application Components used to build “RemindMySchedule” application are: 1.

MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.xml are “TabbedActivity”. only one can be in active state at a time.category.1 Activities An activity in android represents a single screen with which the user interacts. A single application can contain several activities that are bound together.LAUNCHER" /> </intent-filter> </activity> Others activity components declared in AndroidManifest. Among these several activities only can be the main activity which handles the main UI functionality when application is launched.intent. . Each time when a new activity starts previous activity is stopped but the data is preserved [4].xml. 10 3. “ProgramDetailActivity” and “ProgramEditActivity”.1.MAIN" /> <category android:name="android.action. The main activity in “RemindMyApplication” is named as “MainActivity”.intent. Though an application can have several activities. Intent filter in main activity describes the operation to be performed for an activity and type of intents to be received. <activity android:name=". The main activity is declared as following in AndroidManifest.

 Stopped: A stopped activity is not visible to user. it becomes active and is placed on the top of the stack. and will not come to the foreground again until user navigates back using the Back button so the next activity down on the stack moves up and becomes active [4]. An activity transition through four states while moving in and out of stack at the time of creation and destruction [4]:  Active or running: An activity in the foreground of the screen (at the top of the stack) receiving user input. When a new activity is started. 11 <activity android:name=". The previous activity always remains below it in the stack.TabbedActivity" android:label="@string/app_name" > </activity> <activity android:name=". but will remain in memory retaining all state information.  Paused: An activity is visible but will not have focus.ProgramEditActivity" android:label="@string/app_name"/> <activity android:name=". .ProgramDetailActivity" android:label="@string/title_activity_program_detail" /> All the activities of a running application are managed in an activity stack and every activity goes through series of states. The state of each Activity is determined by its position on the activity stack.

it’s inactive. Figure 3. 12  Inactive: An activity that is killed or not yet launched. Figure 3. An inactive activity does not exist on activity stack.1 shows the lifecycle of activity with call back methods that perform operations when activity moves between these states.1 Android Activity Life Cycle [5] .

a fragment’s code resembles a lot like an activity.  onCreateView() Used in all the three fragments to draw a UI. Each of these fragments has their own layout in the activity. The other callback methods of fragment lifecycle used in application are:  onAttach() Used in all three fragments to associate the fragment with activity. Fragments are like sub activities that can be reused in different activities [6]. A fragment’s life cycle is dependent on an activity’s life cycle as it resides in an activity. These modules are created using Fragment class within an activity.2 Fragments Fragment is a modular approach to design activity.1. A single activity can contain multiple fragments to build a multi-pane UI having their own layout and lifecycle. This method returns the root of fragment’s layout or null if the fragment does not provide a UI. To draw a UI layout for the first time onCreateView() callback method used. onStart(). The activity component “TabbedActivity” in “RemindMySchedule” application has three fragment modules named “HomeFragment”. onPause() and onStop() [6]. It contains similar call back methods like activity onCreate(). Fragments are mainly used to build a dynamic user interface where it is required to encapsulate UI components and behavior of activity into modules. . Also. “SettingsFragment” and “CheckInFragment”. 13 3. This method takes an activity as argument.

It is important to get hold on to object beyond the life of view so that the map can be used. It performs operation with long run-time in the background. The instance can be acquired using getMapAsync() method of SupportMapFragment class. A service does not have an independent thread.services.xml.3 Services Services does not require user interface. For example we can download some files or play music in background while getting involved in some other application [7]. “RemindMySchedule” uses two service components “BackgroundService” and “ShowNotificationService” declared as following in AndroidManifest. 14  onActivityCreated() This method is used in “Check-In” fragment to get an instance of Google map.ShowNotificationService" android:exported="false" <service/> . <service android:name=".1. When this method is called fragment becomes active. 3.services. The object of Google map obtained after onCreateView() method is associated with the view.BackgroundService" /> <service> android:name=".  onDetach() Overridden in all three fragments. Once this method is called a fragment is no longer associated with the activity.  onResume() Used in all fragments. it uses of the main thread from hosting process.

This class uses onHandleIntent() method to handle one intent at a time. And the value false in “android:exported” tells system that service can only be started by components of same application. Extending IntentService class It is a service subclass extended in “ShowNotificationService” to handle an asynchronous task of sending notifications.  Bound: An application component binds to a service by calling method bindService(). 15 In the above code snippet attribute “android:name” indicates the name of service subclass that implements service. 1. Typically a service can be in one of following two states [7]:  Started: A service is started when startService() is called by an application component. A bound service allows components to interact with the . 2. Extending Service class A service can handle intents on multiple threads simultaneously. even if the component that started service is destroyed. There are two classes- “Service” and “IntentService” that we can extend to create a started service [7]. It does not returns any results to caller. A service can run in the background indefinitely. thus once a service has done its task it stops itself. such as an activity. The service base class is extended in “BackgroundService” and is responsible for fetching scheduled event data from Google calendar and calculates distance and travel time to event location.

Figure 3. There are some call back methods which should be overridden depending upon the implementation. A service runs as long as application component is bound to it and gets destroyed once it is unbounded.2 Android Service Life Cycle [7] . onDestroy() [7]. onBind(). and get results within same or different processes. onCreate(). Some of the important call back methods in service are onStartCommand(). send requests. to handle the service lifecycle. 16 service. Figure 3.2 shows the lifecycle of a service.

so the is broadcast receiver will intercept this communication and initiate appropriate action [8]. After registering.1. Figure 3.4 Broadcast Receivers The broadcast receivers are used to register for system or application events. For example.3 Steps to Make BroadcastReceiver . 17 3.3 shows the two important steps to be done to make BroadcastReceiver works for the system broadcasted intents. Register for intents to observe Android System Broadcast Receiver Get notifications when intents occurs Figure 3. receivers will be notified about the events. applications initiate broadcasts to tell other applications that some data has been downloaded and is available for use.

18 A broadcast receiver can be registered either statically in android manifest file or dynamically with Context.BROADCAST_RESULT_FOR_SETTINGS). By doing this the result of check-in data on event details window will be consistent with the data on check-in tab. Following is the code snippet where results are broadcasted using a LocalBroadcastManager to settings tab.registerReceiver() method. The two dynamic broadcast receivers declared in “RemindMyschedule” are described as follows: 1. Intent intent = new Intent(Constants. In RemindMySchedule application two dynamically registered receivers are used that receive intents broadcasted by the system.getInstance(getApplicationContext()). Following is the code snippet of . The registered receiver for above intent set the selection of group to one selected in event detail window.sendBroadcast(intent). LocalBroadcastManager broadcaster = LocalBroadcastManager. the application context at that particular point is broadcasted as results to the setting window. As the application need to send broadcasts within same application LocalBroadcastManager class is used to register and send broadcast of intents. BROADCAST_RESULT_FOR_SETTINGS When user clicks on check-in button in event details window. broadcaster.

i++) { if(selectedGroup.getString(Constants. ArrayAdapter in the below code is used to convert list of array objects to vertical list of scrollable items.length. LocalBroadcastManager.i<groupNamesArray.equals(groupNamesArray[i])) { groupSpinner. } } } }.registerReceiver((receiver).layout. 2. the application context at that particular point is broadcasted as results to the check-in window same as it was broadcasted to settings window. groupNamesArray = allGroupsFromPreferences. Intent intent) { String selectedGroup = preferences. groupNamesArray). allGroupsFromPreferences = preferences. groupSpinner. BROADCAST_RESULT_FOR_CHECKIN When user clicks on check-in button in event details window.custom_spinner. for(int i=0. receiver = new BroadcastReceiver() { @Override public void onReceive(Context context. R.getString(Constants. ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity().setSelection(i).SELECTED_GROUP.split(":"). . break. Following is the code snippet where results are broadcasted using a LocalBroadcastManager to check-in tab.GROUP_NAMES.BROADCAST_RESULT_FOR_SETTINGS) ). new IntentFilter(Constants. 19 registered receiver for above intent.setAdapter(adapter).getInstance(getActivity()). ""). "").

20 LocalBroadcastManager broadcaster2 = LocalBroadcastManager.getString(Constants.getMyLocation().getInstance(getApplicationContext()). all the selected group members will receive an email from application account about the user’s checked-in location.getLongitude()).com/?q=" + googleMap.USERNAME. sd. preferences.USERNAME.put("updatedOn". "") + " have checked In to this Location at http://maps. The registered receiver for above intent updates and save the user’s check-in location on parse cloud. Intent intent2 = new Intent(Constants. } .BROADCAST_RESULT_FOR_CHECKIN). "") + " Checked In".getMyLocation().getMyLocation(). "Success". update.google.getMyLocation() != null) { javaApi. } }). To fetch the user current location ParseGeoPoint() method from parse android SDK is used. Apart from updating user information on parse cloud. Toast.getString(Constants.makeText(getActivity().getLatitude() + ".sendBroadcast(intent2).format(new Date())). To send the mail to desired recipients on user’s behalf from application’s email JavaMail API is used.sendMail(preferences.getLongitude())).saveInBackground((e) -> { if (e == null) { Toast.LENGTH_LONG).show(). googleMap." + googleMap. broadcaster2. intent) -> { if (googleMap!=null&&googleMap. Following is the code snippet of registered receiver for above intent. update.put("checkin". BroadcastReceiver receiver = (context. update. new ParseGeoPoint(googleMap.getMyLocation().getLatitude().

2 Setup for Android Application Development 3. "Location not found". 3. 21 else { Toast.makeText(getActivity(). And then.registerReceiver((receiver). } }.2. and required libraries to build Android . Android SDK An Android SDK is a software development kit that allows developers to create applications on the Android platform. JDK Software A Java Development Kit (JDK) is an environment for writing Java applications. Toast. development tools. 2. edit the JAVA_HOME from environment variables to point to directory where the JDK software is located. It consists of tools that developers need to compile. debugger.1 Prerequisite installations 1. LocalBroadcastManager. It includes sample source code.BROADCAST_RESULT_FOR_CHECKIN) ).getInstance(getActivity()).show(). One can download the appropriate setup version of JDK from Oracle’s website and follow the instructions of setup wizard to install and configure JDK. debug and run Java applications. an emulator.LENGTH_LONG). new IntentFilter(Constants.

It provides variety of useful features which makes android development much easier. We can download and install android SDK from android’s official website as an additional package that comes with android studio or the stand- alone SDK package [9]. Android Studio is an official integrated development environment supported by Google for Android application development. Android Studio IDE We can download the android studio IDE from android developer’s website by clicking on download link. have sample code templates to build common application features.exe file is downloaded click on the file and follow instructions on the setup wizard to complete installation [9]. After the . 3.4 Summarizes all the basic steps and development phases involved while developing an android application. . able to generate multiple apk file generation associated with same project and gradle-based build automation system [10]. 22 applications. Figure 3. providing code suggestions while writing the code. Some these features are – easy layout editing by dragging and dropping UI components.

23 Figure 3.4 Development Phases in an Android Application [11] .

24 3. Figure 3. To create a new android project on android studio click on start a new Android Studio Project from the Welcome to Android Studio screen.5 Starting New Android Project .5 shows the “Welcome to Android Studio” screen. Figure 3.3 Creating “Hello World” Sample Android Application Steps for creating a sample “Hello World” android application are as follows: 1.

Figure 3. 25 If a project is already opened select File\New Project from menu to create a new android project.6 shows the “New Project” screen. Click next for next part of the project setup.6 Creating New Android Project Configure the new project by entering the Application name and Company Domain in text field. Figure 3. The Project location holds the project files at specified location. The Package Name will automatically get changed based on the Application name and Company Domain which uniquely identifies an app among other apps. .

Figure 3. 3. Click the Finish button at bottom right of the window.7 shows a sample “Hello World” app. The android project now created is simply a “Hello World” app with some auto generated files. layout name. The next screen “Target Android Devices” allows user to select the target android device for which app will be developed. title for activity and menu resource name as desired. Figure 3.7 “Hello World” Android Application . Select a blank activity from “Add an activity to Mobile” window and click next. Then from “Customize the Activity” window user can customize an activity by changing activity name. Click next. 4. The SDK selected from drop down menu is the minimum version of Android required to run the app being developed. 26 2. The option Phone and Tablet is preselected as the default.

Figure 3. 27 Figure 3.8 shows the layout of default files generated while creating a sample “Hello World” application.8 Default File Layout .

3. The application will get installed and started by android studio on the connected device [12]. Select the launch emulator option on “Choose device” window. Then select the system image for AVD and click next. Then select the AVD created and click ok. select the required device configurations and click next.4 Running the App An android application can be run on a physical device with android platform or on an emulator. 28 3. Verify the configuration and click finish. Click on run from the toolbar after AVD is created. then enable USB debugging on device from settings > about phone and tap on build number a couple of times until debugger mode is enabled. Choose the connected running device under “Choose device” window and click ok. it is required to create an android virtual device (AVD) under Tools > Android > AVD Manager. .1 Installing and running an app on physical device Connect the device with system through USB cable.2 Running an app on emulator To run an app on emulator. Click run from the toolbar.4. The emulator will get loaded automatically in few minutes [12].4. 3.

1 shows the login screen popped up while installing application.1. 29 Chapter 4 FEATURES IMPLEMENTATION – REMINDMYSCHEDULE 4. The information entered at login screen is associated with other details such as user’s check-in location so that they can share location with other app users.1 Login information The application installation requires user of app to enter his “name” and “email address” at login screen.1 Application Installation 4. Figure 4. Figure 4.1 Application Installation – Login Screen .

TabbedActivity.saveInBackground(new SaveCallback() { @Override public void done(ParseException e) { if(e==null) { edit. userDetails.toString()).toString()). edit.putString(Constants. ParseObject “userDetails” contains two key-value pairs one for name and the other for email. getActivity(). Following is the code snippet for login screen."Some issue with server".getText(). } } }).makeText(getActivity().getText(). .toString()).put("email". Intent intent = new Intent(getActivity().LENGTH_LONG). startActivity(intent). Once the key-value pairs are set data can be saved on backend using saveInBackground() method.email.show().EMAIL.email.name. userDetails. 30 The data entered by user at login screen is stored on parse cloud.put("name". } else { Toast.toString()).putString(Constants. userDetails. edit.getText().USERNAME.getText(). and to do this data is built around ParseObject named “userDetails”.class). name.commit().Toast.finish().

1.2 Choose an account Once user has entered the login information user is prompted to choose an account. Figure 4.2 shows the screen where user is asked to choose an account. 31 4.2 Choose an Account . The account selected will be synchronization with Google calendar. Figure 4.

case REQUEST_AUTHORIZATION: if (resultCode != getActivity().edit(). After the user choose an account and clicks OK.RESULT_CANCELED) { mStatusText. .setSelectedAccountName(accountName). editor. It provides access to a centralized database which contains the registry of user's online accounts. } } else if (resultCode == getActivity().getStringExtra(AccountManager. editor. 32 To make an account selection and managing authorization of the account Google AccountManager Class is used. the Google account name will get set by using setSelectedAccountName() method of class GoogleAccountCredential. } break.RESULT_OK && data != null && data.KEY_ACCOUNT_NAME). if (accountName != null) { credential."). SharedPreferences.commit(). case REQUEST_ACCOUNT_PICKER: if (resultCode == getActivity().getExtras() != null) { String accountName = data.putString(PREF_ACCOUNT_NAME. accountName).Editor editor = settings. SharedPreferences settings = preferences.setText("Account unspecified. Below is the functional flow of code where user selects an account.RESULT_OK) { chooseAccount(). } break.

2 Application Home Page The application home page will display the list of upcoming events. PagerTitleStrip. . The template includes three fragment sections. SectionPagerAdapter to manage section fragments and ViewPager to host the section contents.3 Application Home Page The application user interface is designed as a tabbed activity in which user can navigate across the tabs by swiping over views with a title strip on top. 33 4. Figure 4. It extracts/sync events information from Google calendar using Google calendar API. Figure 4.3 shows the list of events on application home page.

println("DISTANCE FROM:" + program. for (Program program : listOfPrograms) { TravelDuration distance = getDistanceAndTime(program.printStackTrace()..getLatitude() + "Long:" + params[0]. params) { try { singleLocation = params[0]. } catch (UserRecoverableAuthIOException userRecoverableException) { userRecoverableException. params[0]). } catch (Exception e) { e.getLocation() + "--> TO: lat:" + params[0]. System. To publish the results on main UI window ArrayAdapter is used. Once the background thread finishes its task onPostExecute() method is called which publishes the result in main UI thread. The following code snippet shows the background operations performed by doInBackground() method.printStackTrace(). travelDurations.printStackTrace().getLongitude() + "-->" + distance. protected List<Program> doInBackground(SingleLocation.add(distance).getSeconds()).. } . listOfPrograms = getDataFromApi(). The Array adapter converts an ArrayList of objects into View items loaded into the ListView (visual representation) container. It allows fetching of event data from Google calendar using Google calendar API call in background using doInbackground() method which ensures that UI stays responsive.out.getDuration()+" -->"+distance. 34 To extract the event data from Google calendar AsyncTask class is used. } return null. } } catch (final GooglePlayServicesAvailabilityIOException availabilityException) { availabilityException.

Figure 4. 3.3 Event Details RemindMySchedule application allows user to view event details.4 shows the event details window. 2. When user select an event from upcoming event list on application home page event details will be displayed for that event. View event location and travel route. Check-in and see other user group location. Figure 4.4 Event Details The user is able to do following from event details window: 1. Set policies for an event by editing the event details. . View event date and time. 4. 35 4.

36 4.com/maps?f=d&daddr=" + program.ACTION_VIEW. 4. User can view the route information by clicking on navigate button. .Intent. This feature helps user to get a prior idea of event location about how far it is from his current location.getLocation())).1 Event date and time User can find the event date and start time on event details window when user tap on an event.parse("http://maps.3. Following is the code snippet demonstrating the application behavior when user clicks on navigate button on event details window. } }). When user clicks on “navigate” button intent named “notificationIntent” is created to start a new activity as Google maps with route details from current location to event location.google.OnClickListener() { @Override public void onClick(View view) { Intent notificationIntent = new Intent(android.2 Travel route Event details window also provides the travel route information to user to have a quick look on routed path in Google maps. startActivity(notificationIntent).content. navigate. Uri.setOnClickListener(new View.3.

TabbedActivity.SELECTED_GROUP.putString(Constants.setCurrentItem(2).3 Check-in This will allow user to check-in his current location and also user can see other application user’s location. And the ActivityResult is propagated back to whoever launched the activity using onActivityResult() internally.edit()."").commit(). String groupSelected = preferences.setOnClickListener((view) -> { finish(). 37 4. preferences.getId().3. Also the selected group information form event details window is saved. } }). Once the selected group information is saved TabbedActivity current position is set to Check-In fragment and sendResult() method is called which broadcasts the results to “Settings” and “Check-In” fragment using LocalBroadcastManager. When user clicks on “Check In” button the current activity is closed using finish() method. sendResult(). checkin. .mViewPager.groupSelected) .getString("GROUPNAME"+program. Following is the code to show the application behavior when check-in button is clicked from event details window.

2. Once user clicks on edit button user will be prompted with editable fields for following: 1. high and low. public void sendResult() { LocalBroadcastManager broadcaster = LocalBroadcastManager. . To set policies for an event click on edit icon in event details screen.BROADCAST_RESULT_FOR_SETTINGS).getInstance(getApplicationContext()). Priority of schedule: A priority can be set to either normal. The “intent” is created to broadcast result to “Settings” fragment and “intent2” is created to broadcast result to “Check-In” fragment. Travel mode could be any of the four travel modes driving. Mode to travel: In mode of travel user can specify the transportation mode to be used by him/her for individual events. Intent intent = new Intent(Constants.sendBroadcast(intent). } 4.sendBroadcast(intent2). bicycling and transit provided by Google maps.4 Setting policies for an event RemindMySchedule allows user to set policies for specific event.3. 38 Following is the code for sendResult() method where to intents are created named “intent” and “intent2”. broadcaster.BROADCAST_RESULT_FOR_CHECKIN). LocalBroadcastManager broadcaster2 = LocalBroadcastManager.getInstance(getApplicationContext()). Intent intent2 = new Intent(Constants. walking. broadcaster2.

. Following code shows the tasks performed while edit button is clicked for example “View” of the fields changed to editable text or a spinner. Remarks Figure 4. 4.5 Set Event Policies When user clicks on “edit” icon all the event policies description will replaced by editable fields and the save button icon will be visible in place of an edit icon. Location sharing group: In this user can select a group with whom he want to share his location and vice versa. 39 3.5 shows the edit window for a selected event Figure 4.

setSelection(program.GONE).setVisibility(View.setVisibility(View. groupspinner. 40 edit.setImageResource(android. remarksEditText. modeofcommutespinner.GONE). remarksEditText.1).equals(groupName)) { groupspinner.1).setVisibility(View. break.setSelection(i). isEdit = false. group. priorityspinner. } else { for (int i = 0.setSelection(program.GONE).setSelection(0).getRemarks()). String groupName = preferences.setVisibility(View. priorityspinner.VISIBLE). null).setVisibility(View. remarks. modeofcommute.length.VISIBLE).VISIBLE).drawable.GONE).getPriority() .getString("GROUPNAME" +program. if (groupName == null) { groupspinner.setText(program.setVisibility(View. } } } } . i++) { if (groupNamesArray[i]. modeofcommutespinner.setOnClickListener((v) -> { if (isEdit) { edit.getId().setVisibility(View. i < groupNamesArray.ic_menu_save).R.getWayOfCommute() .VISIBLE).setVisibility(View. priority.

getText().commit().putString(Constants.show(). GPS time in minutes: It is the time interval at which user’s current location is accessed.toString()).toString().BUFFER_TIME. The reminder settings can be done from “Settings” tab. . save. "Saved successfully". Toast.toString()).putString(Constants. edit.getText().4 Reminder Settings This feature allows user to do profiling on reminder settings.getText(). edit. a user can simply type in the GPS time and Buffer time as desired. For example buffer time could be the time required by user to wrap up things and prepare for the event. Toast.makeText(getActivity(). Buffer time in minutes: It is additional time entered by user as per his convenience. The above mentioned profiling options are provided in editable form to user.LENGTH_LONG). 41 4.putString(Constants.toString()).SHOOTING_EMAIL_ADDRESS. edit. createAlarm(getActivity()).putString(Constants. Once all changes are done user can save the changes by clicking on “Save” button at bottom of the window. 2. Following is the code snippet for saving the changes done on “Settings” fragment. gpsTime. Profiling options include the following: 1.GPS_TIME. bufferTime.name.getText(). Also user can edit the “Username” and add members in a group by adding their email ids in selected group. edit. emailAddresses.setOnClickListener((v) -> { edit.trim()).USERNAME.

protected void startLocationUpdates() { LocationServices.requestLocationUpdates(mGoogleApiClient. Access user’s current location at specified intervals. User can navigate to the event location by clicking on notification sent. this). 42 4. This API registers for the location updates using a public method called requestLocationUpdates(). if (!manager. } } . Notification also includes the travel route information for users to start navigation. mLocationRequest. device’s last known location is requested using one of the Google Play services location APIs called FusedLocationAPi.isProviderEnabled(LocationManager.GPS_PROVIDER)) { stopCurrentService().LOCATION_SERVICE). The dynamic notification helps user to reach their event location on time.FusedLocationApi.5 Show Notifications The application provides a feature to send dynamic notifications to user based on his current location and mode of travel. Following is the code showing how to get the location of application user using services provided by Google. To access last known location of user. To send dynamic notifications to user the application will run following tasks in the background: 1. final LocationManager manager = (LocationManager) getSystemService(Context.

append("origins=").googleapis.append("&destinations=").").com/maps/api/distancematrix/json?” is used.toString()).getLocation()).getLongitude()).googleapis. URL url = null. urlString.append(wayOfcommuteString). Response to request is returned in the JSON format. urlString.append(".append("&sensor=true"). urlString.append(program. destination (event location). urlString. The travel time and distance between source and destination points is retrieved in background using Google maps Distance Matrix API. .append("&key=AIzaSyA-Mli_vdtLODqOhizc9ew7oLUFHxu-uog").append("https://maps.//from urlString.//to urlString.com/maps/api/distancematrix/json?").append(location. urlString. JSON in the url indicates the form of output.replace(" ". Log. Calculate travel time between user’s current location and an event location. 43 2. url = new URL(urlString. In following code we see that required parameter append to url are origin (user’s current location). urlString.getLatitude()).toString(). To make a request to retrieve data url of form “https://maps.toString()). "%20")). mode of commute and application’s API key. The url is then appended with the required parameters using StringBuilder.append("&mode="). // get the JSON And parse it to get the directions data.out. "URL=" + urlString. StringBuilder urlString = new StringBuilder().d("xxx". urlString.println("URL=" + urlString. HttpURLConnection urlConnection = null. System. urlString. urlString.append(location. The response received is then parsed for text and value fields which indicate travel time and distance respectively.

//Log.getJSONArray("rows"). //Sortout JSONresponse JSONObject object = (JSONObject) new JSONTokener(response). return travelDuration. travelDuration.setSeconds(iDistance).toString()).disconnect().getJSONObject(0). //Log.toString()). int iDistance = distance.getString("text").readLine()) != null) { response += temp. JSONObject steps = legs.getJSONArray("elements"). JSONArray array = object."steps: "+steps.toString()). 44 urlConnection = (HttpURLConnection) url. urlConnection.d("JSON". } bReader. inStream.setDoOutput(true).getJSONObject(0). //Log.d("JSON". JSONObject distance = steps. //Routes is a combination of objects and arrays JSONObject routes = array."legs: "+legs.getInputStream(). .toString()).getInt("value").nextValue(). InputStream inStream = urlConnection. response = "". TravelDuration travelDuration = new TravelDuration().d("JSON". String temp. travelDuration. urlConnection.setDoInput(true).getJSONObject("duration")."routes: "+routes. JSONArray legs = routes. BufferedReader bReader = new BufferedReader(new InputStreamReader(inStream)).d("JSON". String sDistance = distance. while ((temp = bReader.setDuration(sDistance). urlConnection.d("JSON".toString()). //Log.connect(). urlConnection. //Log.close().close().openConnection()."distance: "+distance.setRequestMethod("GET"). urlConnection."array: "+array.

The above two factors ensures that user gets notified prior enough so that they can be on or before the scheduled time. Travel time required with respect to mode of travel selected.5. 45 4.getService() is used to broadcast and wakeup device. . This class allows scheduling an alarm for application that will still be valid even when application is not in a running state or device is asleep. Time to show notification = EventTime – (time required to commute + buffer time) To setup the reminder for an event “AlarmManager” class is used.1 Time to send notification The time to send dynamic notifications depends on following: 1. When the alarm goes off PendingIntent. The explicit intent is again wrapped within a PendingIntent “alarmIntent”. 2. Following code snippet shows the code for method showNotificationForDuration() to calculate “timeToShowNotification” and to set alarm for an upcoming event. For this an explicit intent is created describing the service to be started. Additional buffer time entered by user.

46 private void showNotificationForDuration(List<Program> listOfPrograms. System.getDate()). System.currentTime).out.getSeconds() * 1000). } . long currentTime = new Date(). TravelDuration travelDuration = travelDurations. settings. System.putInt(program.println("Current Date-->" + new Date() + " In Milliseconds-->" + currentTime). i++) { Program program = listOfPrograms. System. SingleLocation singleLocation) { if (listOfPrograms != null && travelDurations != null) { for (int i = 0.getTime().out. long timeRequiredToCommute = (travelDuration. long eventTime = getMillisecondsFromDate(program.commit(). int id = settings.get(i).size().out.getInt(program.println("Time Remaining-->" + timeRemaining/(60*1000)+"minutes"). if(id==0) { id=(int)new Date().println("Program Date-->" + program.out. List<TravelDuration> travelDurations.getId().id). long timeRemaining = (eventTime .0).getDate() + " In Milliseconds-->" + eventTime). i < listOfPrograms.edit().getId().get(i).getTime().println("Time Required For Commute-->" + timeRequiredToCommute/(60*1000)+"minutes").

ALARMSET.getInstance().TRAVEL_DURATION. String programJson = gson.toJson(program.class). 0).getService(this. intent.RTC_WAKEUP. PendingIntent alarmIntent = PendingIntent.PROGRAM.Program.println("Notification Date" + new Date(timeToShowNotification).getBoolean(program.travelDurationJson). intent.class). id.false)) { Gson gson = new Gson(). } } } } .ALARM_SERVICE). calendar.putExtra(Constants.class).singleLocationJson).getString(Constants. System. AlarmManager alarmMgr = (AlarmManager) getSystemService(Context. ShowNotificationService.programJson).set(AlarmManager.out.toJson(singleLocation.setTimeInMillis(timeToShowNotification).SingleLocation.getId()+Constants. intent.putExtra(Constants. String singleLocationJson = gson. 47 if(!settings. long bufferTime = Integer.putExtra(Constants.class).SINGLE_LOCATION.toString())."30"))*60*1000. Calendar calendar = Calendar.toJson(travelDuration. alarmMgr. timeRequiredToCommute+=bufferTime. long timeToShowNotification = eventTime . calendar.timeRequiredToCommute. intent. String travelDurationJson = gson.getTimeInMillis().BUFFER_TIME.TravelDuration. alarmIntent).parseInt(settings. Intent intent = new Intent(this.

To implement this feature parse android SDK is used. This feature is very useful when user needs to share their location with group of friends while user is driving.6 Check-In and Location Sharing RemindMySchedule also allows user to share their location among group of friends. 48 4. Once the data is stored using saveInBackground() parse automatically creates a class and its objectId which is used to distinguish different sorts of data. Each app build using parse has application id and client key applied to SDK install [13]. and parse backend will store data. It eliminates the need of maintaining servers by providing complete backend solution. Each ParseObject has key- value pairs of JSON-compatible data. send push notifications and manage users. This SDK allows developer to build a full-featured android app to store data. and his current location will be broadcasted among the selected group of friends. For saving data on parse cloud saveInBackground() method is used. . For data storing developer has to simply set key- value pairs. The code snippet shows functional flow of application when a user checks-in his location. To store user’s location data on parse ParseObject is used. This avoids unnecessary call and messages. or engaged in some other work. The objectId created at the time of saving data on clouds is to retrieve data using a ParseQuery [13]. By using this feature all users have to do is check-in.

preferences.getLongitude())).id.put("updatedOn".getMyLocation() != null) { javaApi.sd. false). "Success".setOnClickListener((view) -> { if (googleMap != null) { if (googleMap." + googleMap.USERNAME.getParent().LENGTH_LONG). Bundle savedInstanceState) { if (rootView != null) { ViewGroup parent = (ViewGroup) rootView. } catch (InflateException e) { /* map is already there.getLatitude().sendMail(preferences. 49 public View onCreateView(LayoutInflater inflater. update. "") + " have checked In to this Location at http://maps. } try { rootView = inflater.removeView(rootView). new ParseGeoPoint(googleMap. ViewGroup container.com/?q=" + googleMap. update.show(). } }). checkIn.put("checkin".findViewById(R.inflate(R.makeText(getActivity(). update.getString(Constants.format(new Date())).getMyLocation().getString(Constants.getMyLocation(). googleMap.getMyLocation().getLatitude() + ".USERNAME.google. Toast. } . if (parent != null) parent.layout.getLongitude()). "") + " Checked In".getMyLocation().checkin).saveInBackground((e) -> { if (e == null) { Toast. container. just return view as it is */ } // Inflate the layout for this fragment Button checkIn = (Button) rootView.fragment_check_in2.

makeText(getActivity(). } return rootView. "Wait for the location".6 shows the location check-In window Figure 4.6 Location Check-In .show().LENGTH_LONG). } } }). 50 else { Toast. if (googleMap != null) { plotGeoPoints(). } Figure 4. Toast.

7 shows the create group window.6. Figure 4. 51 4. iii) Type the group name in “create new group” section and then click create. Figure 4.7 Create New Group . Create a group: To create a group follow the below steps: i) Go to settings. ii) Click on edit button under recipients section.1 Location sharing among group of friends Steps of share location among group of friends are: 1.

Figure 4. 4. Type the email address of friends separated by “. Click save button.” to add them in selected group. Figure 4. Select a group from drop down. 52 2.8 shows selecting a group from drop down and email address of the people in the selected group.8 Selecting Group and Adding Friends to Group . 3.

This query returns the objects with acceptable values satisfying the query criteria. Once the user clicks on check-in button they will be redirected to check-in window with marked location of selected group members for an event. b) Or user can also view the event specific check-in information among group of friends or family from event details window by clicking on check-in button. The emails id’s of the selected group members is extracted from parse cloud using ParseQuery “query. And to associate latitude and longitude coordinates with an object “ParseGeoPoint” is used. List of objects returned from ParseQuery is individually parsed to get the check-In information associated with each application user. . ii. The Google map integrated in check-in tab will show the marked location of friends in a group. A user can view the check-in location of other users by following two ways: a) Go to check-in tab to see the location of friends in a group. The method plotGeoPoints() is implemented to mark the location of selected group of friends.whereContainedIn()”. This method does the following task to plot location of friends on integrated Google map: i. To see the zoom-in location of a friend tap on the name and location of selected friend will be zoomed in. 53 5.

emails). 54 iii.SELECTED_GROUP. ""). ""). String emailString = preferences.getQuery("UserDetails").VISIBLE). mySet).animateCamera() is used.setVisibility(View. Below is the code snippet of plotting geographic location of friends. i < emails. } .whereContainedIn("email".split(". Set<String> mySet = new HashSet<String>(). for (int i = 0.clear()."). ParseQuery<ParseObject> query = ParseQuery. Collections. String[] emails = emailString. iv. so that application user can have a closer look of friends location on map.getString(Constants.addAll(mySet. public void plotGeoPoints() { if (googleMap != null) { googleMap.addMarker() method is used to mark the position on map.getString(preferences. To zoom in marked location GoogleMap. Once the latitude and longitude position of object is known GoogleMap. i++) { query.length. names.

valueOf(parseObject.position(position). markerOptions. LinearLayout.addMarker(markerOptions). textView. googleMap. markerOptions. " + parseGeoPoint.valueOf(parseObject.get("name"))). parseGeoPoint.setMargins(0.setLayoutParams(llp). } } }). markerOptions. }).LayoutParams.get("updatedOn"))). 55 query. 0.getLongitude() + " at " + String. markerOptions.addView(textView). if (parseGeoPoint != null) { final LatLng position = new LatLng(parseGeoPoint. textView.setTypeface(null.LayoutParams.setText(String.getLatitude().valueOf(parseObject.setOnClickListener( (v) -> { moveToCurrentLocation(position).d rawable. textView.getLatitude() + ".LayoutParams llp = new LinearLayout.setTextSize(20).icon(BitmapDescriptorFactory.get("checkin").get("name"))). 10. textView. names.getLongitude()).BOLD).LayoutParams(LinearLayout. TextView textView = new TextView(getActivity()).get("name"))))). } } . String.WRAP_CONTENT). textView. for (ParseObject parseObject : objects) { ParseGeoPoint parseGeoPoint = (ParseGeoPoint) parseObject. textView.snippet("Location " + parseGeoPoint.ic_mymarker.fromBitmap(drawTextToBitmap(R. 0). MarkerOptions markerOptions = new MarkerOptions().setTextColor(Color.findInBackground((objects.removeAllViews().valueOf(parseObject. e) -> { names.BLUE).WRAP_CONTENT. llp. Typeface. LinearLayout.title(String.

1.9 Event Details with Default Policies and Settings .1 Dynamic notification To validate the feature of dynamic notification some dummy event entries are added to Google calendar. The upcoming event entries are then used to test the dynamic notification for events with default policies and settings.7 Application Testing 4. Steps performed to validate the dynamic notifications for events with default policies and settings are as follows: a) Figure 4. 56 4. and also for the customized ones to verify the full functionality of dynamic notification based on mode of commute. These event details are synchronized and displayed on “RemindMySchedule” application. Figure 4.7.9 shows an upcoming event details with default policies and settings.

Figure 4. This step is performed to verify the correctness of time at which notification is sent to user.11 shows the dynamic notification for above scheduled event.10 shows the travel time to event location when mode of commute is car.11 Dynamic Notication for an Event with Default Policies and Settings . Figure 4.10 Travel Time to an Event with Default Policies and Settings c) Figure 4. 57 b) Figure 4.

Event start time = 11:30 PM (from figure 4. Figure 4.10) Time to show notification = Event time – (Travel time + Buffer time) = 11:30 PM – (4 minutes + 30 minutes) = 10:56 PM 2.9) Travel time = 4 minutes (from figure 4.9) GPS frequency (in minutes) = 1 (default) (from figure 4.9) Buffer time (in minutes) = 30 (default) (from figure 4.9) Priority = Normal (default) (from figure 4.12 shows an upcoming event details with customized policies and settings.12 Event Details with Customized Policies and Settings . Steps performed to validate the dynamic notifications for customized event policies and settings are as follows: a) Figure 4.9 ) Mode of Commute = Car (default) (from figure 4. 58 d) Verifying the accuracy of time at which dynamic notification is sent.

14 shows the dynamic notification for above scheduled event.14 Dynamic Notification for an Event with Customized Policies and Settings .13 shows the travel time to event location when mode of commute is walking.13 Travel Time to an Event with Customized Policies and Settings c) Figure 4. This step is performed to verify the correctness of time at which notification is sent to user. Figure 4. Figure 4. 59 b) Figure 4.

To validate this feature application is installed among group of users located at different parts of country.7. 60 d) Verifying the accuracy of time at which dynamic notification is sent.12) Priority = Normal (default) (from figure 4.12) Buffer time (in minutes) = 20 (from figure 4. Steps performed for validation are as follows: 1.2 Location sharing The location sharing feature of “RemindMySchedule” application is used to share location between groups of friends having common events.12) Travel time = 26 minutes (from figure 4. Both application users create their own group and select the relevant group to a common event from event details window. A common event “Group Study” is created by two users: Vineeta and Chandler.12) GPS frequency (in minutes) = 1 (default) (from figure 4.13) Time to show notification = Event time – (Travel time + Buffer time) = 3:00 PM – (26 minutes + 20 minutes) = 2:14 PM 4.12) Mode of Commute = Walking (from figure 4. Event start time = 3:00 PM (from figure 4. .

Selected group by User1: Group1 Selected group by User2: Friends .15 Event Details Window of Two Different Users Note: While creating group user can give any name to group as they like. 61 Figure 4.15 shows the event details window of a common event between two different users. User 1: Vineeta User 2: Chandler Figure 4.

62

Figure 4.16 shows the members of selected group on event details window for both

users.

User 1: Vineeta User 2: Chandler

Figure 4.16 Selected Group Members of Two Different Users

Note: The group members were added using email id of the users.

Members added to “Group1” by User 1 (Vineeta): Chandler , Prasanth

Members added to “Friends” by User 2 (Chandler): Vineeta, Prasanth

63

2. The two application users check-in their location from associated event details

window. The checked in location of users is then broadcasted among members. And

users in a group will be able to see each other’s location.

Figure 4.17 shows the check-in window of two different users from the group.

User 1: Vineeta User 2: Chandler

Figure 4.17 Check-In Window of Two Different Users

64

4.8 Future Work

This application intelligently notifies user about the event prior enough so that user can

reach event location on time. It also provides the travel route information by

automatically extracting the event location from database so that user does not have to

separately navigate for event location. The accuracy and efficiency of application to send

dynamic notifications relies upon the profiling done by user. The accuracy of notification

is directly depended upon the frequency of location access. More frequently the location

is accessed more accurate is the result. But frequent location access while application

runs in background could reduce the battery life of device. To prevent this application

can be optimized with an adaptive approach or some algorithm for location check to save

the battery life. The algorithm design should allow application to automatically adjust

the frequency of location check based on event day, time and time left for event.

This application also offers an important feature of location sharing among friends. 65 Chapter 5 CONCLUSION This application is intended to be more useful than existing schedule reminder application by offering dynamic notifications to user. It runs in background to access user’s current location and also calculates the travel time needed depending upon the mode of commute. . The calculation results are then used to notify user dynamically. The feature is developed using parse SDK for android. The application manages the event schedules for user by keeping track of all the scheduled events.

" [Online]. "Application Fundamentals | Android Developers." [Online]." [Online]. Accessed in July 2015.android. [6] Google Inc.com/guide/components/fragments.com/guide/components/activities.com/2013/03/30/android-project- structure/.html.android. Accessed in July 2015. Available: https://bestandroidtraining.wikipedia.com/index.html. Available: http://developer." [Online].com/guide/components/fundamentals.wordpress.techotopia. . [3] Google Inc. [4] Google Inc.html." [Online]." [Online]. Accessed in October 2015. Accessed in July 2015. "An Overview of the Android Architecture. 66 REFERENCES [1] Techotopia. Available: http://www.org/wiki/Android_software_development. "Android Project Structure and Activity Life Cycle. Available: http://developer. Accessed in October 2015. Available: https://en.php/An_Overview_of_the_Android_Architecture. Available: http://developer.android. "Android software development. [2] Wikipedia. Accessed in October 2015. [5] Best android training. "Fragments | Android Developers. "Activities | Android Developers.

com/guide/components/services.android. Accessed in July 2015. Accessed in July 2015. 67 [7] Google Inc. "Android Studio Overview | Android Developers.com/tools/workflow/index. Available: http://developer." [Online]. [8] Google Inc.com/tools/studio/index.html. Accessed in November 2015. Available: http://developer. Available: http://developer.android.html.android.com/reference/android/content/BroadcastReceiver." [Online]. . "Installing the Android SDK | Android Developers." [Online]. Accessed in July 2015.html.html." [Online].android. [10] Google Inc. Accessed in October 2015. [9] Google Inc.html. "BroadcastReceiver | Android Developers.android.html.com/training/basics/firstapp/running-app. Available: https://parse. Available: http://developer. "Developer Workflow | Android Developers. "Android Developers Guide.com/sdk/installing/index. [11] Google Inc." [Online]. "Services | Android Developers.android. Accessed in November 2015. [13] Parse. [12] Google Inc.com/docs/android/guide. Available: http://developer. Available: http://developer. "Running Your App | Android Developers." [Online]. Accessed in November 2015." [Online].