mobile-best-practice/chapters/MBP_WIP_fr.md

2.5 KiB

  • // TODO : à écrire

// Don't access the Android UI toolkit from outside the UI thread. => risque de fuite mémoire (la vue est détruite avant que le traitement se termine, la référence a cet objet est maintenu)

// Limiter l'utilisation des Service (https://developer.android.com/topic/performance/memory#Services)

// Préférer l'utilisation de SparseArray, SparseBooleanArray, et LongSparseArray plutôt que HashMap (https://developer.android.com/topic/performance/memory#DataContainers)

// Abstraction à éviter si peu utile - https://developer.android.com/topic/performance/memory#Abstractions

// A creuser : https://developer.android.com/topic/performance/memory#Abstractions

// Notifications

// ABI ??

// Feature play store

// Utiliser correctement implementation testImplementation debugImplementation pour ne pas packager des librairies utilisées uniquement pour les tests ou le debug

// Reduce cost of inflation (ex ConstraintLayout instead of nested LinearLayout) https://developer.android.com/topic/performance/vitals/render#recyclerview_too_much_inflation_or_create_is_taking_too_long If your view types look good, look at reducing the cost of your inflation. Reducing unnecessary container and structural views can help. Consider building itemViews with ConstraintLayout, which can help reduce structural views.

Avoid delivering all of your assets and resources at install time if they aren't needed immediately. Reduce your app's install size by placing the largest files in dynamic feature module(s) and delivering them conditionally or on demand, or consider alternatives such as streaming media files. Learn more