Mobile Programming Midterm
Wifi
802.11 a/b/g/n = wlan standards a/b/g/n are different bandwidths a facility allowing computers, smartphones, or other devices to connect to the Internet or communicate with one another wirelessly within a particular area. measures signal strength of visible access points, uses a location database service
Android application components
Activity = single user-focused task, typically implemented to handle the presentation & control of a specific screen, only 1 active at a time Service = task that doesn't require user interaction that runs in background, runs on main thread unless offloaded, higher priority than inactive/invisible activities, can be bound to app components Broadcast receiver = application intent listeners, your application to react to specific system wide broadcasted intents Content Provider = manages secure access to a shared set of application data, used to expose internal app data to other apps (use other thread)
In-app advertising
Ad formats = banners ads/interstitial ads/native ads/incentivized ads pricing models: cost per impression (CPM) views click through (cost per click) cost per action/acquisition = advertiser pays for each specified action - for example, an impression, click, form submit cost per install = based on user installing an app on their mobile phone
Sandbox
Aka home directory for iOS app directory that holds application bundle, tmp, documents, library, cache data can be stored locally here
Touch ID Authentication (IOS)
Allows 5 fingerprint attempts before a passcode is required. Can be used to tell SE to release keychain items (credit card, etc.) for use (i.e. purchase) Operation: Raster of fingerprint is sent to encrypted memory in SE, temporarily use to create a map of dermal ridge flows, then map is stored without user id. Data is not sent to Apple
Garbage Collection in Android
As you allocate more objects in your app, you will force a periodic garbage collection, creating little "hiccups" in the user experience Automatically done
RSA vs. ECC
Asymmetric encryption: one public, one private key RSA & ECC RSA = Rivest, Shamir, and Adelman, the inventors of the technique uses 2 keys, one public, the other private uses keys are related to each other by 3 numbers: "d," "e," and "n" issue = Symmetric Key Encryption requires private keys to be sent securely before any communication can take place. ECC = elliptic curve cryptography Successively adding a point to itself ->Find where tangent to point crosses the curve. -> Reflect over x-axis ->Repeat. -> Repetition Count is private key -> Final point is public key -> Initial point is public! (This is all computed in modulus) Y2 = X3 + AX + B Curve Observations = always symmetric about x-axis, always has 3 inflection points
secure boot chain (IOS)
Boot ROM code (burned during chip fabrication) -> Apple Root CA public key (in ROM) verifies LowLevel Bootloader (LLB) is signed by Apple -> Unique ID ingrained into silicon (ECID) -> LLB verifies, loads, and runs iBoot -> iBoot verifies, loads, and runs iOS kernel A7 chips — Secure Enclave also booted up. In Case of Failure = "Connect to iTunes" display or Enter Device Firmware Upgrade mode
Where can data persist safely in iOS apps?
Caches can be lost during backups Tmp can be lost during backups or during normal use Document directory, app bundle, library directory
CSS
Cascading Style Sheets Style Style defines the appearance of an element Style sheet is a series of rules/styles for an entire site
Ephemeris data
GPS satellite continuously transmits its own position
Almanac data
GPS satellite transmits info about the constellation over radio waves, use almanac data to predict which satellites are nearby when they're looking for GPS signals (not very accurate, can be months old)
HTML5
Hypertext Markup Languages Content combination of content and markups (tags & descriptive attributes) that define how a document should appear in a browser HTML5 specific = new form features (url,email, date), global attributes (hidden, dropzone), new events (onerror, onscroll), new tags (<time>, <nav>)
Xcode
Integrated interface builder = graphically lay out your app's interface widgets (views), connects your interfaces view to your code's model Storyboard builder = defines relationship between views, create + design new views
HTML5 mechanisms for persistence
Local storage = data persist even if user leaves the site or closes the browser Session storage = window closes -> data is removed, will survive a refresh Database storage (local = WebSql, IndexedDB, server = remote = MySQL, SimpleDB) File Storage (XML & JSON) XML = standard data format that allows for simplified transport of data (parsing can be challenging) JSON = lightweight data-exchange format, easier to parse and less overhead file system API = large text/binary files can be created & stored, limited support, security risk, unstructured data (no search feature) Application cache = offline, added cache manifest file to every HTML file in your app
JavaScript
Logic A scripting language used by web browsers Considered multi-paradigm as it supports (OO concepts, Imperative programming functions)
web-based mobile application
Platform & device neutral Application runs in browser (no need to push updates, no need for app store, must be online to access app resources) Uses open, well supported web technologies (coded in browser rendered language - HTML5 w/ javascript) Limited access to device features (standards lag innovation) No access to native UI elements (getting the look & feel right can be difficult)
native mobile application
Platform specific (directly interacts w/ OS, access all hardware APIs, optimize performance) Better user experience App store deployment (binary executable download & store on device, offline support) Requires writing code in supported languages used supported enviornment
Monetizing applications
Purchase Price Subscription Fee In App-Advertising In App-Purchases 3rd Party Revenue Stream
user application security measures (IOS)
Randomly-Named sandbox directory. No tools for remote access included in kernel. Data shared between apps only via iOS services Address space layout is randomized.
Apple Pay
Secure Element (another chip like Secure Enclave) runs Java Card platform, compliant with financial industry standards for e-payments. NFC Controller Wallet — stores encrypted credit/debit card info Secure Enclave — manages authentication without using Apple servers Apple Pay Servers manage state of credit and debit cards. All transactions include a one-time dynamic security code not known to apple
Android mechanisms for persistence
Shared Preferences = store private primitive data in key-value pairs, common use is user settings Local Files (internal/external) = save a basic file, such as to store long sequences of data Static Application Resources = save raw files, strings, views Local Content Providers = exposes read/write access to your application data Local Database (SQlite) = read and write structured data in private database
Objective-c vs. java differences
Similarities = code is collected into methods defined on objects which are generated from class templates Has .h and .m files Different syntax for invoking methods (Java = MyObject.MyMethod(), Objective-C = [MyObject MyMethod];) Java = glass y = new Glass (A1,A2,A3);, Objective-C = Glass y = [Glass glassWithWidth:A1 height:A2 selfDestructProbability:A3]; Java = new Employee, Objective-C = [Employee alloc] Unlike java little automatic garbage collection
App bundle? tmp directory? Documents directory? Library directory? - what type of data each stores
Store this type of data: app bundle = no writing, way of packaging executable code, stores everything that the application requires for successful operation (info.plist, resources, executable) tmp directory = temp files only documents directory = user data library director = user defaults
Network Protocols
TCP = Transmission control protocol = connection-oriented, reliable service, data exchanges (files/emails/web) UDP = user datagram protocol = connectionless, unrealiable timely service (media streaming & gaming)
Platform
The hardware/software environment for laptops, tablets, smartphones and other portable devices
Mobile location based service providers
Time To First Fix (TTFF) is a measure of the time required for a GPS receiver to acquire satellite signals and navigation data, and calculate a position solution GPS based = calculates location from distance to 4 satellites, highest location resolution, slowest time to first fix (TTFF) Cell = measures signal strength of cell towers, uses a location database service, lowest location resolution, fastest TTFF Wifi = measures signal strength of visible access points, uses a location database service
User interface design
UI = the design and layout of the visual elements of a mobile/web app UX = the overall feel of a mobile/web app maintain consistency, provide clear navigation and simple instructions, be aware of mobile context, important elements should have enough contrast to be easily recognized under device limitations, leverage device ecosystem, don't forget landscape, learn user preferences over time, every input has value
unique device IDs
UID and device group ID (GID) are AES 256-bit keys; no software or firmware can read them — only sees results of encryption or decryption. UID ties data to particular device
GPS limitations
Unobstructed signals are required (need line of sight to satellite, can reflect off objects = multipath errors) Large power consumption Signal noise caused by atmospheric effects & electrical interference of receiver
UI user acceptance testing
User Acceptance Testing generally verifies that the deliverable meets the agreed upon requirements Make sure customer is able to understand flow of application and what actions to take
iOS mechanisms for persistence
User defaults Property Lists/Dictionaries SQLite Core data iCloud
What features does each iOS persistence tool provide?
User defaults = application to customize its behavior Property Lists/Dictionaries = convenient way to store, organize, and access standard types of data. SQLite = provide structured data set, private to application Core data = use to manage the model layer objects in your application. iCloud = syncing data among devices
Local Files (internal/external)
Uses standard Java I/O classes internal = refers to the apps private portion of the flash storage external = user mounted portion of the device typically used for public files that are visible to all Files can be cached or stored on a more permanent basis
3rd party revenue stream
a company purchases or brands your application. A great example is Under Armor's recent purchase of apps like MyFitnessPal and MapMyFitness.
Garbage collection
a form of automatic memory management attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program
Application programming interface (API)
a set of routines, protocols, and tools for building software applications. The API specifies how software components should interact and APIs are used when programming graphical user interface (GUI) components.
Activity lifecycle
active from onResume() to onPause(), Destroyable after onPause() Order = onCreate -> onStart() -→ onResume() -→ onPause() --→ onStop() -→ onDestroy()
Wireframing
basic screen sketches show key screen elements & functionality Not meant to fully specify the user interface Does not focus on style/color/content Allows you to quickly generate & easily demonstrate an interface w/o building one
authentication
be certain that the sender sent the message Authentification Alice "decrypts" using her private key Bob "encrypts" using Alice's public key Only Alice can possibly have sent the message •Secure & Authenticated -- Alice "decrypts" using her private key -- Alice encrypts using Bob's public key -- Bob decrypts using his private key -- Bob "encrypts" using Alice's public key -- Only Alice can possibly have sent the message, and only Bob can read it
What is persistence?
characteristic of state or data which outlives the process that created it
Hybrid mobile application
combines native development w/ web technology Significant portion written in cross web technologies Direct access to APIs provided through extension packs (native portion of app uses OS APIs to create embedded HTML rendering engine that serves as bridge b/t browser & device APIs)
Network Sockets
communication endpoint between two applications usually running two different machines Data flow b/t the sockets is called a stream = send either binary or unicode data Data is transmitted in specially sized packets Identified by an end-to-end transport protocol, an IP address and a port number
Location sensors
compass = instrument containing a magnetized pointer that shows the direction of magnetic north and bearings from it. GPS = satellite system that provides position, navigation, and timing (1 way transmission, 3-5 meter accuracy, clocks @ 1 nanosecond) GPS receiver calculates distance to satellite Performs trilateration using multiple satellites to determine speed/distance/elevation
Android manifest file
configuration file for the application, specifies application permissions, structured xml file for settings
Wifi Direct
connect directly to other devices over wi-fi w/o used a shared access point creates a wireless peer to peer (P2P) ad-hoc network discover devices that are w/in range and what services are offered on the device Promotes a more reliable, higher-speed, longer-range communication compared to bluetooth
Sensor fusion
describes the process of combining more than one sensors example = combining MEMS 3-axis gyroscope and the 3-axis accelerometer you can provide full 6 degrees of freedom
user centric design process
design for real ppl w/ real problems observation -> ideation -> design -> build -> test
Business Plan
detailed road map for converting a recognized opportunity into a profitable business persuades potential investors, need value proposition contributes to success of venture parts = executive summary, market analysis/strategy/plan, financial analysis/projections, product development plan
Geolocation
directions/route finding, location-based search/advertising/social interaction, tracking ppl and assets, augmented reality
encryption/decryption
encryption = Convert a message (cleartext) into blocks of numbers, then run an algorithm on them using a "key" (another big number) that transforms them into an unreadable format (ciphertext) by anyone other than holders of a "key." Symmetric encryption: two private keys (DES, AES) Asymmetric encryption: one public, one private key (RSA & ECC) send message so only intended receiver can read it decryption = process of taking encoded or encrypted text or other data and converting it back into text that you or the computer can read and understand.
Sensor types
environmental = measure various environmental parameters, such as pressure/illumination/humidity position = measure the physical position of a device such as bearing/orientation/proximity motion = measures acceleration & rotational forces along three axes location = determines the location of a device using GPS
The purpose/goal of a pitch
goal at the end is to have an immediate decision regarding the next steps
Motion sensors
gravity = measure force of gravity along x/y/z axis accelerometer = measure the acceleration (or force) applied to the device, at rest measure gravity, synthetic sensor will factor out the force due to gravity, measure changes in linear velocity in -x -y & -z axes gyroscope = measure rate of rotation around axes
Resources
holds non-code resources such as string/ constants/menus/colors/images all compiled and compressed into R class file Static resource file = read-only static file bundled w/ app
3D resolutions
lat, lon, alt and other data can be determined with 4 satellites Provides improved positional accuracy
Environmental sensors
light = visible on the face of the device, small opening, reports ambient light level w/ a 1 lux resolution camera barometer = measures atmospheric pressure microphone
Shared preferences
lightweight data-storage framework used to save and retrieve key-value pairs of primitive data types across user sessions Can be private to specific activity or shared across all components in an application Stored as an XML file in the protected application directory Uses = checking the first use of the app, login info, saving user preferences
Bluetooth Classic & low energy
low power, low bandwidth, short range, wireless data communication standard Uses the license-free 2.4 GHz ISM radio-frequency band (same frequency band as 802.11 b/g Wifi)
Position sensors
magnetometer = get compass heading/bearing measure strength + direction of magnetic field orientation = monitor the position of a device relative to the earth's frame of reference (specifically, magnetic north) proximity = visible on the face of the device (2 small openings), most are reporting the presence or absence of an object at a given distance, triggered on state transitions (near-to-far or far-to-near)
Android Platform Fragmentation
many different platform version of android OS out there, not forced to update
Design thinking
methodology used by designers to solve complex problems, and find desirable solutions for clients
Sensors
microphone, camera, location, orientation, proximity, light, pressure, accelerometer, heart rate
Cellular
mobile telephone system that uses a number of short-range radio stations to cover the area that it serves measures signal strength of cell towers, uses a location database service, lowest location resolution, fastest TTFF
Delegate (w/ respect to Model-View-Controller)
model -> controller (key value observing = controllers register for event notices from model) controller -> view (method/messaging for updating) view -> controller (delegates & events = delegate implements protocols) controller -> model (getters/setters)
Provisioning profile
need an app ID Use download button to get profile file Expires in 90 days Drop on xcode collection of digital entities that uniquely ties developers and devices to an authorized iPhone Development Team and enables a device to be used for testing
What are features of SQLite persistence tool?
no installation, no intermediary server process cross platform Exposes methods to manage a SQLite database Private to application
Model View Controller
organizes your interface/processing design/source code, encourages modularity in components & re-use in app redesigns model = core database, objects holding data, objects maintaining app state controller = coordinates model & view, contains UI logic of the app view = display objects, interactive objects
Orthogonal vs. nonorthogonal persistence
orthogonal = implemented by process's environment, no explicit program actions are required to retrieve or save state nonorthogonal = implemented through explicit actions in the process's program
Co-inventor
patentable invention is the result of inventive work of more than one inventor.
Intent
powerful asynchronous messaging mechanism used w/in or b/t applications, used to broadcast system wide messages, request action to be performed + data to be acted on, explicit or implicitly activate activities Store data in key-value pairs called extras, these intent extras implemented as bundle Implicit = allows anonymous application components to service intent requests @ run time (performed using filters defined for each application component)
Tools for financial analysis
pro forma balance sheet pro forma income statement profit & loss projected sales breakeven analysis
Executive summary
product description, key benefits/value proposition
Positioning
promote (a product, service, or business) within a particular sector of a market, or as the fulfillment of that sector's specific requirements
What is a cursor?
provides random read-write access to the result set returned by a database query.
Purchase price vs. subscription fee
purchase price is the cost to download the app subscription fee = reoccurring fee after a set amount of time
Elevator pitch
quickly sum up the unique aspects of your venture/idea in 30-60 seconds want to excite others with your passion and the story behind your idea tailored to a specific audience & outcome goal at the end is to have an immediate decision regarding the next steps
Prototyping (rapid/iterative)
rapid = test out the key technical features and user behaviors to determine the viability of an app (build it sturdy, build only what you need, build the experience not the technology) iterative = build some functionality into the app then ask users to try it and give feedback, use smoke and mirrors to test concepts, test beyond the lab, learn from interactions with real users
Raw vs. synthetic
raw sensors = physical, provides the raw data from an actual physical sensor (example = light,pressure) synthetic = virtual or composite, provides data from a combo of sensors or may manipulate the raw sensor data before reporting it (example = rotation vector, gravity)
Revenue vs. expenses
revenue = sales (direct/subscriptions, in-app purchases, advertising, 3rd party sales) determine ad revenue = # times/month app used, avg. duration of each session, how often ads are loaded, category of your app on website, platform your app is on fixed expenses = supplies, infrastructure, R & D, salaries/wages variable expenses =advertising, promotions, professional advisor fees, miscellaneous
Closed-platform development process
run signed apps from a single trusted source (iOS) control who runs what apps on what devices pro = limit possibilities of bad codes running wild (apple/google have global kill switches) con = limit possibilities of what is "good code"
Android Emulator
runs full android software stack, defined by android virtual device (AVD), can't make calls/no usb connections/can't connect to network/no battery charge support
Differentiation
separating your product from the rest of what is out there has unique purpose
W3C
set standards for CSS CSS3 is the current standard (multi-column grid layouts, rounded corners, transparent colors)
Geofencing
setup geographic boundaries around specific locations and receive notifications when the user enters or leaves those areas Adjusts location updates based on user's proximity to the geofence & user's activity
near field communication (NFC)
short-range wireless communication standard (operates on low frequency band, able to transmit small amts of data) built upon radio-frequency identification (RFID) uses electromagnetic fields generated by radio waves to transfer data between two RFID-enabled devices (requires NFC chip) NFC tags = read/write small amounts of data to memory, no battery (activated w/ induction)
Simulator vs. emulator
simulator = duplicates external appearance or behavior of a system w/ no guarantee that his is using the same internal techniques as the original system's hardware/software emulator = behaves like real phone, runs its OS, adheres to all system rules
Storyboarding/use case
storyboarding = collection of wireframes that quickly &easily demonstrate a primary sequence of interactions/events to successfully achieve useful in gathering feedback early in the design phase (navigation w/o having to code) supports defined use cases = written description of app behavior from user point of view, outlines any alternative paths, lists any require pre/post conditions, can be used to help classify/prioritize features
Field testing/field trials
test (something) in the environment in which it will be used
Marketing mobile apps
traditional promotion = web site w/ good screen shots/video/comments, social media, PR release, competitions app store optimization = review, free app a day, rankings, top charts alternate app stores paid advertising = affiliate markets apple iAd, google adMob social media = twitter's app cards, Facebook app install Ad, Pinterest App pins
Geocoding
translates GPS location data to/from addresses or places of interest (street address --> lat/lon) reverse geocoding = (lat/lon) ---> stress address
Developer certificate
uniquely identifies you = sign your software as coming from you, verify your device's profile you are who you say, apply through apple developer portal Mac need keychain access utility application
In-app purchases
usage = offer limited usage/bandwidth/hours/storage space time = free trial of fully functional app for limited amount of time functionality = pay for virtual items, speed up, content, add-ons, upgrades, services user experience = free app has adds, pay to remove can have combination of the above
context sensitivity
user interface is one which can automatically choose from a multiplicity of options based on the current or previous state(s) of the program operation when operating correctly, should be practically transparent to the user without explanation