Weidian HuangHow to write automated tests for Certificate Pinning by using MockWebServer?If you are using the certificate pinning in your Android app, you may have the same troubles as me:Apr 4, 2021Apr 4, 2021
Weidian HuangAndroid: How to use MockWebServer for Edge-cases Test, UI Test, and Unit Test together?Testing on Android is troublesome especially when we need to cover some edge-cases like server returned unexpected data, certificate…Apr 2, 2021Apr 2, 2021
Weidian HuangAndroid Fragment not attached to a contextThis is a common issue if we don’t take care of it in our application, and it is difficult to catch the issue during development. But once…Mar 27, 2021Mar 27, 2021
Weidian HuangHow to sync the time with your server in your Android AppIn some use cases, you need to have an accurate time that is close to your server time as much as possible, it doesn’t have to be very…Nov 16, 20201Nov 16, 20201
Weidian HuangHow to avoid memory leak — Android and JVM languagesAlthough there are a number of articles talking about Android memory leak, I still want to discuss it from another perspective.Sep 13, 2020Sep 13, 2020
Weidian HuangHow to write thread-safe code for Android KeystoreThe Android Keystore provides access to special secure hardware for storing cryptographic keys. From Android 6.0, the security of Android…Sep 4, 20202Sep 4, 20202
Weidian HuangHow to prevent common memory leaks inside Android FragmentUnderstanding of Android Fragment lifecycleAug 22, 20202Aug 22, 20202
Weidian HuangHow to write a unit testable codeDon’t use Singleton pattern, use singleton instance only.Jul 19, 2020Jul 19, 2020
Weidian HuangUnderstanding of MVVM architectureAlthough MVVM architecture was first introduced by Microsoft and widely used in WPF application, now some other applications also can use…Jul 19, 20201Jul 19, 20201