DOC PREVIEW
U of I CS 425 - BEGIN ANDROID JOURNEY IN HOURS

This preview shows page 1-2-16-17-18-33-34 out of 34 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 34 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1ReferenceMobile OSWhat is Android?Why AndroidAndroid SDK FeatureToolsrun two networking emulators in a computer (Updated) - ADBMP1MP1 Project StructureAndroid Application ArchitectureAndroid Application ArchitectureViewView ComponentActivityUser Interaction EventApplication and Component GluesIntent (Cntd.)Intent from Peerlist to MessagingWorking in BackgroundServiceThreadingMP1 Threading StructurePeriodical Register with ServerActivity LifetimeDeclaration of App – Manifest.xmlExternal ResourcesDebugDebug on DeviceInstall package to Android PhonesOther TipsDemoDalvik Debug Monitoring ServiceAndroid Debug Bridge (ADB)BEGIN ANDROID JOURNEYIN HOURSCS425 / CSE 424 / ECE 428 [Fall 2009]Sept. 14, 2009Ying HuangREFERENCEOnline development guidehttp://developer.android.com/guide/index.htmlBook resource“Professional Android Application Development”, by Reto Meier, (Wrox, amazon link)“Android A programmers guide”, by J.F. DiMarzio, (McGraw Hill, amazon link)“Beginning.Android”, by Mark L. Murphy, (Apress, amazon link)“Pro Android”, by Sayed Y. Hashimi, Satya Komatineni, (Apress, amazon link)MOBILE OSSymbianiPhoneRIM's BlackBerryWindow mobileLinuxPalm webOSAndroid….WHAT IS ANDROID?Google  OHA (Open Handset Alliance)The first truly open and comprehensive platform for mobile devices, all of the software to run a mobile phone but without the proprietary obstacles that have hindered mobile innovation.Linux OS kernelJava programmingOpen source libraries: SQLite, WebKit, OpenGLWHY ANDROIDA simple and powerful SDKNo licensing, distribution, or development feesDevelopment over many platform Linux, Mac OS, windows Excellent documentationThriving developer communityFor usJava-based, easy to import 3rd party Java libraryFunding (40+ G1 phones)Prize (amazon’s kindle)Job opportunityANDROID SDK FEATUREGSM, EDGE, and 3G networks, WiFi, BluetoothAPI Support for Bluetoothe, WiFi Ad hoc modeLibrariesMedia, SQLite, WebKit, SSLHardware control:Accelerometer, compass, microphone, camera, GPStouch screen, power Location-based service, map (Google API)MP3MP3TOOLSThe Android Emulator Implementation of the Android virtual machine Test and debug your android applications.Dalvik Debug Monitoring Service (DDMS) Monitor and Control the Dalvik virtual machinesLogcat (see logged msgs)Android Debug Bridge (ADB) Manage the state of an emulator instance or Android-powered device Copy files, install compiled application packages, and run shell commands.Traceview Graphical analysis tool for viewing the trace logs from your Android application Debug your application and profile its performanceMkSDCard Creates an SDCard disk image MP2RUN TWO NETWORKING EMULATORS IN A COMPUTER (UPDATED) - ADBQ: run two networking emulators in a computer A using the public IP address of A, during debugging and demo?A1: telnet + redir (MP1 doc)A2: adb forward1) Port forward to connect Android from localhostabd –s emulator-5554 forward tcp:15216 tcp:152162) Use a proxy server which can listen on my_public_ip:15216 and forward the data to localhost:15216stcppipe localhost 15216 15216E1E2M1MP1Underlying Infrastructure-based WiFi /TCP/IP Network G1 Phone (Peer)Peer RegistrationServerPeerPeerMP1 PROJECT STRUCTURERegistration PeerList MessagingANDROID APPLICATION ARCHITECTUREViews:Building block for user interface components.ActivitiesA single, focused thing that the user can do.Interaction with users: creating a window to place UIfull-screen windows, floating windows, embedded inside of another activityEx: Registration, Peerlist, Messaging GUIView Activity Intent Service Thread ResourceANDROID APPLICATION ARCHITECTUREServices (Background)Ex: Network OperationIntent Inter-communication among activities or servicesResourceExternalization of strings and graphicsNotificationsignaling users: Light, sound, icon, dialog, notificationEx: new message arrivesContent Providers share data between applicationsActivityActivityIntentView Activity Intent Service Thread ResourceVIEWLayout of visual interfaceJava Code Initialize Access TextView myTextView = (TextView)findViewById(R.id.myTextView);<?xml version=”1.0” encoding=”utf-8”?><LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent”><TextView android:id=”@+id/myTextView” android:layout_width=”fill_parent” android:layout_height=”wrap_content” android:text=”Hello World, HelloWorld”/></LinearLayout>@Overridepublic void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.screen);}screen.xmlView Activity Intent Service Thread ResourceVIEW COMPONENTWidget ToolboxTextView, EditText,Button, Form, TimePicker…ListView (PeerList)Update list by arraysArrayAdaptermyListView.setAdapterLayoutPositions of controlsLinearLayout, Relativelayouthttp://developer.android.com/guide/tutorials/views/index.htmlMenuExit appView Activity Intent Service Thread ResourceACTIVITYForeground Activity: suspended when invisibleVisual, interactiveEx: Game, MapBackground Service: Little interaction Ex: Hardware, power managementIntermittent ActivityNotification, serviceExpects some interactivity but does most of its work in the background.NetworkOperation ManagementNetworkOperation ManagementRegistrationPeer ListMessagingView Activity Intent Service Thread ResourceUSER INTERACTION EVENT onKeyDown. onKeyUponTrackBallEventonTouchEventmyEditText.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { … return true; } return false; }});}registerButton.setOnClickListener(new OnClickListener() { public void onClick(View arg0) {….}}View Activity Intent Service Thread ResourceAPPLICATION AND COMPONENT GLUESAn intent is an abstract description of an operation to be performed.Launch an activityExplicitImplicit: Android selects the best startActivity();Subactivity: feedbackChild: use intent as feedback, setResultParent:


View Full Document

U of I CS 425 - BEGIN ANDROID JOURNEY IN HOURS

Documents in this Course
Lecture 8

Lecture 8

23 pages

TIPS

TIPS

3 pages

The Grid

The Grid

41 pages

Lecture 4

Lecture 4

27 pages

Lecture 4

Lecture 4

20 pages

The Grid

The Grid

41 pages

LECTURE 5

LECTURE 5

25 pages

Multicast

Multicast

23 pages

LECTURE

LECTURE

34 pages

Load more
Download BEGIN ANDROID JOURNEY IN HOURS
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view BEGIN ANDROID JOURNEY IN HOURS and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view BEGIN ANDROID JOURNEY IN HOURS 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?