Скачать презентацию Android Pros and Cons General Advantages Fully open-source Скачать презентацию Android Pros and Cons General Advantages Fully open-source

33faff060944962a668ad3b2fb604604.ppt

  • Количество слайдов: 23

Android Pros and Cons General Advantages Fully open-source, non-proprietary, operating system supported by the Android Pros and Cons 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

Text Book Prerequisites The text is used by Big Nerd Ranch to facilitate a Text Book Prerequisites The text is used by Big Nerd Ranch to facilitate a one week tutorial workshop used to train hundreds of professional programmers. It is a good introduction to your first weeks of on-thejob training in industry. Likely, you will be sent to courses like this to learn the required platforms and then are expected to hit the ground running on return. 1. You should be comfortable with Java including a. Classes and objects, interfaces, packages, generics b. Listeners and anonymous inner classes 2. The basics should be second nature: declarations, control structures, arrays, basic logic, etc.

Mobile Applications Assumption: We have an idea for a hot new mobile application General Mobile Applications Assumption: We have an idea for a hot new mobile application General Considerations • Industry is in a state of competitive flux not seen since the days when mini-computer manufacturers first flooded the market – There is now open source, but there also lots of proprietary secrets – Standards are evolving rapidly • Prediction: there will be winners and losers • Based on history: Winners will not likely produce the best products – Superior marketing strategies gain traction quickly Example: Microsoft versus Apple in the 1980 s – Getting to the public to fill a need before standards are established Example: Early browser war between Netscape and Explorer • Bottom line: Development is expensive; mistakes can be disastrous

Hardware Specifications • Display Sizes – Laptop/Desktops: 15”, 17”, 19”, 21”, etc. – Phones: Hardware Specifications • Display Sizes – Laptop/Desktops: 15”, 17”, 19”, 21”, etc. – Phones: 1½” , 2. 3”, 4” – Tablets: 7”, 8”, 10. 1”, etc. • Mobile Device Resolution – Low end: 128 x 128 – Mid end: 240 x 360 – High end: 320 x 480, 1024 x 768, 1200 x 800, etc. • • Operating Systems: Android, Web. OS, Windows 10, i. OS, Blackberry Manufacturers: Apple, Nokia, RIM, Samsung, Sony, Motorola, LG, HTC Memory: 256 MB – 2 GB; Storage: 1 GB-128 GB Processor Speed: 500 mhz – 2 ghz

The Actual Story The Actual Story

Tablet Market Share Note: The Android market is fragmented among dozens of manufacturers Tablet Market Share Note: The Android market is fragmented among dozens of manufacturers

Pixels and Aspect Ratio • Pixels per inch (ppi), or dots per inch (dpi) Pixels and Aspect Ratio • Pixels per inch (ppi), or dots per inch (dpi) – High resolution may mean that you need a magnifier glass to read text – The retina has a limit of 300 ppi – Zooming in and out may be necessary • Aspect ratio – Width to height ratio differs between devices – When turning the device, the aspect may change • Does the device automatically zoom to fit? • Does the device adjust the font to accommodate? Update: I’ve found that pixels (px) now are commonly measured as 1/72 in so things are easier for developers now than just a few years back.

 • Key Entry Features – Virtual or physical keyboard – Numeric or alphanumeric • Key Entry Features – Virtual or physical keyboard – Numeric or alphanumeric entry – External keyboard attachment • Interacting with applications – Touch or multi-touch – Handwriting and/or voice recognition • Geo-location • Facial and gesture recognition • Connections: Phone, web, texting, email

Best Practices For Application Development • • • Graceful degradation when networks are unavailable Best Practices For Application Development • • • Graceful degradation when networks are unavailable Limit permissions requested as much as possible Optimal use of storage. Use the SD card if possible Use standard GUI layouts compatible with other apps Efficient, fast, responsive Multi thread slow time consuming operations Save application data when state changes occur Share data with apps by implementing content providers Allow activities to be launched from other apps Utilize notification facilities, progress bars, flash screens

Design Considerations • • • Orientation changes Varied screen sizes and resolutions Operating system Design Considerations • • • Orientation changes Varied screen sizes and resolutions Operating system choice to reach a wide audience Intuitive operation Reason for ongoing use (not one-time novelty) Well-defined purpose Multi user support Upgrades/new features (without feature creep) Multiple language and color support Varied font sizes

