User Tools

Site Tools


android_study

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
android_study [2020/03/10 01:31] jrsetiandroid_study [2020/03/10 01:58] (current) – [Background Location] jrseti
Line 17: Line 17:
 ====Background Location==== ====Background Location====
  
-[[https://developer.android.com/about/versions/oreo/background-location-limits|Background Lovation Limits]]+[[https://developer.android.com/about/versions/oreo/background-location-limits|Background Location Limits]]
  
 ====Saving Data==== ====Saving Data====
Line 457: Line 457:
   * Use Hierarchy Viewer   * Use Hierarchy Viewer
  
 +App Launch Time
 +
 +  * Don't display a splash screen
 +  * Fix the main activity so the load time is quick
 +
 +Smaller APKs
 +
 +  * Smaller resources
 +  * In build.gradle in 
 +  * 
 +<code>
 +BuildTypes{ 
 +  Release { 
 +    minifyEnabled: True
 +    shrinkResources: True
 +    proguardFiles getDefaultProguardFile('proguard-android.txt', 'proguard-tools.pro')
 +  }
 +}
 +</code>
 +
 +  * Toss out images you don't need for all resolutions.
 +  * Use "Vector Drawables"
 +  * Rotate images instead of separate images.
 +
 +  * Smaller code
 +  * minifiedEnabled: true
 +  * Optimize code like enums (which get inflated to a class)
 +  * JARs can be large. Proguard only helps a bit. Find smaller alternatives.
 +  * You can split APKs into different versions
 +  *  
 ====Tools to use==== ====Tools to use====
  
Line 473: Line 503:
   * Start Method Tracing Tool   * Start Method Tracing Tool
   * Method Profile Tool   * Method Profile Tool
 +  * APK Analyzer
 +
 +Vector Drawable
 +
 +  * One file generates all resolutions on demand
 +  * Can be animated with an XML file
 +  * Can take more time to load into GPU
 +  * Pay attention to the complexity of the paths in your vector data
 +
 +
  
-NOTES:+====NOTES:====
  
 New Java 5 syntax:  New Java 5 syntax: 
android_study.1583803861.txt.gz · Last modified: 2020/03/10 01:31 by jrseti