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

Building Your First Android App: A Guide for iO...

Building Your First Android App: A Guide for iOS Developers

Are you being asked to do Android development at work, even though you're an iOS developer? Maybe you need to support the Android version of your company's app. Or you're collaborating with the Android team to ensure feature parity between iOS and Android.

If you're already a mobile developer in iOS, there's no need to start from scratch to learn Android! There are many concepts that apply to mobile development across platforms. In this talk, I will go over an intermediate level Android app, exploring the similar architectural concepts between Android and iOS. And for the differences, I'll explain the Android concept by comparing and contrasting to its corollary iOS counterpart.

By demonstrating how to leverage your existing iOS knowledge, this talk will help you speed up your adoption of Android and make you a stronger mobile developer overall!

Vui Nguyen

May 20, 2024
Tweet

More Decks by Vui Nguyen

Other Decks in Technology

Transcript

  1. Vui Nguyen @sun fi shgurl linktr.ee/sun fi shgurl A Guide

    for iOS Developers Building Your First Android App
  2. Our Problem / Challenge • You’re a n iOS developer,

    t a sked with building a n Android a pp 😱 • But where do you st a rt? • It’s a bout more th a n just the little synt a ctic a l di ff erences! • Wh a t a bout fe a ture p a rity?! linktr.ee/sun fi shgurl
  3. Feature Parity: Ensuring that a feature works the same across

    platforms. Does not mean the feature is implemented the same across platforms! - Vui Nguyen (not famous …. yet) linktr.ee/sun fi shgurl
  4. What’s One Possible Solution? • My t a lk! •

    My solution focuses on: • a rchitecture • process • lever a ging existing iOS knowledge! You know more th a n you think you do to get st a rted! • Are we excited yet? Let’s go 🚀 linktr.ee/sun fi shgurl
  5. • Introduce problem • Introduce myself • Go a ls

    for this t a lk • Introducing T a sk Tr a cker App: iOS • How We Built Android a nd iOS Apps in P a r a llel Overview linktr.ee/sun fi shgurl
  6. • Building a CRUD Mobile App on Any Pl a

    tform • Components of Every CRUD Mobile App • App Flows: • Cre a te - Re a d: Add Flow • Upd a te: Edit Flow • Delete: Delete Flow Overview linktr.ee/sun fi shgurl
  7. • Demo: T a sk Tr a cker App for

    Android • Putting it All Together: Tips for Building a St a nd a lone Android App • Resources • Shoutouts Overview linktr.ee/sun fi shgurl
  8. I’m Vui Nguyen Hello!👋 • Softw a re engineer with

    20+ ye a rs experience a cross multiple tech st a cks • Mobile developer since 2011 (cross- pl a tform, iOS, le a rning Android) • Technic a l Le a der • Former Le a dership Fellow for Women Who Code Mobile • Schnoodle Mom • Fisherwom a n linktr.ee/sun fi shgurl
  9. Non Goals for this Talk What this talk is NOT

    about • Not a n a n a lysis on n a tive versus cross pl a tform mobile development • Not a n a n a lysis on how to use gener a tive AI to build our a pps for us • Spoiler a lert: Gener a tive AI c a nnot do ALL the work for us! • Not me a nt to te a ch you the found a tion of mobile development • This t a lk a ssumes you h a ve intermedi a te level knowledge of iOS Swift development • Not a bout building Android a pps using the “best” f ill in the bl a nk here: design p a tterns, a rchitecture, best pr a ctices, etc linktr.ee/sun fi shgurl
  10. Goals for this Talk What this talk is about •

    How to get st a rted on Android development by building on your existing iOS knowledge • a void a n a lysis p a r a lysis • progress / improve a s you go • Progress over Perfection • Demonstr a te process for building a mobile a pp on either pl a tform linktr.ee/sun fi shgurl
  11. https://bit.ly/TaskTrackerAppiOSDemo Task Tracker App Demo: iOS linktr.ee/sun fi shgurl •

    Open Source Project for Women Who Code Mobile • Tr a cks T a sks Being Worked On • Tr a cks Time Spent on T a sks • CRUD Oper a tions
  12. How We Built Android and iOS Apps in Parallel •

    Surprise! 😮 We a lso built the T a sk Tr a cker App for Android a t the s a me time • How did we do it? • Wh a t lessons did we le a rn? linktr.ee/sun fi shgurl
  13. How We Built Android and iOS Apps in Parallel How

    Women Who Code Mobile Did It • Women Who Code Mobile w a s a n online technic a l tr a ck community, th a t w a s p a rt of Women Who Code. (Women Who Code shut down in April 2024 😭) • Project M a int a iner Te a ms were comprised of volunteers for Women Who Code Mobile • As the Le a dership Fellow of WWCode Mobile, I formed the m a int a iner te a ms b a sed on volunteer skill, interest, a nd a v a il a bility to commit to the project • Contributors comprised of regul a r community members of WWCode Mobile a nd volunteer te a m members linktr.ee/sun fi shgurl
  14. How We Built Android and iOS Apps in Parallel How

    Women Who Code Mobile Did It • Project Te a m Bre a kdown: • E a ch te a m (Android a nd iOS) h a d: • 2-3 project m a int a iners • Android: G a uri, Ren, Sepideh • iOS: Cl a udi a a nd Dev a nshi • project m a n a ger (Ceceli a for both) • project le a d a nd a rchitect (Vui for both) linktr.ee/sun fi shgurl
  15. How We Built Android and iOS Apps in Parallel How

    Women Who Code Mobile Did It • Prep a r a tion Le a ding Up To Development: • October 2023: WWCode Mobile hosted open source contribution workshop • November 2023: WWCode Mobile hosted open source m a int a iners workshop • December 2024: • f in a lize m a int a iner te a ms • st a rt discussion on a pp ide a , a pp wirefr a mes a nd MVP project scope linktr.ee/sun fi shgurl
  16. MVP: Minimum Viable Product, is a version of a product

    with just enough features to be usable - https://en.wikipedia.org/wiki/ Minimum_viable_product linktr.ee/sun fi shgurl
  17. How We Built Android and iOS Apps in Parallel How

    Women Who Code Mobile Did It • Project Schedule: • J a nu a ry 2024: Project Kick O ff (for both Android a nd iOS) • Kick O ff Event for e a ch pl a tform over Zoom • Introduce a pp wirefr a mes to community • Initi a l project folders set up (MVVM structure) • Introduce open source process a nd work f low to community • Est a blish Github a nd o ff ici a l Sl a ck ch a nnel for project coll a bor a tion / communic a tion linktr.ee/sun fi shgurl
  18. How We Built Android and iOS Apps in Parallel How

    Women Who Code Mobile Did It • Project Schedule: • J a nu a ry 2024: Project Kick O ff (for both Android a nd iOS) • Set up Github project bo a rds • Cre a ted epics from a pp wirefr a mes a nd then broken down further into sm a ller issues • Initi a l Github issues written up • Huge th a nks to Ceceli a for doing this project m a n a gement work 🎉 linktr.ee/sun fi shgurl
  19. Android and iOS Github project boards How We Built Android

    and iOS Apps in Parallel linktr.ee/sun fi shgurl
  20. How We Built Android and iOS Apps in Parallel How

    Women Who Code Mobile Did It • Project Schedule: • J a nu a ry 2024: Project Kick O ff (for both Android a nd iOS) • Th a nks for writing up beginner issues: • Sepideh (for Android) • Cl a udi a (for iOS) • Work on projects o ff ici a lly st a rts! First PRs from contributors st a rt getting merged within the f irst d a y or so of kick o ff events 🚀 linktr.ee/sun fi shgurl
  21. How We Built Android and iOS Apps in Parallel How

    Women Who Code Mobile Did It • Project Schedule: • Febru a ry 2024: St a tus Event for Android a nd iOS • Held St a tus Event for e a ch pl a tform over Zoom • iOS delivered MVP demo • Android demos progress so f a r, but struggling to m a ke MVP • Celebr a te contributors’ progress so f a r • Vui promotes a ctive contributor Sepideh to Android project m a int a iner st a tus • Vui cre a tes Github templ a tes for writing issues a nd PRs - contributors needed guid a nce beyond a “bl a nk” sl a te linktr.ee/sun fi shgurl
  22. How We Built Android and iOS Apps in Parallel How

    Women Who Code Mobile Did It • Project Schedule: • M a rch 2024: Wr a p Up Event for Android a nd iOS • Held Wr a p Up Event for e a ch pl a tform over Zoom • iOS delivered MVP + bonus fe a tures 🎉 • swipe to delete, t a sk priority • Android delivers MVP linktr.ee/sun fi shgurl
  23. How We Built Android and iOS Apps in Parallel How

    Women Who Code Mobile Did It • Project Schedule: • M a rch 2024: Wr a p Up Event for Android a nd iOS • Projects wr a p up a nd a ll open issues a re closed • Fin a l celebr a tion of a ll contributors 🥳 • 12+ combined on e a ch pl a tform! • Meet a nd Greet a fter present a tion (not recorded) linktr.ee/sun fi shgurl
  24. Android Wrap Up Event How We Built Android and iOS

    Apps in Parallel linktr.ee/sun fi shgurl https://bit.ly/TaskTrackerAppAndroidWrapUpEvent
  25. iOS Wrap Up Event How We Built Android and iOS

    Apps in Parallel linktr.ee/sun fi shgurl https://bit.ly/TaskTrackerAppiOSWrapUpEvent
  26. Building a CRUD Mobile App on Any Platform What Every

    CRUD Mobile App Needs • Architecture • MVVM: sep a r a te UI from business logic linktr.ee/sun fi shgurl iOS Project Structure Android Project Structure
  27. Building a CRUD Mobile App on Any Platform What Every

    CRUD Mobile App Needs • UI • Android: Jetp a ck Compose • iOS: SwiftUI • Logic • Android: Kotlin, ViewModels • iOS: Swift, ViewModels linktr.ee/sun fi shgurl
  28. Building a CRUD Mobile App on Any Platform What Every

    CRUD Mobile App Needs • N a vig a tion • Android: Compose support for N a vig a tion (N a vController) • iOS: N a vig a tionSt a ck, N a vig a tionLink • Persistence • Android: • Room d a t a b a se • Use coroutines ( a synchronous c a lls) to a ccess d a t a b a se in b a ckground thre a d / scope • iOS: SwiftD a t a linktr.ee/sun fi shgurl
  29. Building a CRUD Mobile App on Any Platform What Every

    CRUD Mobile App Needs • Binding d a t a to UI • Android: • Closures c a pture upd a ted st a te from UI • St a teFlows expose d a t a b a se to the ViewModel • ViewModel s a ves c a ptured st a te into d a t a b a se through St a teFlow • ViewModel upd a tes UI from d a t a b a se through St a teFlow • iOS: • SwiftUI property wr a pper @Published for T a sk Model • SwiftUI property wr a ppers @St a te a nd @Binding to set / get st a te from UI linktr.ee/sun fi shgurl
  30. Building a CRUD Mobile App on Any Platform App Flows

    • Cre a te - Re a d: Add Flow • Upd a te: Edit Flow • Delete: Delete Flow linktr.ee/sun fi shgurl
  31. List Screen - Navigation Android Side List Screen - Navigation

    iOS Side linktr.ee/sun fi shgurl • Displ a y + Button on List Screen
  32. Android Side iOS Side linktr.ee/sun fi shgurl List Screen -

    Navigation List Screen - Navigation • Press + Button to N a vig a te to Det a il Screen
  33. Android Side • N a vig a te to Det

    a il Screen iOS Side linktr.ee/sun fi shgurl List Screen - Navigation List Screen - Navigation
  34. Detail Screen Android Side • Displ a y Det a

    il Screen Detail Screen iOS Side linktr.ee/sun fi shgurl
  35. Detail Screen Android Side • Displ a y D a

    te Button Detail Screen iOS Side linktr.ee/sun fi shgurl
  36. Detail Screen Android Side • D a te Button Detail

    Screen iOS Side linktr.ee/sun fi shgurl
  37. Detail Screen Android Side • D a te Button -

    displ a y D a te Picker Detail Screen iOS Side linktr.ee/sun fi shgurl
  38. Detail Screen Android Side Detail Screen iOS Side linktr.ee/sun fi

    shgurl • D a te Button - displ a y D a te Picker
  39. Detail Screen Android Side • D a te picker -

    upd a te st a te Detail Screen iOS Side linktr.ee/sun fi shgurl • st a te upd a ted in screen a nd / or view model but NOT in T a sk Model yet
  40. Detail Screen Android Side • Displ a y TextField Detail

    Screen iOS Side linktr.ee/sun fi shgurl
  41. Detail Screen Android Side • TextField - upd a te

    st a te Detail Screen iOS Side • st a te upd a ted in screen a nd / or view model but NOT in T a sk Model yet linktr.ee/sun fi shgurl
  42. Detail Screen Android Side • Displ a y Time Buttons

    Detail Screen iOS Side linktr.ee/sun fi shgurl
  43. Detail Screen Android Side • Time Buttons - Displ a

    y Time Pickers Detail Screen iOS Side linktr.ee/sun fi shgurl
  44. Detail Screen Android Side Detail Screen iOS Side linktr.ee/sun fi

    shgurl • Time Buttons - Displ a y Time Pickers
  45. Detail Screen Android Side Detail Screen iOS Side linktr.ee/sun fi

    shgurl • Time Buttons - Displ a y Time Pickers
  46. • Time Buttons - Displ a y Time Pickers Detail

    Screen Android Side Detail Screen iOS Side linktr.ee/sun fi shgurl • Time Pickers - upd a te st a te
  47. Detail Screen Android Side • Time Pickers - upd a

    te st a te Detail Screen iOS Side linktr.ee/sun fi shgurl • st a te upd a ted in screen a nd / or view model but NOT in T a sk Model yet
  48. Detail Screen Android Side • Displ a y Done Button

    Detail Screen iOS Side linktr.ee/sun fi shgurl
  49. Detail Screen Android Side • T a pping on Done

    Button - S a ve New T a sk Detail Screen iOS Side linktr.ee/sun fi shgurl
  50. Detail Screen Android Side • T a sk Model Detail

    Screen iOS Side linktr.ee/sun fi shgurl
  51. Detail Screen Android Side • Done T a pped -

    S a ve New T a sk Detail Screen iOS Side linktr.ee/sun fi shgurl
  52. Detail Screen Android Side • Done T a pped -

    S a ve New T a sk Detail Screen iOS Side linktr.ee/sun fi shgurl
  53. Detail Screen Android Side • Done Button - N a

    vig a te b a ck to list Detail Screen iOS Side linktr.ee/sun fi shgurl
  54. Detail Screen Android Side • Done Button - N a

    vig a te b a ck to list Detail Screen iOS Side linktr.ee/sun fi shgurl
  55. List Screen - Return Android Side • Displ a y

    a dded t a sk List Screen - Return iOS Side linktr.ee/sun fi shgurl
  56. List Screen - Return Android Side • Displ a y

    a dded t a sk List Screen - Return iOS Side linktr.ee/sun fi shgurl
  57. List Screen Android Side • Displ a y list of

    t a sks List Screen iOS Side linktr.ee/sun fi shgurl
  58. • T a p on Row - N a vig

    a te to Det a il Screen List Screen Android Side List Screen iOS Side linktr.ee/sun fi shgurl
  59. Detail Screen Android Side • Displ a y C a

    ncel Button iOS Side linktr.ee/sun fi shgurl Detail Screen
  60. Detail Screen Android Side • Displ a y C a

    ncel Button iOS Side linktr.ee/sun fi shgurl Detail Screen
  61. Detail Screen Android Side • Displ a y C a

    ncel Con f irm a tion Di a log iOS Side linktr.ee/sun fi shgurl Detail Screen
  62. Detail Screen Android Side • Displ a y C a

    ncel Con f irm a tion Di a log: T a p Ok a y button iOS Side linktr.ee/sun fi shgurl Detail Screen • Result: Dismiss Con f irm a tion Di a log a nd return to List screen • Discl a imer: c a rbon.now.sh a utocorrects != to ≠ 😥
  63. Detail Screen Android Side iOS Side linktr.ee/sun fi shgurl Detail

    Screen • Displ a y C a ncel Con f irm a tion Di a log: T a p C a ncel button • Result: Dismiss Con f irm a tion Di a log a nd st a y on Det a il screen
  64. Detail Screen Android Side • T a pping on Done

    Button: S a ve Edited T a sk Detail Screen iOS Side linktr.ee/sun fi shgurl
  65. Detail Screen Android Side • Done T a pped -

    S a ve Edited T a sk Detail Screen iOS Side linktr.ee/sun fi shgurl
  66. Detail Screen Android Side • Done Button - N a

    vig a te b a ck to list Detail Screen iOS Side linktr.ee/sun fi shgurl
  67. Detail Screen Android Side • Done Button - N a

    vig a te b a ck to list Detail Screen iOS Side linktr.ee/sun fi shgurl
  68. List Screen - Return Android Side • Displ a y

    upd a ted t a sk List Screen - Return iOS Side linktr.ee/sun fi shgurl
  69. List Screen - Return Android Side • Displ a y

    upd a ted t a sk List Screen - Return iOS Side linktr.ee/sun fi shgurl
  70. List Screen Android Side • Displ a y list of

    t a sks List Screen iOS Side linktr.ee/sun fi shgurl
  71. List Screen Android Side • T a p on Row

    - N a vig a te to Det a il Screen List Screen iOS Side linktr.ee/sun fi shgurl
  72. Detail Screen Android Side • Displ a y Delete Button

    iOS Side linktr.ee/sun fi shgurl Detail Screen
  73. Detail Screen Android Side • Displ a y Delete Button

    iOS Side linktr.ee/sun fi shgurl Detail Screen
  74. Detail Screen Android Side • Displ a y Delete Con

    f irm a tion Di a log iOS Side linktr.ee/sun fi shgurl Detail Screen
  75. Detail Screen Android Side iOS Side linktr.ee/sun fi shgurl Detail

    Screen • Displ a y Delete Con f irm a tion Di a log: T a p C a ncel button • Result: Dismiss Con f irm a tion Di a log a nd st a y on Det a il screen
  76. Detail Screen Android Side • Displ a y Delete Con

    f irm a tion Di a log: T a p Ok a y button iOS Side linktr.ee/sun fi shgurl Detail Screen • Result: • ✅ Dismiss Con f irm a tion Di a log • Delete T a sk • Return to List screen
  77. Detail Screen Android Side • Displ a y Delete Con

    f irm a tion Di a log: T a p Ok a y button iOS Side linktr.ee/sun fi shgurl Detail Screen • Result: • ✅ Dismiss Con f irm a tion Di a log • ✅ Delete T a sk • Return to List screen
  78. Detail Screen Android Side • Displ a y Delete Con

    f irm a tion Di a log: T a p Ok a y button iOS Side linktr.ee/sun fi shgurl Detail Screen • Result: • ✅ Dismiss Con f irm a tion Di a log • ✅ Delete T a sk • ✅ Return to List screen
  79. List Screen - Return Android Side • Displ a y

    upd a ted t a sks, deleted t a sk gone List Screen - Return iOS Side linktr.ee/sun fi shgurl
  80. List Screen - Return Android Side List Screen - Return

    iOS Side linktr.ee/sun fi shgurl • Displ a y upd a ted t a sks, deleted t a sk gone
  81. https://bit.ly/TaskTrackerAppAndroidDemo Task Tracker App Demo: Android linktr.ee/sun fi shgurl •

    Open Source Project for Women Who Code Mobile • Tr a cks T a sks Being Worked On • Tr a cks Time Spent on T a sks • CRUD Oper a tions
  82. Putting it All Together Tips for Building a Standalone Android

    App • Use kickst a rter tutori a ls for found a tion a l knowledge: • Setting up development environment, Run a HelloWorld a pp in simul a tor, etc • Use s a mple a pplic a tions a s a st a rting point for wh a t you’re building: • for a rchitecture, infr a structure, a pp f low, etc. • Focus on le a rning the why: a rchitecture, theory, process for mobile development linktr.ee/sun fi shgurl
  83. Putting it All Together Tips for Building a Standalone Android

    App • For synt a x help a nd deeper dives in cert a in a re a s, use the following: • APIs: Android Studio, Google document a tion • Gener a tive AI tools : Gemini AI in Android Studio, Github copilot • Bonus, Option a l: • To pr a ctice in re a l life, contribute to open source a nd st a rt with beginner issues linktr.ee/sun fi shgurl
  84. Resources Open Source Projects - Task Tracker links • WWCodeMobile

    Github repo h a s been t a ken down 😭 • Fork: https://github.com/vuinguyen/WWCodeMobile • coding-projects/ a ndroid, br a nch: a ndroid-mvp- a pp • coding-projects/ios, br a nch: ios-mvp- a pp • Projects h a ve ended, no longer t a king contributions (but c a n use a s a reference) linktr.ee/sun fi shgurl
  85. Resources Android • Kotlin: https://developer. a ndroid.com/kotlin/s a mples •

    Compose: https://developer. a ndroid.com/courses/ a ndroid-b a sics- compose/course • Architecture: https://github.com/ a ndroid/ a rchitecture-s a mples • Architecture a nd Compose: https://github.com/skydoves/DisneyCompose/ linktr.ee/sun fi shgurl
  86. Resources Android • N a vig a tion: https://developer. a

    ndroid.com/develop/ui/compose/n a vig a tion • St a teFlow: https://developer. a ndroid.com/kotlin/ f low/st a te f low- a nd-sh a red f low • Coroutines: https://developer. a ndroid.com/kotlin/coroutines • Room d a t a b a se: https://developer. a ndroid.com/courses/p a thw a ys/ a ndroid-b a sics- compose-unit-6-p a thw a y-2 • Room d a t a b a se (with coroutines & concurrency) code l a b: • https://developer. a ndroid.com/codel a bs/b a sic- a ndroid-kotlin-compose- persisting-d a t a -room linktr.ee/sun fi shgurl
  87. • Introduce problem • Introduce myself • Go a ls

    for this t a lk • Introducing T a sk Tr a cker App: iOS • How We Built Android a nd iOS Apps in P a r a llel What We Covered Today linktr.ee/sun fi shgurl
  88. • Building a CRUD Mobile App on Any Pl a

    tform • Components of Every CRUD Mobile App • App Flows: • Cre a te - Re a d: Add Flow • Upd a te: Edit Flow • Delete: Delete Flow What We Covered Today linktr.ee/sun fi shgurl
  89. • Demo: T a sk Tr a cker App for

    Android • Putting it All Together: Tips for Building a St a nd a lone Android App • Resources • Shoutouts What We Covered Today linktr.ee/sun fi shgurl
  90. Thanks! Questions? • I’m Vui Nguyen • @sun fi shgurl

    • linktr.ee/sun fi shgurl linktr.ee/sun fi shgurl