This is a slimmed down library for reading CEPAS-based cards such as Singapore EZ-Link cards based off FareBot
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.cepaslib:cepaslib:<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://itachi1706.jfrog.io/artifactory/ccn-android-libs/"
}
}
…
dependencies {
implementation 'com.itachi1706.cepaslib:cepaslib:<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://dl.bintray.com/itachi1706/ccn-android-lib"
}
}
…
dependencies {
implementation 'com.itachi1706.cepaslib:cepaslib:<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
dependencies {
implementation 'com.itachi1706.cepaslib:cepaslib:<latest-version>' // See badge for latest version number
}
- Add the following lines to your project-level (/) build.gradle dependency
buildscript {
…
dependencies {
…
classpath 'com.squareup.sqldelight:gradle-plugin:1.1.3'
}
}
plugins {
id 'com.github.ben-manes.versions' version '0.21.0'
}
- Add the following lines to your app-level (/app) build.gradle
buildTypes {
debug {
multiDexEnabled true
}
}
Multidex is needed for debug builds as the debug unminified code base exceeds the 64k allowed in a single dex file on Android
- To invoke the activity add the following code
startActivity(new Intent(this, MainActivity.class));
finish();
- Note: If your theme is a dark theme, ensure that AppCompatDelegate has properly updated it. View options possible here
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); // View more at AppCompatDelegate file
- In your settings screen activity where you wish to add the settings to, add the following line
new SettingsHandler(getActivity()).initSettings(this);
- Make the Preferences button in the library to point to your own settings screen if you wish for it, add the following to add the class to your SharedPreferences
CEPASLibBuilder.setPreferenceClass(YourPreference.class);
- To show the "About" menu option, add the following
// Java
CEPASLibBuilder.INSTANCE.shouldShowAboutMenuItem(true);
// Kotlin
CEPASLibBuilder.shouldShowAboutMenuItem(true)
- For more information and other library modification capabilities look at CEPASLibBuilder.kt