This library contains various helper classes for use in Android-based projects
To use this library in an Android Project, add the following lines into your app-level build.gradle file
repositories {
mavenCentral()
}
…
dependencies {
implementation 'com.itachi1706.helpers:helperlib:<latest-version>' // See badge for latest version
}
To use this library in an Android Project, add the following lines into your app-level build.gradle file
repositories {
maven {
url "https://maven.pkg.github.com/itachi1706"
}
}
dependencies {
implementation 'com.itachi1706.helpers:helperlib:<latest-version>' // See badge for latest version
}
To use the API Helper, you will need to add the following lines into your AndroidManifest.xml
file
<uses-permission android:name="android.permission.INTERNET" />
These classes act basically as a compatibility layer for versions of Android, using the newer APIs when possible and falling back to deprecated APIs when the new APIs are not available
- HTML - Handles HTML text formatting for TextViews
- StatFs - Compatibility methods for handling file sizes
- TextView - Handles the method of setting text appearance of a TextView
These classes provides some helper methods for various tasks that you may use when developing an Android Project
- Connectivity - Handles check for internet/WiFi/Cellular connections and whether Data Saver is enabled on the device
- Log Helper - Helps handle logging with possible external logging to be added
- Preference - Various helper methods to handle day/night themes and dark mode switching, as well as the ability to access SharedPreference on the MainThread without triggering StrictMode
- URL - Helper methods for connecting to a HTTP/HTTPS url (with fallback support) and retrieving a String of its data (More return types coming soon)
- App Validation - Validates where the application has been installed from. Useful to help check if the app is installed from places like Google Play Store to disable features that may be against the ToS of the respective stores. Also allows you to obtain the application signature for further verification
These classes provides utility methods for aiding in specific tasks such as conversion of file types or retrieval from resource files
- Bitmap - Retrieve bitmap from various places (drawable, vectors etc)
- Color - Obtain color from attributes
- User Notification - Quick Snackbar and Toast messages notifications