1 / 25

Joemarie Comeros Amparo

Android Development Orientation for Starters. Joemarie Comeros Amparo. What is Android?. Android is an open mobile phone platform that was developed by Google and later by Open Handset Alliance. Google defines Android as a "software stack" for mobile phones.

becca
Télécharger la présentation

Joemarie Comeros Amparo

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Android Development Orientation for Starters Joemarie Comeros Amparo

  2. What is Android? Android is an open mobile phone platform that was developed by Google and later by Open Handset Alliance. Google defines Android as a "software stack" for mobile phones. Software stack is made up of operating system(the platform on which everything runs), the middleware (the programming that allows applications to talk to a network and to one another) and the applications (the actual programs that phone will run)

  3. Brief History July 2005 - Google Inc. bought from Danger In Open Handset Alliance was formed headed by Google which is composed of companies like Intel, T-Mobile, Spring Nextel and more. In 2008, Android became available as an open source and ASOP(Android Open Source Project) is responsible for maintaining and development of android. February 2009, the first android version was released, Android 1.1. for Mobile G1.

  4. Brief History - continuation Android OS Versions: > Android 1.1 > Android 1.5 Cupcake > Android 1.6 Donut > Android 2.0/2.1 Eclair > Android 2.2.x Froyo > Android 2.3.x Gingerbread > Android 3. x Honeycomb > Android 4.0.x Ice Cream Sandwich > Android 4.1 Jelly Bean

  5. Android Version Market Share

  6. What will you need?

  7. Installation Please refer to: http://developershaven.blogspot.com

  8. Android Development Tool

  9. Application Components

  10. Activities

  11. Services • Run in the background • Can continue even if Activity that started it dies • Should be used if something needs to be done while the user is not interacting with application • Otherwise, a thread is probably more applicable • Should create a new thread in the service to do work in, since the service runs in the main thread • Can be bound to an application • In which case will terminate when all applications bound to it unbind • Allows multiple applications to communicate with it via a common interface • Needs to be declared in manifest file • Like Activities, has a structured life cycle

  12. Services

  13. Project Components

  14. XML • Used to define some of the resources • Layouts (UI) • Strings • Manifest file • Shouldn’t usually have to edit it directly, Eclipse can do that for you • Preferred way of creating UIs • Separates the description of the layout from any actual code that controls it • Can easily take a UI from one platform to another

  15. R Class • Auto-generated: you shouldn’t edit it • Contains IDs of the project resources • Enforces good software engineering • Use findViewById and Resources object to get access to the resources • Ex. Button b = (Button)findViewById(R.id.button1) • Ex. getResources().getString(R.string.hello));

  16. Layouts • Eclipse has a great UI creator • Generates the XML for you • Composed of View objects • Can be specified for portrait and landscape mode • Use same file name, so can make completely different UIs for the orientations without modifying any code

  17. Layouts - continuation

  18. Layouts - continuation • Click ‘Create’ to make layout modifications • When in portrait mode can select ‘Portrait’ to make a res sub folder for portrait layouts • Likewise for Landscape layouts while in landscape mode • Will create folders titled ‘layout-port’ and ‘layout-land’ • Note: these ‘port’ and ‘land’ folders are examples of ‘alternate layouts’, see here for more info • http://developer.android.com/guide/topics/resources/providing-resources.html • Avoid errors by making sure components have the same id in both orientations, and that you’ve tested each orientation thoroughly

  19. Layouts - continuation

  20. Running in Eclipse • Similar to launching a regular Java app, use the launch configurations • Specify an Android Application and create a new one • Specify activity to be run • Can select a manual option, so each time program is run, you are asked whether you want to use the actual phone or the emulator • Otherwise, it should be smart and use whichever one is available

  21. Google Maps Please refer to : http://developershaven.blogspot.com

  22. Google Maps

  23. Google Maps <?xml version="1.0" encoding="utf-8"?> <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <com.google.android.maps.MapView android:id="@+id/mapview1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:enabled="true" android:clickable="true" android:apiKey=“Your API Key Here" /> </LinearLayout>

  24. Resources & Acknowledgements • Installation: http://developershaven.blogspot.com • Google API: http://mfarhan133.wordpress.com/2010/10/01/generate-google-maps-api-key-for-android/ • Android Developer’s Website : http://developer.android.com/index.html • Numerous Forums & other developer sites, including: • http://www.javacodegeeks.com/2011/02/android-google-maps-tutorial.html • http://efreedom.com/Question/1-6070968/Google-Maps-Api-Directions • http://stackoverflow.com • http://www.anddev.org/google_driving_directions_-_mapview_overlayed-t826.html

  25. THANK YOU VERY MUCH! JoemarieComerosAmparo Android Developer Skype/Ymail/Gmail : joemarieamparo

More Related