Google App Inventor

Download Report

Transcript Google App Inventor

Android Outlook
• Android captures a majority of the smart phone market
• It is making significant inroads into the high end iPad tablet market.
• Amazon and Barnes and Noble are gaining popularity with the 7”
low cost ($100 to $200) tablets.
• Androids will be the base OS for a variety of other low cost devices
such as wrist watches, head phones, CD/DVD players, smart TVs,
and credit card replacements
• Android is capable to drive laptop and NetBook computers, though
its impact in these areas are limited to date.
• According to the text, 850,000 Android devices are activated daily.
Note: It is possible to dual boot iOS/Androids on a jail broken
iPhone or iPodTouch with OpeniBoot and iDroid software
Why Android?
• General Advantages
– Fully open-source, non-proprietary, operating system supported by
the Open Handset Alliance of 80 major manufacturers
– No certification process to become an Android developer
– No preferences for native applications
– Low learning curve for Java developers
• Rapid innovations such as:
– Android Beam; Near Field Communication (NFC) technology for near
device data exchange
– Home widgets and live wallpaper
– Shared data between applications
– Google map integration with Android applications
– On board SQL-lite
– Background services and applications
Application Security
• Applications can store data persistently with
the following limitations
– They can only write to their own data folders
– They must request user permission for access to
services such as: internet access, audio recording,
and near field device interaction, SD card
– Inherits low level Linux securities
– Applications can create content managers to
expose their data to selected other applications
Versions
Philosophy: Release early and often, with backward compatibility when
possible. Active devices run using many of the nineteen Android versions
• 2: Gingerbread still used by some android smart phones
• 3: Honeycomb (May 2011. Experimental)
– Used by the Motorola Xoom
– Source code withheld by Google
– Intended for larger screen, multi-core tablets, not smart phones
• 4: Ice Cream Sandwich (October 2011)
– Source code released by Google
– Brings honeycomb features to smart phones
– Facial recognition, better photography, offline functionality,
application folders
Mobile Device Hardware
• RISC Processors
– Low power; ideal for mobile devices
– Simple processors (35000 transistors per chip is typical)
• ARM
– Dominates the mobile technology market
– No microcode, Most instructions are single cycle
– Conditional execution and switched register banks
• MIPS
–
–
–
–
All instructions are single cycle
Loads data/instruction in one cycle
Eliminates multiply/divide to allow very high clock rates
Register windows speed up subroutine calls, but limits the
number of nested calls
Developing Android Applications
• Java using the Android Software Development Kit (ADK)
o Most Android applications are developed with the ADK
o Code in Java, then compile into Dalvik executables, which run in a
specialized virtual machine optimized for mobile devices
• C and C++ using the Native Development Kit (NDK)
o Does not significantly improve performance in most cases
o Useful for CPU-intensive operations such as signal processing
o The Android framework provides two ways to access C/C++ code
 The Java Native Interface (JNI)
 The NativeActivity class to interact with Services & Content Providers
• Google App Inventor
o For Novice programmers, who want to create Android applications
o Created by Google, maintained by MIT
o Apps created by drag-and-dropping visual objects
Optional Second Presentation
Pick one of the following (or another if approved)
1.
2.
Describe how they work
Create a short demo if possible
Possible Selections
• Google App Inventor
• Native Development Kit
• Android features not discussed in class (Examples: Web View, Media
Frameworks, OPENGL for 2D/3D Animation, Telephony, Location-based
Services, Networks, Using Sensors, Home Screen Widgets and Live
wallpaper, NFC, Web View
• Manufacturer specific development kits
• Google’s stand alone API recently released
Mobile Development
Considerations
• User Priorities: 1. Phone, 2. Text messaging, 3. Camera, 4. MP3 Player, 5.
Other useful things like Google Maps, Browsing, Facebook, and applications.
– Never interrupt a user activity, instead use the led notification light,
vibration, message bar, or ringtones
– Always be polite
– Applications should be intuitive, easy to use, and conform to standards
• Limited battery life: Detect when the battery is not charging and
avoid compute-bound operations if this is the case.
• Life cycle: Applications do not control when they start or end.
Seamlessly respond to applications being paused and restarted
Considerations (cont.)
• Messaging costs
– Let users choose between high accuracy/fast/high cost
transmission and low accuracy/slow/low cost messaging
– Consider frequency and times of updates and minimize the
amount of data transferred
– Transfer at off-peak periods
– Always respect user preferences
• Limited processing power
– Code should be as efficient as possible
– Make use of background services and worker threads to
maximize responsiveness
– Save and restore processing states
Additional Considerations
• Limited persistent storage
– Applications should cache data when possible
– Manage data stores to remove unneeded data faithfully
• Limited memory sizes
– Minimize application size
– Obfuscate code to minimization footprint and reduce reverse
engineering (Pro Guard Java class shrinker)
• Intermittent or unreliable connections
– Graceful degradation for seamless operation
– Revert to limited operation or previously cached data
• Varied screens
– Different user interfaces other than buttons and text boxes
– Detect orientation changes
– Accommodate various display resolutions
Additional Considerations (cont.)
• Consider the users that might use applications
– Android devices are sold in hundreds of countries
having different languages spoken and different
cultures
– People with disabilities need font size options or
audio interfaces
– Be liberal with user preferences
• Consider state-of-the-art device features
– Utilize device features when they exist
An Android package
• AndroidManifest.xml
–
–
–
–
•
•
•
•
Lists application activities (user tasks) and services
Lists permissions, and features required by the application
List permissions granted for access by other applications
Lists features used by this application
src: Source Java classes
bin: Compiled Java and Android classes
assets: Arbitrary collection of files and folders
res
– Various resource folders to separate data from application code
– Multimedia, user interface layouts, xml files, data values
abstracted from the application, and raw data
• gen: Java files automatically generated during a build
Android Build Process
The Build Process
Activity Life
Cycle
Loads into
memory
Note: The Dalvik VM controls the Life cycle, not the application