When you develop an android application, you always need to pass data between activities. And even more, you sometimes need to pass data between all activities for example pass session-id, user-name, and password. In this article, I will tell you how to use android Intent or Application object to pass data between activities.
This example will show you how to change the android device screen orientation ( horizontal to vertical vice versa ) and how to avoid activity restart during the screen orientation change.
When you create the android project in android studio, there are a lot of activity templates you can choose which are provided by android studio. For android beginners, the basic activity and the empty activity always make them confused. So what is the difference between them, let me tell you now.
This article will tell you how to pass custom-type objects via intent between two android activities. It is not difficult, you just need to make your custom class either implements the java.io.Serializable or android.os.Parcelable interface.
This example will show you how to dynamically register/unregister broadcast receivers in android activity. You can read the article Android Broadcast Overview to learn basic concepts about android broadcast if you need.
The fragment is widely used in android app development. You can use it statically or dynamically. Article Android Multiple Fragments In One Activity Example has introduced what it is and how to use Fragment statically. This article will tell you how to use it dynamically in your android app.
There are so many android devices in the world today. Different device screen sizes are also different. So when you create an android app, you must want it can be run in both small size ( android phone ) and big size ( android pad ) devices use only one release build.
This article will show you three best practice when use android activity class. These best practice can make your java source code simple and clear.
The previous article Android Activity Launch Mode Standard SingleTop Example has introduced the two android activity launch modes Standard and SingleTop. This article will introduce the other two android activity launch modes SingleTask and SingleInstance which are more difficult to understand.
An activity can be configured with four launch modes, each launch mode is used in one special scenario. This article will introduce all the four launch modes of activity with examples.