Getting the product to market • Register for an Android Market account: market. android. Getting the product to market • Register for an Android Market account: market. android. com/publish/ • Click: Setup Merchant Account to set up a Google Checkout • Adhere to Android application policy requirements (www. android. com/market/terms/developer-content-policy. html) • Digitally sign: Best to get a developer’s certificate (ex: Comodo) (see developer. android. com/guide/publishing. htm) • Price the application – – The average paid app price is $3. 13 – 30% for Google; 57% are free. In app advertising price per view virtual products (Google retains 5%) Limited free version, with paid version having full capabilities • Market: social media, app review sites, advertising networks, etc. .

Browsers • Preinstalled – Net. Front , Myriad, Explorer, Safari, Nokia, Sony, Obijo, Motorola, Browsers • Preinstalled – Net. Front , Myriad, Explorer, Safari, Nokia, Sony, Obijo, Motorola, Symbian, Android, web. OS, Blackberry, Samsung, Micro. B • User-installed – Opera Mobile, Opera Mini, Firefox (Fennec) for Mobile, Chromium, UC, Sky. Fire, Bolt • Webkit – Open source framework used by many browsers For platform independence, many developers us Web. View with much of the code in Java. Script. Be sure to test on many difference browsers.

Questions to Ask? • On which device(s) will our application run? • Should it Questions to Ask? • On which device(s) will our application run? • Should it run in a browser or as a native application? • Which language(s) should we use? – HTML 5/Java. Script, IOS: Objective C and Swift, Android: Java with the Dalvik Virtual Machine (. dex files) • Which cross-platform development framework should we use? Do they have their own API to learn? • If Java. Script, which Java. Script libraries should we incorporate? • How do we develop/debug? – Which emulators/simulators are available? – What development toolkits do we use?

This Class • Part 1: Native Applications on Android. Why? – – Android is This Class • Part 1: Native Applications on Android. Why? – – Android is rapidly gaining market share Android Studio/Android emulator provides good development tools Android’s Java is not too difficult to learn and use Familiarization with at least one mobile development platform is beneficial • Part 2: HTML 5/Java. Script. Why? – Java. Script supported on all popular smart phone and tablet devices – The popular browsers have good debugging facilities – There are extensive Java. Script frameworks and libraries that attempt to facilitate application development and provide cross-platform compatibility – There are toolkits to translate from HTML 5/Java. Script to native applications – Smaller learning curve for cross-platform development – IOS and Android have Web. View components where Java. Script is active – Industry is moving in this direction (at least at the moment)

