Retrofit or Asynctask?

Why use Background Task? By default, application code runs in the main thread. Every statement is therefore executed in sequence. If you perform a long lasting operation, the application blocks until the corresponding operation has finished. To provide a good user experience all potentially slow running operations in an Android application should run asynchronously. This can…

Android App Permissions

Long gone are the days when Android developers used to give app permissions by adding only one line of code in the manifest file. This is no more possible because Google now cares more about user’s privacy and security and so they have added some extra layers of security by changing the way an app…

Multi Window Mode – Nougat

One of the big new features in Android Nougat is the Multi Window support. We have seen this feature in Samsung and LG phones before but now its part of Android stock with the new Android Nougat update. This allows our app to run side by side with other supported apps and even share information…

Showing Notifications

We will create a simple app that does nothing but display a notification to the user. Create a new project and jump to MainActivity class. We will add all our code in the onCreate method. You can later integrate this code into your apps as and when necessary. First, create an object for Notification and…

Working With Bluetooth

Enabling Bluetooth First thing we need to work with Bluetooth is Bluetooth Adapter which allows us to work with Bluetooth, the same way we use Location Manager to work with Locations. Set the Bluetooth Adapter variable in  the MainActivity class and let’s call it BA, as follows: BluetoothAdapter BA; Next we have to check whether…

Marshmallow Maps Permissions

With Marshmallow update being rolled out to almost all latest devices in the market, it is essential for a developer to upgrade their apps to support latest versions. If you are coming from Lollipop or earlier versions of android you are probably stuck when trying to upgrade your app to the new Marshmallow or Nougat…

Game – Batman Vs Superman

Welcome to your childhood once again! One of our favorite pass times at school that kept us awake during those boring lectures that made you realize how clever you were every time you get 3 dots or crosses in a straight line. If you hadn’t played tic-tac-toe a kid you had missed a major part of your…

Game – Brain Trainer

Sharpen your brain by simple mathematics questions. You are given 30 seconds to answer as many questions as you can. Simple math questions are generated randomly and instantly along with four options to select from. Upon selecting your answer result will be displayed immediately and score will be updated, then it moves to next question….