android app development - senior project presentation

19
Android App Development: The Different Functions of Programming Senior Project 2016 by Rohan Gupta

Upload: rohan-gupta

Post on 20-Feb-2017

142 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Android App Development - Senior Project Presentation

Android App Development: The Different Functions

of ProgrammingSenior Project 2016 by Rohan Gupta

Page 2: Android App Development - Senior Project Presentation

2

Background• Experienced Java programmer (I took Introduction

to Programming, AP Computer Science, and Post AP Computer Science in school)

• Challenge: How do I connect the skills I attained in the classroom to a very different programming project without a lot of assistance?

o I don’t know a lot of information in order to complete the project

o The only form of assistance I used is online sources

Page 3: Android App Development - Senior Project Presentation

3

Objectives• Two primary objectives for my Android app:1. To record previous addresses/locations in order to trace significant places you would want to visit again2. To record people who you have interacted with and/or been with in order to contact them at a later point If you would like to record the address of the individual, this

component would be integrated into the first objectiveBoth purposes will have information recorded on a secure, private server that can be accessed by the user only (this addresses the issue of privacy, which many of my peers thought this app would be used for the NSA)Accessibility: The server can be opened on multiple digital devices, such as computers and tablets, from any location

Page 4: Android App Development - Senior Project Presentation

4

Language and IDE• The official language for Android development is Java. Large parts

of Android are written in Java and its APIs are designed to be called primarily from Java.

• The Integrated Development Environment (IDE) I used is Android Studio and its accompanying Software Development kit (SDK)

• Android Studio supports many application program interfaces (API)Simple Vocabulary:• IDE – a programming environment that consists of other helpful

support systems, such as a code editor, a compiler, a debugger, and a graphical user interface (GUI) builder

• SDK – a set of software development tools that make application development easier on a computer operating system

• API – specifies how software components (methods, classes, etc.) should interact with the programming environment; all languages have an API

Page 5: Android App Development - Senior Project Presentation

5

Location Awareness• Using the Google Play services location API, my app has

the ability to access the current location, to retrieve periodic location updates, and to search addresses.

• After successfully specifying app permission and connecting to Google Play, I can track the previous location of the user within a certain radius

• The accuracy of the location depends on the value that the API returns

ACCESS_FINE_LOCATION determines the location with an accuracy of approximately a meterACCESS_COARSE_LOCATION determines the location with an accuracy equivalent to approximately a city block

Page 6: Android App Development - Senior Project Presentation

6

Location Specifics• Question: How does an app recognize which locations to record on

the phone’s server and which to ignore?Characteristics taken into account when figuring out which location to store:o Distance (involves geofencing) – the farther the location is from

the original location, the more likely the app will store that location’s address

o Time interval (a measure of distance) – the longer it takes to travel to the location, the more likely the app will record that location’s address

o Frequency of visits – the more an individual visits a certain location, the more the app will “ignore” that location

o Time spent at location of interest – the longer time spent at a location (combined with other characteristics), the more likely the app will record that location’s address

Page 7: Android App Development - Senior Project Presentation

7

Creating and Monitoring Geofences• Geofencing combines awareness of the user’s

current location with awareness of the user’s proximity to locations that may be of interest

Page 8: Android App Development - Senior Project Presentation

8

Purpose of Geofencing• The purpose of geofencing is to prevent data

overload and to maximize efficiency by marking the most frequent visits and the area around it in order to record other locations of interest or to ignore some of the locations that are common for the user

Page 9: Android App Development - Senior Project Presentation

9

Baseball MetaphorGenerally speaking, the majority of the “hits” happens inside the baseball field (i.e. single, double, triple) , but sometimes there are home runs, which are balls that travel outside the baseball field. A geofence would be established around the baseball field because most of the balls land within this region, and there will be smaller geofences where most of the homeruns are hit as well Geofencing is based on probability, and is a useful tool to estimate the user’s locations

Page 10: Android App Development - Senior Project Presentation

10

Location Awareness Example

• Example: Let’s say that an individual is travelling from The Overlake School to a store in the Redmond Town Center, and back to the school (a daily routine)

o The app will evaluate all the characteristics of location awareness that I mentioned and establish a geofence during its initiation process

• Conclusion: It does not record any of the location’s addresses

Page 11: Android App Development - Senior Project Presentation

11

Page 12: Android App Development - Senior Project Presentation

12

Another Example• Let’s say that an individual is travelling from The

Overlake School to the Space Needle in Seattle for the first time

o The app will evaluate all the characteristics that I mentioned before and determine that it is a valid location to record

• Conclusion: It will record the address of the Space Needle, but not the address of the school because it is within a geofence

Page 13: Android App Development - Senior Project Presentation

13

Page 14: Android App Development - Senior Project Presentation

14

Converting Coordinates to

Address• Android Studio has various classes and methods

that allows for the conversion of geographic coordinates into street addresses

• The Geocoder class and various methods, such as getFromLocation() convert longitude and latitude coordinates into addresses

Page 15: Android App Development - Senior Project Presentation

15

Transferring Contact Information

• Example: Let’s say you want to keep in touch with a former colleague who you met last week, but forgot to exchange phone numbers and/or email addresses.

This can easily be done through network communication or client-server communication.

This will involve generic file operations, such as InputStream and OutputStream, which reads the content of the file and transfers it into a mobile device

Page 16: Android App Development - Senior Project Presentation

16

Connecting Two Devices

• The broadcaster on one device connects to the receiver on another device

• The data transfer process is only successful within a very short distance (3 feet or less)

• The connection happens because of Bluetooth Low Energy (LE), which is very durable and efficient

• Bluetooth LE works on a single battery for a very long time

• It can communicate with any device, iOS and Android, so it is very compatible

Page 17: Android App Development - Senior Project Presentation

17

Issues• Bluetooth LE is somewhat inefficient when

transferring data• Data overload may lead to the failure to record all

the information on the server• This app may have potential privacy flaws and

may be vulnerable to hacking or stealing of private information

• A lot of major social media companies have had privacy mishaps in recent years

• When I continue to develop this app, I hope to address these issues and much more

Page 18: Android App Development - Senior Project Presentation

18

Conclusion• This project has shown me the skills needed in order to

develop an app from scratch• I was able to experience the world of Android Studio

and mobile app development, which I did not do before• I could apply the concepts I learned in the classroom to

a very different and challenging project• Perseverance is often ideal in the realm of computer

science• I hope to continue to develop my app by adding more

components and addressing the inefficiencies• I hope to continue to program• Total Time Debugging (Finding Errors): 6.5 hours