gene presentation for android
DESCRIPTION
Android Platform/Android development process presentation at Stanford Open SourceTRANSCRIPT
![Page 1: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/1.jpg)
Android+Amzonca+Zxing=?
By Gene Leybzon
http://www.facebook.com/profile.php?id=574038581
![Page 2: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/2.jpg)
![Page 3: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/3.jpg)
Android
Android is the first free, open source, and fully
Android is the first free, open source, and fully and fully customizable mobile platform.
and fully customizable mobile platform.
![Page 4: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/4.jpg)
Android Platform
ApplicationsApplications
Application FrameworkApplication Framework
LibrariesLibrariesLibrariesLibraries
Linux KernelLinux Kernel
Mobile Device(s)Mobile Device(s)
![Page 5: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/5.jpg)
Android Applications
PhonePhone
BrowserBrowser
ContactsContactsContactsContacts
SMSSMS
User Developed ApplicationsUser Developed Applications
![Page 6: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/6.jpg)
Android Application Framework
Activity ManagerActivity Manager
Window ManagerWindow Manager
Telephony ManagerTelephony ManagerTelephony ManagerTelephony Manager
Location ManagerLocation Manager
Notification ManagerNotification Manager
![Page 7: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/7.jpg)
Android Libraries
Open GLOpen GL
SSLSSL
WebKitWebKit
SQL LiteSQL Lite
![Page 8: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/8.jpg)
Android Linux Kernel
Linux version 2.6Linux version 2.6
NetworkNetwork
SecuritySecurity
Memory…Memory…
![Page 9: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/9.jpg)
Android Mobile Devices
![Page 10: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/10.jpg)
Future of Android
Q4 2008: Localization (German)Q4 2008: Localization (German)
Q4 2008: Support for multiple access point nodesQ4 2008: Support for multiple access point nodes
Q1 2009: Input method Q1 2009: Input method Q1 2009: Input method frameworkQ1 2009: Input method framework
Q1 2009: Input method enginesQ1 2009: Input method engines
Q1 2009: Localization(French, Italian, es_es, zh_TW, Ja, NL, CZ)Q1 2009: Localization(French, Italian, es_es, zh_TW, Ja, NL, CZ)
![Page 11: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/11.jpg)
Deep Dive
Into Android
Application Application
Development
![Page 12: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/12.jpg)
Development Process OverviewDownload/Install SDK
http://code.google.com/android/download.html
Download/Install SDK
http://code.google.com/android/download.html
Install Eclipse IDE 3.3
http://www.eclipse.org/downloads/
Install Eclipse IDE 3.3
http://www.eclipse.org/downloads/
Develop the applicationDevelop the applicationDevelop the applicationDevelop the application
Sign the appSign the app
Debug & TestDebug & Test
Publish to marketplacePublish to marketplace
![Page 13: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/13.jpg)
Developing Applications
Remember your goalRemember your goal
Know building blocks *Know building blocks *
Know JavaKnow JavaKnow JavaKnow Java
Know the process *Know the process *
Be creativeBe creative
![Page 14: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/14.jpg)
Building Blocks
Android ManifestAndroid Manifest
ActivityActivity
ViewView
Intent and Intent FiltersIntent and Intent FiltersIntent and Intent FiltersIntent and Intent Filters
ServicesServices
NotificationsNotifications
Content ProvidersContent Providers
![Page 15: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/15.jpg)
Android Manifest
Is an XML fileIs an XML file
Application propertiesApplication properties
ActivityActivity
PermissionsPermissions
InstrumentationInstrumentation
Intent and Intent FiltersIntent and Intent Filters
ReceiverReceiver
ServiceService
Content ProviderContent Provider
![Page 16: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/16.jpg)
android.app.Activity
Object that has lifecycleObject that has lifecycle
May or may not have interact
with end-user
May or may not have interact
with end-user
Have stateHave state
Can save persistent stateCan save persistent state
Can be foreground or backgroundCan be foreground or background
![Page 17: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/17.jpg)
Activity Lifecycle
![Page 18: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/18.jpg)
android.view.View
Basic UI building blockBasic UI building block
Responsible for drawing UIResponsible for drawing UIResponsible for drawing UIResponsible for drawing UI
Process Events (key, trackball, touch)Process Events (key, trackball, touch)
![Page 19: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/19.jpg)
android.content.Intent
Describes operation to be performedDescribes operation to be performed
Is a glue between activitiesIs a glue between activitiesIs a glue between activitiesIs a glue between activities
Describes desired action and data necessary to perform the actionDescribes desired action and data necessary to perform the action
![Page 20: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/20.jpg)
Intent Actions
MAINMAIN
VIEWVIEW
PICKPICK
EDITEDIT
![Page 21: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/21.jpg)
android.content.IntentFilter
Describes capabilitiesDescribes capabilities
Used for intent resolutionUsed for intent resolutionUsed for intent resolutionUsed for intent resolution
Describes how to handle actionDescribes how to handle action
![Page 22: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/22.jpg)
android.content.BroadcastReceiver
Handles external eventsHandles external events
Used for both sending and receiving broadcasts Used for both sending and receiving broadcasts broadcasts broadcasts
Described in app manifestDescribed in app manifest
![Page 23: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/23.jpg)
android.app.Service
Runs in the backgroundRuns in the background
Does not interact with usersDoes not interact with usersDoes not interact with usersDoes not interact with users
Declared in app manifestDeclared in app manifest
![Page 24: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/24.jpg)
Content Providers
Object that can store and retrieve data Object that can store and retrieve data
Accessible by other applications Accessible by other applications Accessible by other applications Accessible by other applications
Many content providers are pre-build by Android (Audio, Video, Contacts)Many content providers are pre-build by Android (Audio, Video, Contacts)
![Page 25: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/25.jpg)
Notifications
Icon in the status barIcon in the status bar
Flashing LED Flashing LED
SoundSound
VibrationVibration
![Page 26: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/26.jpg)
UI Components (demo time)
![Page 27: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/27.jpg)
Practical App Example
Amazonca Barcode Reader
![Page 28: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/28.jpg)
Amazonca.com
![Page 29: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/29.jpg)
AMAZONCA.COM
![Page 30: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/30.jpg)
AMAZONCA.COM
Barcode Database (1 Mil records)Barcode Database (1 Mil records)
APIAPI
Creative Commons LicenseCreative Commons License
Social FeaturesSocial Features
![Page 31: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/31.jpg)
ZXing (“Zebra Crossing”)
![Page 32: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/32.jpg)
ZXing
Barcode Decoding LibraryBarcode Decoding Library
JavaJava
Apache License 2.0Apache License 2.0
UPC-A ,UPC-E, EAN-8, EAN-13 decodingUPC-A ,UPC-E, EAN-8, EAN-13 decoding
![Page 33: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/33.jpg)
Android + ZXing+
Android
Mobile Barcode
ZXing
Barcode Reader
![Page 34: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/34.jpg)
Android + ZXing+
Android
Mobile Barcode
ZXing
Barcode Reader
![Page 35: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/35.jpg)
Android + Zxing + Amazonca+
Android
Physical World to
+
ZXing
Amazonca.com
World to WEB
Connection
![Page 36: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/36.jpg)
Behind the + sign (location)+ +
android.content.Context c = mActivity .getApplicationContext();
android.location.LocationManager lm = (LocationManager);
c.getSystemService(Context.LOCATION_SERVICE);c.getSystemService(Context.LOCATION_SERVICE);
Location loc =
lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);
Double lat = loc.getLatitude();
Double lon = loc.getLongitude();
String s = "lat="+ lat.toString() + "&lon=" + lon.toString();
![Page 37: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/37.jpg)
Demo Time
![Page 38: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/38.jpg)
∑ummary+ +
Open source is mash-able
Fastest way to build a product –
maximum reuse of existing components
Pay attention to licensing:Pay attention to licensing:Android - Apache Software License
ZXing - Apache Software License
Amazonca .com data - Creative Commons 3.0
![Page 39: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/39.jpg)
Gene Leybzon
![Page 40: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/40.jpg)
http://code.google.com/android/
![Page 41: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/41.jpg)
http://code.google.com/p/zxing/
![Page 42: Gene Presentation For Android](https://reader033.vdocument.in/reader033/viewer/2022042614/558cb20fd8b42aa55c8b465e/html5/thumbnails/42.jpg)
http://www.amazonca.com