android app development - senior project presentation
TRANSCRIPT
Android App Development: The Different Functions
of ProgrammingSenior Project 2016 by Rohan Gupta
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
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
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
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
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
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
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
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
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
11
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
13
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
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
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
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
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
19
List of Sourceshttps://developer.android.com/develop/index.html
http://stackoverflow.com/questions/33601195/android-app-development-assistance
https://www.sitepoint.com/12-android-tutorials-beginners/