Guest User

Untitled

a guest
Feb 17th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. # Codigo Android Pre-Production Checklist
  2. This gist lists a series of checks for the lead dev to perform when the Android app is about to go live, or ideally as early and as frequent as possible throughout the development lifecycle. Our aim is have the resulting apk be clean, lean and meet worldwide standards.
  3.  
  4. ## In `build.gradle`
  5.  
  6. 1. `minSdkVersion` and `maxSdkVersion` matches FSD
  7. 2. `versionCode` and `versionName` are incremented
  8. 3. `buildTypes` production lane has `minifyEnabled = true`, `shrinkResources = true` and Proguard configurations
  9. 4. Unused libraries to be removed. Outdated libraries to be updated appropriately.
  10.  
  11. ## In `AndroidManifest.xml`
  12.  
  13. 1. Remove unused uses-permission definitions
  14. 2. Ensure `android:roundIcon` is defined properly
  15. 3. Ensure `android:allowBackup` is false - too many problems caused when this is set to true
  16. 4. Ensure `android:supportsRtl` is false
  17.  
  18. ## Android Studio Menu -> Analyze -> Inspect Code
  19. Check and fix as many as possible. But pay particular attention to:
  20.  
  21. 1. Android Lint: Internationalization - Do not have hardcoded strings in xml and code. For preview purposes, tools:text in xml instead. If you hardcode text in xml, users can sometimes see the nonsense you typed in the brief moment before the `TextView` is populated.
  22. 2. Android Lint: Performance - Remove unused parent layouts. A few is ok, but add them up and your app starts to visibly stutter. Review and remove unused resources and strings, you can find bugs and forgotten unimplmented code here. Obsolete code and unnecessary code can be found here too. Duplicated icons and resources can be found here as well.
  23.  
  24. ## Image Resources
  25. 1. Convert full screen backgrounds to .jpg instead of .png if there is no transparency involved.
  26. 2. Ensure the image density folders are in order. Don't be lazy and put everything in `res/drawable`. This makes your app lag/OOM on lower-end devices. Final Android Resizer.jar works well here.
  27. 3. Convert images to .webp if minSdkVersion is >= 19, or run images through ImageOptim to optimize their size. A 1.3MB can be reduced in size by half or more most of the time. *Do not run ImageOptim repeatedly, run only once*
  28.  
  29. ## Others
  30. 1. Do a project wide search for `Log.d`, `Log.i`, `Log.e`, `Log.wtf`. Ensure no user information is leaked onto the console, like `Log.d(TAG, "username: " + username + " password: " + password);`. Dev should be using Timber library for debug logs.
  31. 2. Ensure Crashlytics is set up and enabled only for production
  32. 3. Still using AsyncTask instead of Retrofit? Migrate to Retrofit ASAP.
Add Comment
Please, Sign In to add comment