Recently, our team has had lots of trivial but funny discussions. They are little questions, but we still learn a lot and enjoy. I would like to share them here, not seriously.
When we initialize a mutable list inside a fragment, we can do this like
class SampleFragment : Fragment()…
About what most application developers see in the Google Play Console:
We’ve detected that your app contains the
requestLegacyExternalStorageflag in the manifest file of 1 or more of your app bundles or APKs.
Developers with apps on devices running Android 11+ must use Scoped Storage to give users better…
There is a common memory-leak issue of ViewPager2, for example, through a large or unknown number of fragments, use
ViewPager2, and then navigate forward to a new fragment, Leak Canary detects memory leaks.
Most of the solutions from Stack Overflow would set the adapter to null when
(I knew it’s an odd case.) Our android app fully supports Android App Links, and it works perfectly. And then, the app is demanded to handle more domains, however, some domains‘ web servers cannot put the assetlinks.json files onto.
Use ATS policy to redirect
assertlinks.json? No, the
assetlinks.json file must…
Thanks for my colleagues, Samuel Huang and Samuel Shu’s help to refactor our project and prepare the sharing article. The shopping app’s landing page is full of various modules, which come from different APIs. This article introduces how this architecture works and improves performance and reusability.
The shopping app’s landing…
Thanks for my colleague WanChing‘s help to prepare this sharing article. E-Commerce app collects plentiful products from various brands. Each brand has its brand signature colors and public image. This article introduces how we made a single page to present a different brand’s style depending on its trademark.
After iOS 14, iPadOS 14, and tvOS 14, the app will need to receive the user’s permission through the AppTrackingTransparency framework to track users or access the device’s advertising identifier. If we do not recompile our app to use the new framework, then IDFA is disabled.
In response to IDFA’s…
Thanks my colleage, Kane Shih, to cooperate. This article and share the experience about PageObject on Android application.
PageObject Pattern is a well-known design pattern in the Web application UI automation testing proposed by Martin Fowler. It efficiently models the UI elements as objects and allows developers to manipulate them…
The article New Android R Important Changes said AsyncTask deprecated
Starting from this version of the Android async task will be deprecated. Async task is used to do short running operations on the background thread, and publish results on UI Thread. Android advice to use the
Coroutines. Here is the example code below.
It’s shocking so I look back to Android Developer AsyncTask, and find the official comment:
This class was deprecated in API level 30.
Use the standard
java.util.concurrentor Kotlin concurrency utilities instead.
…. I don’t know what to say … what I can do is reading the article written by by Vasiliy (which I strongly suggest reading,)
In the previous article, I mention that our project uses
suspend fun getString(): String? to implement all methods of Retrofit. To avoid uncaught exceptions, we also use try-catch to wrap all the suspend methods.
However, it didn’t work, we still get java.net.SocketTimeoutException
Caused by java.net.SocketTimeoutException
failed to connect to xxxxxxx/xxx.xxx.xxx.xxx (port…