Code Monkey home page Code Monkey logo

permissionutils's Introduction

PermissionUtils

Install

To get a Git project into your build:

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
	    repositories {
            ...
	    maven { url 'https://jitpack.io' }
      
		}
	}

Step 2. Add the dependency:

dependencies {
	        implementation 'com.github.rkk001:PermissionUtils:Tag'
	}

Android library for run-time permissions. Simply call this utils it will check run-time permissions granted or not.

This is a simple android library for run-time app permission. Instead of writing run-time permission code use this library in your project.

Just need to access a function in code whenever you need this code in your class.

Simply call a boolean funtion:-

checkPermissions(Activity name,int[] integerArray)

This function tell you permission granted or not.

Pass value of permissions whatever you need:

  1. READ_CALENDAR,
  2. WRITE_CALENDAR,
  3. READ_CALL_LOG,
  4. WRITE_CALL_LOG,
  5. PROCESS_OUTGOING_CALLS,
  6. CAMERA,
  7. READ_CONTACTS,
  8. WRITE_CONTACTS,
  9. GET_ACCOUNTS,
  10. ACCESS_FINE_LOCATION,
  11. ACCESS_COARSE_LOCATION,
  12. RECORD_AUDIO,
  13. READ_PHONE_STATE,
  14. READ_PHONE_NUMBERS,
  15. CALL_PHONE,
  16. ANSWER_PHONE_CALLS,
  17. ADD_VOICEMAIL
  18. USE_SIP,
  19. BODY_SENSORS,
  20. SEND_SMS,
  21. RECEIVE_SMS,
  22. READ_SMS,
  23. RECEIVE_WAP_PUSH,
  24. RECEIVE_MMS,
  25. READ_EXTERNAL_STORAGE,
  26. WRITE_EXTERNAL_STORAGE

For example:-

In Kotlin:- checkPermissions(this,intArrayOf(2,4,6,11))

In Java:- checkPermissions(this,new int[]{1,5,9});

Sample code:- MainActivity.class

All the permission work will be done by this utility.

Use this and make your code more robust,reliable,simple and easy to understandable.

Thank you.

permissionutils's People

Contributors

rahulkumar-kaushik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

permissionutils's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.