Popular Java. Script libraries/Frameworks • Google Web Toolkit - GWT (http: //code. google. com/webtoolkit) Popular Java. Script libraries/Frameworks • Google Web Toolkit - GWT (http: //code. google. com/webtoolkit) Free toolkit, used by thousands of developers for complex web applications. Code in Java; deploy in Java. Script • j. Query (http: //jquery. com/) : Java. Script library that simplifies HTML document traversing, event handling, animating, and Ajax interactions • Prototype (http: //www. prototypejs. org/) and script. aculo. us (http: //script. aculo. us/): Easy to use class-driven Java. Script framework that aims to ease development of dynamic web applications • YUI (http: //developer. yahoo. com/yui/ ): Java. Script and CSS utilities and controls for richly interactive web applications. Built by Yahoo • Dojo (http: //dojotoolkit. org): A toolkit, focusing on performance, for building desktop and mobile web experiences • Moo. Tools (http: //www. mootools. net/): Object-Oriented Java. Script cross-browser framework for intermediate to advanced Java. Script developers

Mobile Frameworks • j. Query based o j. Query Mobile (http: //jquerymobile. com/): a Mobile Frameworks • j. Query based o j. Query Mobile (http: //jquerymobile. com/): a Touch-Optimized Web Framework for Smart phones & Tablets. o j. QTouch (http: //jqtouch. com/): j. Query plug-in that provides a native UI feel to i. Phone-based web apps. o M-Project (http: //the-m-project. net/): framework to build mobile apps using HTML 5 Java. Script, and JQuery that run on the i. Phone, Android devices and many others. • Sencha and Sencha Touch (http: //www. sencha. com/): mobile builder for apps that feel native on i. Phone, Android, and Blackberry, and other touch devices • Titanium (http: //www. appcelerator. com/products/ ): Java. Script interface that translates into mobile applications, which will perform just as if you had written them in Objective-C or Java.

Mobile Frameworks (cont. ) • Phonegap (http: //phonegap. com/) : Platform allowing native application Mobile Frameworks (cont. ) • Phonegap (http: //phonegap. com/) : Platform allowing native application development in HTML/Java. Script for APIs and app store access • Appmobi (http: //www. appmobi. com/): Cross platform Java. Script bridge that allows apps access to device APIs on i. OS and Android platforms • Nimble. Kit (http: //nimblekit. com ): Framework that allows development for Apple i. OS devices using HTML and Java. Script • XUI (http: //xuijs. com/) Micro DOM library for HTML 5 mobile web applications. Compatible with Web. Kit-based mobile browsers • Web. App (http: //webapp-net. com) light weight Java. Script framework with a full set components for advanced mobile applications. • i. UI (http: //code. google. com/p/iui): Java. Script library, CSS, and images for advanced mobile web apps • YUI (http: //yuilibrary. com/) Yahoo developed framework with a large user base developing interactive Web applications.

Java. Script and other tools • Leading edge Java. Script Features (some not yet Java. Script and other tools • Leading edge Java. Script Features (some not yet standard) – – – Record, detect orientation, device vibration, sense gestures, etc. Audio recording ARIA standards: Accessible rich internet applications Transform features (image manipulation) Drag and Drop User-approved file I/O • HTML templates (https: //github. com/janl/mustache. js/) for eliminating embedded HTML in Java. Script • CSS Reset (http: //www. cssreset. com/) Initialize presentation parameters for cross browser compatibility • Node. Js (http: //nodejs. org/): Server side Java. Script

Presentation (Teams of two) Topics Requirements 1. One of the top five Java. Script Presentation (Teams of two) Topics Requirements 1. One of the top five Java. Script libraries. Research how it works and how it is applicable to mobile development. 2. One of the Java. Script frameworks. Research how it works, the development environment, and how it is applicable to mobile development 1. Clear description including an overview plus examples. 2. Short demo of a program using the technology 3. Audience: Understand computer terminology, html, and Java. Script but not this particular topic 4. Turn in your Power. Point slides and a five to eight page well-written summary of the topic 5. Each team member must participate in the presentation

Android Development Environment 1. Step 1: Make sure the latest version of Java is Android Development Environment 1. Step 1: Make sure the latest version of Java is installed 2. Step 2: Download and install Git for Windows 3. Step 3: Download and install Android Studio 4. Step 4: Launch Android Studio a. Bottom right: choose configure, then SDK manager b. Lower left: launch standalone SDK manager c. Choose the plugins to install (I have the following) (versions 24, 23, 22, 16, debugging tools, USB & Web driver, HAXM accelerator, support repository, Head unit emulator). You don’t need TV consuming; the downloads Note: Steps 3 and 4 are very time and wear modules. can take hours, depending on your internet speed

Hardware Accelerated Execution Manager (HAXM 1. Step 1: download and install using the standalone Hardware Accelerated Execution Manager (HAXM 1. Step 1: download and install using the standalone SDK manager 2. Step 2: Create device emulator (per text instructions) 3. Step 3: If emulator fails because vt-x disabled on Windows 10, the following worked for me a. b. Start->settngs->updates and recovery->advanced startup c. After second reboot: Bios set up, tab to System configuration, down arrow to Virtual Technology, then F 5 or F 6 to change to enabled After reboot: trouble shoot->advanced options-> UEFI Firmware Settings->restart

Create New Project 1. File, New, Project: follow text instructions 2. Gotcha’s a. The Create New Project 1. File, New, Project: follow text instructions 2. Gotcha’s a. The path to projects CAN NOT contain spaces. My account is Dan Harvey. I used C: usersPublicAndroid. Studio. ProjectsGeo. Quiz b. For chapter 7 dependencies, I had to manually type them instead of using the wizard so spaces in path name would be accepted. c. Ctrl-z is for undo, ctrl-y is NOT for redo; it is ctrl-shift-z d. Ctrl-shift-O doesn’t automatically import. Instead use alt-enter or option-return with the cursor over the reference to the class. e. The emulator has a very slow launch. Once up, leave it up and relaunch your application when needed. f. Error messages indicate missing plugins during builds. Sometimes, a popup will appear asking if the download/install should be done. g. Design view of layouts useful, but can be buggy. For example, I had to change the render version from 24 to 23 for it to work.