Common Intents is an Android library which provides the most common android intents in ready-to-take one-liney fashion. Its main goal is to save your time and prevent you from writing the same intent creation code repeatedly for the most common tasks. All intents are taken from and implemented according to Android documentation.
MinSdk - 14 TargetSdk - 28
#Project level file
allprojects {
repositories {
(...)
maven { url 'https://jitpack.io' }
}
}
#Module level gradle file
dependencies {
implementation 'com.github.JanStoltman:CommonIntents:v0.8'
}
To create an intent use create method
SetAlarmIntent.create("", 0, 0)
To resolve if any activity can handle the intent use resolveActivity
SetAlarmIntent.resolveActivity(getPackageManager())
To check if you application has the required permissons to use certain intent use checkPermissons
SetAlarmIntent.checkPermissions(getApplicationContext())
To request the required permissons that are used by certain intent use resolveActivity
SetAlarmIntent.askForPermissions(this as Activity, REQUEST_CODE)
If you would like to contrubiute, feel free to create a pull request with your changes. Try to describe what you did in each commit. For other common intents create new packages and for intents that are app-specific (Twitter, Evernote...) please create new utility class in a sub-package named after that application.
Whole library is going to be tested using Espresso-Intents
Todo list for this library in the nearest future
- []
Licensed under the Apache License: Version 2.0 or later.
You can redistribute, modify or publish any part of the code presented within this repository but as it is described in the LICENSE, the software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES or CONDITIONS OF ANY KIND.