Insights on Kotlin

So Google just announced that it will support Kotlin as an official language for android development at Google I\O 2017. Kotlin is supposed to be a brilliantly designed, mature language that is expected to make android development fast, fun and convenient. As an android developer I had to check this language out and see for myself if it was worth the hype. Last few days I have rewritten my Java codes using Kotlin and I must say that now I am excited to further explore its capabilities. Continue reading

Services and Intent Services

Service

Service is an application component that can perform long-running operations in the background and does not provide a user interface. Another application component can start a service and it will continue to run in the background even if the user switches to another application. Even if the application exits, the services will linger around performing background tasks until the service is killed by the system itself or is stopped manually. Continue reading

Clean Architecture

Clean Architecture is a architectural pattern that allows high level of separation of concern by separation of layers. Its basically a group of best practices that allows us to write effective code.  Continue reading

MVP Android

Model View Presenter is an architecture pattern. Architecture is only way to maintain a project clean, expansible and testable. The patterns are recognized solutions that have been developed over the years and are considered industry standards. They’re constantly evolving, and in the Android SDK, the reliable Model View Controller pattern is steadily being dropped for the Model View Presenter. Continue reading

Google Map with Rounded Corners

5hP4e

In this tutorial, we are going to use custom map view to draw rounded google map. I’m under assumption that you have already integrated google map in your project and you do have an api key. If you want to know how to configure your project for google map integration, follow this link : Google Map Integration Continue reading

Physical and Density Independent Pixels

One of the core aspects of android design is that your design must work on a lot of often very different devices. Android runs on all type of different things, from watches, phones and tablets and even on cars and tvs. Android has been designed to handle these types of variety. Android platform gives your tools and techniques to handle different devices easily and conveniently. The goal must be to design a single app that runs on range of devices adapting the interfaces depending on which device it is running on. Continue reading

Audio manager with audio focus

In this tutorial we are going to create a audio manager class with audio focus.

We are going to use media player for playing audio. We can use sound pool too but they are suitable best for short audio clips like notification sound. Since we are using media player, we better make our audio manager class singleton. Media player consumes more resources and will increase the size of applications allocated heap memory. So, its better to have one instance of media player and use it to play our audio clips. Continue reading

Threads and Processes

Introduction to Process51C4J7FTZ1L._SX356_BO1,204,203,200_

Every Android application runs in its own Linux process. Every application in android runs in its own process. For any application to run, the android system allocates certain resources like memory. That means resources are allocated to the processes. The process is created for the application when some of its code needs to be run, and will remain running until it is no longer needed and the system needs to reclaim its memory for use by other applications.

Continue reading

Recycler View

RecyclerView: What it is?

Recycler view is far superior than your normal list view.
The RecyclerView is a new ViewGroup that is prepared to render any adapter-based view in a similar way. It is supossed to be the successor of ListView and GridView, and it can be found in the latest support-v7 version.
If you want to use a RecyclerView, you will need to feel comfortable with three elements: Continue reading

Google Map Integration

Introduction to the Google Maps Android API

With the Google Maps Android API, you can add maps based on Google Maps data to your application. The API automatically handles access to Google Maps servers, data downloading, map display, and response to map gestures. You can also use API calls to add markers, polygons, and overlays to a basic map, and to change the user’s view of a particular map area. These objects provide additional information for map locations, and allow user interaction with the map. The API allows you to add these graphics to a map: Continue reading