Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

theDroidLady Agenda • Architecture • MVP vs Update Release • Release Checklist • Understanding Play Console • My Recommendations • Things I wish I knew :)

Slide 3

Slide 3 text

theDroidLady Architecture 01.

Slide 4

Slide 4 text

theDroidLady Excuses 🤷 • We don’t need an architecture. • Don’t have enough time for architecture. • We are a lean team.

Slide 5

Slide 5 text

theDroidLady Credits : DesignCrowd

Slide 6

Slide 6 text

theDroidLady App Architecture 01.2

Slide 7

Slide 7 text

theDroidLady Without Packaging With Packaging

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

theDroidLady Few things to better understand • Language & Platform Agnostic • Improves Changeability • Learn when it is important and essential both.

Slide 11

Slide 11 text

theDroidLady MVP vs Update Release 02.

Slide 12

Slide 12 text

theDroidLady MVP (Minimum Viable Product)

Slide 13

Slide 13 text

theDroidLady Update Release.

Slide 14

Slide 14 text

theDroidLady MVP How we do things?

Slide 15

Slide 15 text

theDroidLady How we do things? • No architecture • Ship it fast. • Use 3rd party libraries/frameworks. • Get the market fit.

Slide 16

Slide 16 text

theDroidLady Update Release Make your Product scalable.

Slide 17

Slide 17 text

theDroidLady Make your Product scalable. • Migrate app to proper architecture. • Use design pattern. • Start Minimizing resources. • Have a proper planning.

Slide 18

Slide 18 text

theDroidLady Release Checklist 03.

Slide 19

Slide 19 text

theDroidLady Release Checklist : 03.2 101

Slide 20

Slide 20 text

theDroidLady Add proper comments. !!/** * @param input * @return SomeRandomOutput !*/ fun doSomeCalculation(input:Int) : SomeRandomOutput { !//do your task here }

Slide 21

Slide 21 text

theDroidLady Convert your images to SVG/WebP JPEG / PNG SVGs WebP ~ 300 KB ~ 5 KB ~ 30-40 KB

Slide 22

Slide 22 text

theDroidLady Convert your images to SVG/WebP

Slide 23

Slide 23 text

theDroidLady Using Lint checks

Slide 24

Slide 24 text

theDroidLady Others. • Optimize imports • Reorganize code “ Use macros to club both of them together ” • Handle permissions

Slide 25

Slide 25 text

theDroidLady Use Macros

Slide 26

Slide 26 text

theDroidLady Use Macros Credits: Easy Read

Slide 27

Slide 27 text

theDroidLady Release Checklist : 03.2 201

Slide 28

Slide 28 text

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.

Slide 29

Slide 29 text

theDroidLady Implementation vs debugImplementation debugImplementation ‘com.squareup.leakcanary:leakcanary-android:X.X’ implementation 'com.squareup.retrofit2:retrofit:X.X.X'

Slide 30

Slide 30 text

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(); } } }

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

theDroidLady Error handling. when(exception){ is UnAuthorizedException !-> !// Show an Un-Auth message is ArithmeticException !-> !// Show that specific message else !-> toast("Something went wrong!") }

Slide 33

Slide 33 text

theDroidLady • Reviewing crash logs from your crashlytics services. • Write Proguard rules where you need obfuscation, optimisation and shrinking.

Slide 34

Slide 34 text

theDroidLady Release Checklist : 03.3 301

Slide 35

Slide 35 text

theDroidLady Versioning versionName “Major.Minor.Patch” Check this out for more info: https://semver.org/

Slide 36

Slide 36 text

theDroidLady Generate release build.

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

theDroidLady Analyze APK Credits : riggaroo.dev

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

theDroidLady • Attach additional task like lint checks, optimizing imports etc. in your pre-commit. • Push to Play Store.

Slide 41

Slide 41 text

theDroidLady Understanding Play Console 04.

Slide 42

Slide 42 text

theDroidLady Understanding KPIs

Slide 43

Slide 43 text

theDroidLady Crashes & ANRs.

Slide 44

Slide 44 text

theDroidLady Understanding Android Vitals

Slide 45

Slide 45 text

theDroidLady Vitals

Slide 46

Slide 46 text

theDroidLady Vitals

Slide 47

Slide 47 text

theDroidLady Staged Rollout

Slide 48

Slide 48 text

theDroidLady • Alpha/Beta Testing • Open & Internal Testing • Publishing to the user

Slide 49

Slide 49 text

theDroidLady My Recommendations 05.

Slide 50

Slide 50 text

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.

Slide 51

Slide 51 text

“ 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

Slide 52

Slide 52 text

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

Slide 53

Slide 53 text

“ Just writing the code is not enough, Writing in an efficient way is the real challenge. Do mistakes & learn.“ @theDroidLady

Slide 54

Slide 54 text

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/

Slide 55

Slide 55 text

theDroidLady Questions? Thank You 🙏