Posts

Showing posts from January, 2018

Android Easy Runtime Permissions with Dexter

Image
We all know that Android Marshmallow introduced runtime permissions letting user to allow or deny any permission at runtime. Implementing runtime permissions is a tedious process and developer needs to write lot of code just to get a single permission. In this article, we are going to simplify the process of adding the runtime permissions using Dexter library. Using this library, the permissions can be implemented in few minutes. This is an introductory article about the Dexter covering basic features offered by the library. Dexter provides other features like using it with SnackBar, different types of listeners, error handling and few other. You can find more information on Dexter’s developer page. 1. Dexter Permissions Library To get started with Dexter, add the dependency in your build.gradle dependencies {      // Dexter runtime permissions      implementation 'com.karumi:dexter:4.2.0' } 1.1 Requesting Single Permission To request a sin