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

Making Production Ready Android App

Making Production Ready Android App

Session in Google for Startups on "How to make Production-ready Android App"

38f77168b7c5802adc9cc3a5cfcf031b?s=128

Niharika Arora

June 25, 2021
Tweet

More Decks by Niharika Arora

Other Decks in Technology

Transcript

  1. theDroidLady Making your App Production ready. Let’s make it easy

    for you.
  2. theDroidLady Agenda • Architecture • MVP vs Update Release •

    Release Checklist • Understanding Play Console • My Recommendations • Things I wish I knew :)
  3. theDroidLady Architecture 01.

  4. theDroidLady Excuses 🤷 • We don’t need an architecture. •

    Don’t have enough time for architecture. • We are a lean team.
  5. theDroidLady Credits : DesignCrowd

  6. theDroidLady App Architecture 01.2

  7. theDroidLady Without Packaging With Packaging

  8. None
  9. theDroidLady Few things to better understand • Language & Platform

    Agnostic Clean Code & S.O.L.I.D Principles
  10. theDroidLady Few things to better understand • Language & Platform

    Agnostic • Improves Changeability • Learn when it is important and essential both.
  11. theDroidLady MVP vs Update Release 02.

  12. theDroidLady MVP (Minimum Viable Product)

  13. theDroidLady Update Release.

  14. theDroidLady MVP How we do things?

  15. theDroidLady How we do things? • No architecture • Ship

    it fast. • Use 3rd party libraries/frameworks. • Get the market fit.
  16. theDroidLady Update Release Make your Product scalable.

  17. theDroidLady Make your Product scalable. • Migrate app to proper

    architecture. • Use design pattern. • Start Minimizing resources. • Have a proper planning.
  18. theDroidLady Release Checklist 03.

  19. theDroidLady Release Checklist : 03.2 101

  20. theDroidLady Add proper comments. !!/** * @param input * @return

    SomeRandomOutput !*/ fun doSomeCalculation(input:Int) : SomeRandomOutput { !//do your task here }
  21. theDroidLady Convert your images to SVG/WebP JPEG / PNG SVGs

    WebP ~ 300 KB ~ 5 KB ~ 30-40 KB
  22. theDroidLady Convert your images to SVG/WebP

  23. theDroidLady Using Lint checks

  24. theDroidLady Others. • Optimize imports • Reorganize code “ Use

    macros to club both of them together ” • Handle permissions
  25. theDroidLady Use Macros

  26. theDroidLady Use Macros Credits: Easy Read

  27. theDroidLady Release Checklist : 03.2 201

  28. theDroidLady Start analyzing 3rd party libs •Use the ones with

    more community support. •Check for maximum number of stars on GitHub. •Try to use open-source libs more. •Try to extract/use the feature you need.
  29. theDroidLady Implementation vs debugImplementation debugImplementation ‘com.squareup.leakcanary:leakcanary-android:X.X’ implementation 'com.squareup.retrofit2:retrofit:X.X.X'

  30. theDroidLady Variants & Flavors. public class ConfigBuilder { public static

    Config getConfig() { switch (BuildConfig.FLAVOR){ case BuildConstants.PROD: case BuildConstants.PROD_KITKAT: return new ProdConfig(); default: return new DevConfig(); } } }
  31. theDroidLady Variants & Flavors. public class ProdConfig implements Config {

    @Override public String getHostUrl(){ return HOST; } @Override public String getApiHostUrl() { return API_HOST; } @Override public String getReportErrorUrl() { return REPORT_ERROR; } } Same would be there for other configs
  32. theDroidLady Error handling. when(exception){ is UnAuthorizedException !-> !// Show an

    Un-Auth message is ArithmeticException !-> !// Show that specific message else !-> toast("Something went wrong!") }
  33. theDroidLady • Reviewing crash logs from your crashlytics services. •

    Write Proguard rules where you need obfuscation, optimisation and shrinking.
  34. theDroidLady Release Checklist : 03.3 301

  35. theDroidLady Versioning versionName “Major.Minor.Patch” Check this out for more info:

    https://semver.org/
  36. theDroidLady Generate release build.

  37. theDroidLady • Sharing with QA Team using distribution channel like

    Firebase.
  38. theDroidLady Analyze APK Credits : riggaroo.dev

  39. theDroidLady Connect your project using CI/CD pipeline Credits : Medium

  40. theDroidLady • Attach additional task like lint checks, optimizing imports

    etc. in your pre-commit. • Push to Play Store.
  41. theDroidLady Understanding Play Console 04.

  42. theDroidLady Understanding KPIs

  43. theDroidLady Crashes & ANRs.

  44. theDroidLady Understanding Android Vitals

  45. theDroidLady Vitals

  46. theDroidLady Vitals

  47. theDroidLady Staged Rollout

  48. theDroidLady • Alpha/Beta Testing • Open & Internal Testing •

    Publishing to the user
  49. theDroidLady My Recommendations 05.

  50. theDroidLady Recommendations. • Choose a friendly architecture. • Try to

    keep your code modular. • Write Readable code. • Be careful with what you declare in Manifest. • Keep regular committing and raise smaller PRs. • Have pre-commit checks. • Work on Multiple Build Variants • Keep an eye on 3rd party libraries. • Handle Error gracefully. • Test, Test & Test. • Deployment & Distribution pipeline.
  51. “ If you are ordering food from outside everyday, it

    is worth getting a premium membership to a food delivery service. You don’t want to be paying recurring delivery charges every time, because that’s expensive! That’s the difference between writing and not writing tests! “ Ragunath Jawahar
  52. theDroidLady • Slides : https:"//speakerdeck.com/niharika28/unit-testing-what-why-and-how • Source Code : https:"//github.com/niharika2810/UnitTesting-MVVM-Kotlin-Koin-Coroutines-Sample

    • Blog : https:"//medium.com/1mgofficial/unit-testing-in-mvvm-kotlin-databinding-ba3d4ea08f0e
  53. “ Just writing the code is not enough, Writing in

    an efficient way is the real challenge. Do mistakes & learn.“ @theDroidLady
  54. theDroidLady Catch up: • Github : https:!//github.com/niharika2810 • Medium :

    https:!//medium.com/@nik.arora8059 • LinkedIn : https:!//www.linkedin.com/in/thedroidlady/ • Twitter : https:!//twitter.com/theDroidLady • Portfolio : https:!//thedroidlady.com/
  55. theDroidLady Questions? Thank You 🙏