Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android for Java Developers

Avatar for Siva G Siva G
March 15, 2017

Android for Java Developers

Avatar for Siva G

Siva G

March 15, 2017

More Decks by Siva G

Other Decks in Programming

Transcript

  1. In collaboration with 2 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Siva Govindarajan - Who am I? § Solution Architect and Technology Enthusiast § Co-founder of Central Florida GDG Chapter § Loves, lives and teaches Android! § Hobbyist Android and iOS developer. google.com/+SivaG1 @sivag1 about.me/sivag1 sivag1.wordpress.com [email protected]
  2. In collaboration with 3 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Why mobile? Why Android? How different are iOS and Android anyway? Well, not so much after all! http://www.redmondpie.com/ios-9-vs- android-m-visual-comparison- screenshots/
  3. In collaboration with 4 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. But really, why? This is why.
  4. In collaboration with 5 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. What is Android? § The Android OS is a Linux system § Android apps are written in Java, yes the same Java we love! § Android app lives in its own security sandbox § System assigns each app a unique Linux user ID
  5. In collaboration with 6 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. How much Java in Android? Android = Java – some APIs + Android SDK What is included in Android? http://developer.android.com/reference/packages.html What encompasses Java? http://docs.oracle.com/javase/8/docs/api/ Android includes the essential packages from the Java SE API (java.lang, java.util, java.net, etc.) It excludes AWT, Swing, Java 2D, Java Sound, RMI, CORBA, the scripting API, JMX, JAXB, the Java Print Service API, parts of JDBC and probably several other things.
  6. In collaboration with 7 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Android Versions and Naming
  7. In collaboration with 8 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Development Environment Setup § Simple and basic steps to get an App running – Step 1: Install JDK – Step 2: Install and configure the Android SDK – Step 3: Create your first Android App – Step 4: Build and Run your App Download Android SDK from http://developer.android.com Or Simply download and install Android Studio bundle (including Android SDK) for your OS
  8. In collaboration with 9 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Create new Android project
  9. In collaboration with 10 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Create new Android project
  10. In collaboration with 11 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Configure the App
  11. In collaboration with 12 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Create Activity
  12. In collaboration with 13 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Enter Activity Details
  13. In collaboration with 14 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Voila, your app is ready!
  14. In collaboration with 15 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Run on emulator or device
  15. In collaboration with 16 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. iOS vs Android http://www.csectioncomics.com/2010/11/iphone-vs-android-vs-blackberry.html
  16. In collaboration with 17 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. The Manifest File
  17. In collaboration with 18 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. How do I build for installation? – Gradle, advanced build management system based on Groovy – Open source, combines power of Ant and Maven – Powerful dependency management – A single build system, across IDEs and Command Line
  18. In collaboration with 19 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Building Process Running
  19. In collaboration with 20 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. No Android Device? Emulator to the rescue!
  20. In collaboration with 21 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Sample Activity Layout Code 1
  21. In collaboration with 22 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Sample Activity Java Code Important points 1. UI Element has an Id 2. Variables in our code link to UI elements 3. Update UI element content from the program 1 2 3
  22. In collaboration with 23 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Running Sample App
  23. In collaboration with 24 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Application Components
  24. In collaboration with 25 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Activity Activity Lifecycle § Lifecycle Callbacks
  25. In collaboration with 26 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Java Developer FAQ Do I need to learn more API? • Yes, that’s Android SDK. • And UI design via simple XMLs. Can I use my Java patterns? • Yes • Anything that applies for POJO can be used. Are iOS and Android development similar? • Yes, in many ways. • Just learn Swift for iOS and many things are comparable. Are there lots of boilerplate coding? • Yes, unfortunately. • But, can use many open source libraries to make life easy.
  26. In collaboration with 27 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Next Steps, other resources Free Self Learning: • Developing Android Apps by Udacity.com (Most Recommended) • YouTube and tons of other online materials Free In-Class Training: • Central Florida Android Study Jams (Follow on G+ and Meetup) Orlando Code Camp: (presented by me) • Develop Android apps fast with Libraries, well, not so fast. • Beginning iOS for Android developers. • http://orlandocodecamp.com
  27. In collaboration with 30 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. 30 Android Framework
  28. In collaboration with 31 The information contained in this document

    is proprietary. Copyright © 2014 Capgemini. All rights reserved. Service Lifecycle