Android Singleton class to make it use of globally in application
In every Android app it's very common to to use to common methods like to show toast, loading dialog, show alert, get date and time etc.. Here I mentioned some of the methods which are commonly used: Showing toast Showing loading dialog Hiding loading dialog Showing Alert Dialog Showing Snackbar Listen network connectivity Save image in device Get current date time To check app having required permissions or not etc.. In your AppApplication class means which extends the class Application you can put the follwing code to make use it globally in application. Here every method has `public` and `static` access modifiers so we can use them directly with class name without creating instance for the class AppApplication by passing context and required parameters. Example to show toast message in your Activity like: AppApplication.showToast(this, "Welcome to Android Tips", 0); here 0 --> means Length short and 1 --> means Length long, also you ca...