Loading .gitlab-ci.yml +1 −6 Original line number Diff line number Diff line Loading @@ -7,11 +7,6 @@ before_script: - export GRADLE_USER_HOME=$(pwd)/.gradle - chmod +x ./gradlew cache: key: ${CI_PROJECT_ID} paths: - .gradle/ build: stage: build script: Loading @@ -19,4 +14,4 @@ build: artifacts: paths: - app/build/outputs/apk/ No newline at end of file - app/build/reports/ No newline at end of file app/build.gradle +80 −54 Original line number Diff line number Diff line apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' } android { compileSdkVersion 28 buildToolsVersion '28.0.3' compileSdkVersion 29 buildToolsVersion '29.0.2' defaultConfig { applicationId "foundation.e.apps" minSdkVersion 21 targetSdkVersion 27 minSdkVersion 25 targetSdkVersion 29 versionCode 10 versionName "1.1.6" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions.cruncherEnabled = false vectorDrawables.useSupportLibrary = true } buildTypes { debug { applicationIdSuffix ".debug" } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } dataBinding { enabled = true } lintOptions { lintConfig file("lint.xml") disable 'MissingTranslation' } defaultConfig { vectorDrawables.useSupportLibrary = true } androidExtensions { experimental = true } aaptOptions { additionalParameters '-I', 'app/e-ui-sdk.jar' } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { def lifecycle_version = "1.1.1" implementation 'androidx.work:work-runtime:2.3.1' implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation 'androidx.core:core-ktx:1.3.2' implementation 'androidx.appcompat:appcompat:1.3.0-rc01' implementation "com.google.android.material:material:1.3.0" implementation 'androidx.constraintlayout:constraintlayout:2.0.4' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0-alpha01' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' // implementation 'com.android.support:design:27.1.1' implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' testImplementation 'junit:junit:4.12' // eOS compileOnly files("e-ui-sdk.jar") // Preference implementation "androidx.preference:preference-ktx:1.1.1" // Lifecycle implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1" // Bouncy Castle implementation 'org.bouncycastle:bcpg-jdk15on:1.60' implementation "androidx.vectordrawable:vectordrawable:1.0.0" implementation "androidx.vectordrawable:vectordrawable-animated:1.0.0" implementation 'com.google.android.material:material:1.1.0-alpha05' // GSON implementation 'com.google.code.gson:gson:2.8.6' def nav_version = "1.0.0-alpha02" implementation 'androidx.navigation:navigation-fragment-ktx:2.0.0-rc02' // use -ktx for Kotlin implementation 'androidx.navigation:navigation-ui-ktx:2.0.0-rc02' // EventBus implementation 'org.greenrobot:eventbus:3.2.0' implementation "androidx.preference:preference-ktx:1.1.0" // Volley implementation "com.android.volley:volley:1.2.0" implementation 'androidx.lifecycle:lifecycle-viewmodel:2.0.0' // PhotoView implementation "com.github.chrisbanes:PhotoView:2.3.0" // RoundedImageView implementation "com.makeramen:roundedimageview:2.3.0" // RecyclerView implementation 'androidx.recyclerview:recyclerview:1.2.0' implementation 'com.google.code.gson:gson:2.8.2' implementation 'com.google.android.material:material:1.0.0' // WorkManager implementation 'androidx.work:work-runtime:2.5.0' // Android-Iconics implementation 'com.mikepenz:iconics-core:3.1.0@aar' implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar' implementation 'org.greenrobot:eventbus:3.1.1' implementation 'com.trello.rxlifecycle3:rxlifecycle-android:3.1.0' implementation 'com.trello.rxlifecycle3:rxlifecycle-components:3.1.0' implementation 'com.trello.rxlifecycle3:rxlifecycle-components-preference:3.1.0' implementation 'com.makeramen:roundedimageview:2.3.0' // Vectordrawable def vector_version = "1.1.0" implementation "androidx.vectordrawable:vectordrawable:$vector_version" implementation "androidx.vectordrawable:vectordrawable-animated:$vector_version" // Jackson implementation "com.fasterxml.jackson.core:jackson-core:2.11.1" implementation "com.fasterxml.jackson.core:jackson-annotations:2.11.1" implementation "com.fasterxml.jackson.core:jackson-databind:2.11.1" implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1" // Navigation component def nav_version = "2.3.5" implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" implementation "androidx.navigation:navigation-ui-ktx:$nav_version" implementation 'com.android.volley:volley:1.1.1' // RxLifecycle def rxlifecycle_version = "3.1.0" implementation "com.trello.rxlifecycle3:rxlifecycle-android:$rxlifecycle_version" implementation "com.trello.rxlifecycle3:rxlifecycle-components:$rxlifecycle_version" implementation "com.trello.rxlifecycle3:rxlifecycle-components-preference:$rxlifecycle_version" implementation 'com.github.chrisbanes:PhotoView:2.3.0' compileOnly files("e-ui-sdk.jar") // Jackson def jackson_version = "2.12.2" implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version" } app/src/main/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ <uses-permission android:name="foundation.e.apps.micro.status.READ_WRITE" /> <application android:allowBackup="true" android:allowBackup="false" android:alwaysRetainTaskState="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" Loading app/src/main/java/foundation/e/apps/MainActivity.kt +31 −23 Original line number Diff line number Diff line /* Copyright (C) 2019 e Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. * Copyright (C) 2019-2021 E FOUNDATION * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ package foundation.e.apps //import androidx.fragment.app.ListFragment import android.annotation.SuppressLint Loading @@ -28,18 +27,14 @@ import android.database.Cursor import android.graphics.Color import android.os.Bundle import android.os.Handler import android.preference.PreferenceManager import android.util.Log import android.util.TypedValue import android.view.MenuItem import android.widget.Toast import androidx.annotation.ColorInt import androidx.annotation.ColorRes import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.view.ContextThemeWrapper import androidx.core.content.ContextCompat import androidx.core.graphics.drawable.DrawableCompat import androidx.fragment.app.Fragment import androidx.preference.PreferenceManager import com.google.android.material.bottomnavigation.BottomNavigationItemView import com.google.android.material.bottomnavigation.BottomNavigationMenuView import com.google.android.material.bottomnavigation.BottomNavigationView Loading Loading @@ -74,18 +69,30 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS private var isReceiverRegistered = false var accentColorOS = 0 init { instance = this } companion object { private var instance: MainActivity? = null lateinit var mActivity: MainActivity var sharedPreferences : SharedPreferences?=null val sharedPrefFile = "kotlinsharedpreference" /* * Provides the application context via MainActivity * @return applicationContext */ fun applicationContext(): Context { return instance!!.applicationContext } } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) //ThemeColors(this); setContentView(R.layout.activity_main) mActivity = this disableCategoryIfOpenSource() Loading Loading @@ -311,6 +318,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) { super.onRequestPermissionsResult(requestCode, permissions, grantResults) if (requestCode == Constants.STORAGE_PERMISSION_REQUEST_CODE && grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_DENIED) { Snackbar.make(container, R.string.error_storage_permission_denied, Loading @@ -320,7 +328,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS override fun onSaveInstanceState(outState: Bundle) { super.onSaveInstanceState(outState) outState?.putInt(CURRENTLY_SELECTED_FRAGMENT_KEY, currentFragmentId) outState.putInt(CURRENTLY_SELECTED_FRAGMENT_KEY, currentFragmentId) } override fun onDestroy() { Loading Loading @@ -357,7 +365,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS * */ private fun getAccentColor() { accentColorOS=this.resources.getColor(R.color.colorAccent); accentColorOS = this.getColor(R.color.colorAccent); Loading app/src/main/java/foundation/e/apps/MicroGProvider.java +19 −2 Original line number Diff line number Diff line package foundation.e.apps; /* * Copyright (C) 2019-2021 E FOUNDATION * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ import java.util.HashMap; package foundation.e.apps; import android.content.ContentProvider; import android.content.ContentUris; Loading @@ -14,6 +29,8 @@ import android.database.sqlite.SQLiteOpenHelper; import android.database.sqlite.SQLiteQueryBuilder; import android.net.Uri; import java.util.HashMap; public class MicroGProvider extends ContentProvider { public static final String PROVIDER_NAME = "foundation.e.apps.micro.status"; Loading Loading
.gitlab-ci.yml +1 −6 Original line number Diff line number Diff line Loading @@ -7,11 +7,6 @@ before_script: - export GRADLE_USER_HOME=$(pwd)/.gradle - chmod +x ./gradlew cache: key: ${CI_PROJECT_ID} paths: - .gradle/ build: stage: build script: Loading @@ -19,4 +14,4 @@ build: artifacts: paths: - app/build/outputs/apk/ No newline at end of file - app/build/reports/ No newline at end of file
app/build.gradle +80 −54 Original line number Diff line number Diff line apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-android-extensions' id 'kotlin-kapt' } android { compileSdkVersion 28 buildToolsVersion '28.0.3' compileSdkVersion 29 buildToolsVersion '29.0.2' defaultConfig { applicationId "foundation.e.apps" minSdkVersion 21 targetSdkVersion 27 minSdkVersion 25 targetSdkVersion 29 versionCode 10 versionName "1.1.6" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions.cruncherEnabled = false vectorDrawables.useSupportLibrary = true } buildTypes { debug { applicationIdSuffix ".debug" } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } dataBinding { enabled = true } lintOptions { lintConfig file("lint.xml") disable 'MissingTranslation' } defaultConfig { vectorDrawables.useSupportLibrary = true } androidExtensions { experimental = true } aaptOptions { additionalParameters '-I', 'app/e-ui-sdk.jar' } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = '1.8' } } dependencies { def lifecycle_version = "1.1.1" implementation 'androidx.work:work-runtime:2.3.1' implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation 'androidx.core:core-ktx:1.3.2' implementation 'androidx.appcompat:appcompat:1.3.0-rc01' implementation "com.google.android.material:material:1.3.0" implementation 'androidx.constraintlayout:constraintlayout:2.0.4' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.2' androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0-alpha01' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' // implementation 'com.android.support:design:27.1.1' implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' testImplementation 'junit:junit:4.12' // eOS compileOnly files("e-ui-sdk.jar") // Preference implementation "androidx.preference:preference-ktx:1.1.1" // Lifecycle implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1" // Bouncy Castle implementation 'org.bouncycastle:bcpg-jdk15on:1.60' implementation "androidx.vectordrawable:vectordrawable:1.0.0" implementation "androidx.vectordrawable:vectordrawable-animated:1.0.0" implementation 'com.google.android.material:material:1.1.0-alpha05' // GSON implementation 'com.google.code.gson:gson:2.8.6' def nav_version = "1.0.0-alpha02" implementation 'androidx.navigation:navigation-fragment-ktx:2.0.0-rc02' // use -ktx for Kotlin implementation 'androidx.navigation:navigation-ui-ktx:2.0.0-rc02' // EventBus implementation 'org.greenrobot:eventbus:3.2.0' implementation "androidx.preference:preference-ktx:1.1.0" // Volley implementation "com.android.volley:volley:1.2.0" implementation 'androidx.lifecycle:lifecycle-viewmodel:2.0.0' // PhotoView implementation "com.github.chrisbanes:PhotoView:2.3.0" // RoundedImageView implementation "com.makeramen:roundedimageview:2.3.0" // RecyclerView implementation 'androidx.recyclerview:recyclerview:1.2.0' implementation 'com.google.code.gson:gson:2.8.2' implementation 'com.google.android.material:material:1.0.0' // WorkManager implementation 'androidx.work:work-runtime:2.5.0' // Android-Iconics implementation 'com.mikepenz:iconics-core:3.1.0@aar' implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar' implementation 'org.greenrobot:eventbus:3.1.1' implementation 'com.trello.rxlifecycle3:rxlifecycle-android:3.1.0' implementation 'com.trello.rxlifecycle3:rxlifecycle-components:3.1.0' implementation 'com.trello.rxlifecycle3:rxlifecycle-components-preference:3.1.0' implementation 'com.makeramen:roundedimageview:2.3.0' // Vectordrawable def vector_version = "1.1.0" implementation "androidx.vectordrawable:vectordrawable:$vector_version" implementation "androidx.vectordrawable:vectordrawable-animated:$vector_version" // Jackson implementation "com.fasterxml.jackson.core:jackson-core:2.11.1" implementation "com.fasterxml.jackson.core:jackson-annotations:2.11.1" implementation "com.fasterxml.jackson.core:jackson-databind:2.11.1" implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1" // Navigation component def nav_version = "2.3.5" implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" implementation "androidx.navigation:navigation-ui-ktx:$nav_version" implementation 'com.android.volley:volley:1.1.1' // RxLifecycle def rxlifecycle_version = "3.1.0" implementation "com.trello.rxlifecycle3:rxlifecycle-android:$rxlifecycle_version" implementation "com.trello.rxlifecycle3:rxlifecycle-components:$rxlifecycle_version" implementation "com.trello.rxlifecycle3:rxlifecycle-components-preference:$rxlifecycle_version" implementation 'com.github.chrisbanes:PhotoView:2.3.0' compileOnly files("e-ui-sdk.jar") // Jackson def jackson_version = "2.12.2" implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_version" implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jackson_version" }
app/src/main/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ <uses-permission android:name="foundation.e.apps.micro.status.READ_WRITE" /> <application android:allowBackup="true" android:allowBackup="false" android:alwaysRetainTaskState="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" Loading
app/src/main/java/foundation/e/apps/MainActivity.kt +31 −23 Original line number Diff line number Diff line /* Copyright (C) 2019 e Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. * Copyright (C) 2019-2021 E FOUNDATION * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ package foundation.e.apps //import androidx.fragment.app.ListFragment import android.annotation.SuppressLint Loading @@ -28,18 +27,14 @@ import android.database.Cursor import android.graphics.Color import android.os.Bundle import android.os.Handler import android.preference.PreferenceManager import android.util.Log import android.util.TypedValue import android.view.MenuItem import android.widget.Toast import androidx.annotation.ColorInt import androidx.annotation.ColorRes import androidx.appcompat.app.AppCompatActivity import androidx.appcompat.view.ContextThemeWrapper import androidx.core.content.ContextCompat import androidx.core.graphics.drawable.DrawableCompat import androidx.fragment.app.Fragment import androidx.preference.PreferenceManager import com.google.android.material.bottomnavigation.BottomNavigationItemView import com.google.android.material.bottomnavigation.BottomNavigationMenuView import com.google.android.material.bottomnavigation.BottomNavigationView Loading Loading @@ -74,18 +69,30 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS private var isReceiverRegistered = false var accentColorOS = 0 init { instance = this } companion object { private var instance: MainActivity? = null lateinit var mActivity: MainActivity var sharedPreferences : SharedPreferences?=null val sharedPrefFile = "kotlinsharedpreference" /* * Provides the application context via MainActivity * @return applicationContext */ fun applicationContext(): Context { return instance!!.applicationContext } } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) //ThemeColors(this); setContentView(R.layout.activity_main) mActivity = this disableCategoryIfOpenSource() Loading Loading @@ -311,6 +318,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) { super.onRequestPermissionsResult(requestCode, permissions, grantResults) if (requestCode == Constants.STORAGE_PERMISSION_REQUEST_CODE && grantResults.isNotEmpty() && grantResults[0] == PackageManager.PERMISSION_DENIED) { Snackbar.make(container, R.string.error_storage_permission_denied, Loading @@ -320,7 +328,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS override fun onSaveInstanceState(outState: Bundle) { super.onSaveInstanceState(outState) outState?.putInt(CURRENTLY_SELECTED_FRAGMENT_KEY, currentFragmentId) outState.putInt(CURRENTLY_SELECTED_FRAGMENT_KEY, currentFragmentId) } override fun onDestroy() { Loading Loading @@ -357,7 +365,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS * */ private fun getAccentColor() { accentColorOS=this.resources.getColor(R.color.colorAccent); accentColorOS = this.getColor(R.color.colorAccent); Loading
app/src/main/java/foundation/e/apps/MicroGProvider.java +19 −2 Original line number Diff line number Diff line package foundation.e.apps; /* * Copyright (C) 2019-2021 E FOUNDATION * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. */ import java.util.HashMap; package foundation.e.apps; import android.content.ContentProvider; import android.content.ContentUris; Loading @@ -14,6 +29,8 @@ import android.database.sqlite.SQLiteOpenHelper; import android.database.sqlite.SQLiteQueryBuilder; import android.net.Uri; import java.util.HashMap; public class MicroGProvider extends ContentProvider { public static final String PROVIDER_NAME = "foundation.e.apps.micro.status"; Loading