Android App Widget is an extension of app. App can provide a piece of information or a simple function through app widgets without requiring users to launch the app.
For some reasons, we may want to prevent users from taking screenshots of our app. However, iOS does not provide such functionality. Fortunately, we can use UITextField to achieve this effect.
For some reasons, we may want to prevent users from taking screenshots of our app. In Android, we can use WindowManager.LayoutParams.FLAG_SECURE to achieve this effect.
When using a database, the data we query may be associated with multiple tables. Android Room allows us to define relationships between objects. When querying data, Android Room will automatically read it together with the relevant data.
SOLID is an object-oriented programming principle promoted by Robert C. Martin. Design smells are caused by the violation of one of more SOLID principles. Learning SOLID helps developers eliminate the smells from their designs, making them as clean, simple, and expressive as possible.
Android activity and fragment have their own lifecycle. The entire lifecycle contains several callbacks. Understanding their lifecycles and those callbacks helps us write robust code.
When developing a project, we need to build multiple versions, and each version will have individual environment settings. For example, the development version connects to the development server, and the QA version connects to the QA testing server.
Hilt is a dependency injection library based on Dagger and designed for Android. So when developing Android, using Hilt will be more convenient than using Dagger.