SDK Core Android
An XY inspired utility framework for Android and Kotlin
Installing
Using jitPack:
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'com.github.XYOracleNetwork:sdk-core-android:1.0.2'
}
Usage
Easily check for required permissions:
val permissions = XYPermissions(this.activity!!)
permissions.requestPermission(Manifest.permission.READ_EXTERNAL_STORAGE,
"Store a picture on your device.", CAM_PERMISSION_REQ_CODE)
Get the device name:
val deviceName = XYDeviceName.getDeviceName()
val deviceName = XYDeviceName.getDeviceName("default_val_if_unknown")
val deviceName = XYDeviceName.getDeviceName(Build.MANUFACTURER, Build.MODEL, "default_val_if_unknown")
Logging:
logInfo("A simple INFO log")
logExtreme("A simple Verbose log")
logError("An error occured" , false) //set true for debugging
logException(myException, false) // set true for debugging
logAction("Log an event or action generated by a user")
Credits
Made with ❤️ by [XY - The Persistent Company] (https://xy.company)