Skip to content

Commit

Permalink
merge: Demo Data
Browse files Browse the repository at this point in the history
Demo Data
  • Loading branch information
koenidv authored Nov 15, 2023
2 parents a1ff2e3 + 7053010 commit efc98d2
Show file tree
Hide file tree
Showing 26 changed files with 527 additions and 259 deletions.
12 changes: 7 additions & 5 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,8 @@ Simply cloning the repository from Android Studio should be plenty.
### Debugging
As of version 122, there's an easily shareably debug logger. There is an [online tool](https://koenidv.github.io/sph-planner/debugger) to visualize its data.
### ... development space
The following db diagram is for wrapping my mind around what we've built years ago. It's AI generated and might contain errors.
![dbdiagram.png](assets/dbdiagram.png)
69 changes: 31 additions & 38 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ plugins {
}

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
compileSdk 34

defaultConfig {
applicationId "de.koenidv.sph"
minSdkVersion 23
targetSdkVersion 30
minSdkVersion 26
targetSdkVersion 34
versionCode 138
versionName "1.3.8"

Expand All @@ -30,51 +29,46 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
coreLibraryDesugaringEnabled true //enables date and time handling in APIs lower than 26
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}

packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
resources {
excludes += ['META-INF/DEPENDENCIES', 'META-INF/LICENSE', 'META-INF/LICENSE.txt', 'META-INF/license.txt', 'META-INF/NOTICE', 'META-INF/NOTICE.txt', 'META-INF/notice.txt', 'META-INF/ASL2.0']
}
}

namespace 'de.koenidv.sph'

}

dependencies {
// kotlin std library is no longer needed above 1.4
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.4'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.0'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0'
implementation "androidx.fragment:fragment-ktx:1.3.1"
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.10.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.4'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.4'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.6.2'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2'
implementation "androidx.fragment:fragment-ktx:1.6.1"
implementation 'com.amitshekhar.android:android-networking:1.0.2'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'com.facebook.stetho:stetho:1.5.1'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.4'
implementation 'androidx.navigation:navigation-ui-ktx:2.3.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.4'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.github.koenidv:SearchableSpinner:1.4.1' // Only for login, really
implementation 'org.jsoup:jsoup:1.13.1' // Parse html
implementation 'me.saket:better-link-movement-method:2.2.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'// Open links in-app
implementation 'androidx.webkit:webkit:1.4.0'
implementation 'com.google.android.play:core:1.10.0'
implementation 'androidx.webkit:webkit:1.8.0'
implementation 'com.google.android.play:core:1.10.3'
implementation platform('com.google.firebase:firebase-bom:26.2.0')
implementation 'com.google.firebase:firebase-config-ktx'
implementation 'com.google.firebase:firebase-crashlytics-ktx'
Expand All @@ -88,18 +82,17 @@ dependencies {
implementation files('libs/rhino.jar')
implementation 'com.facebook.shimmer:shimmer:0.5.0'
implementation 'com.github.bumptech.glide:glide:4.12.0'
implementation 'com.google.firebase:firebase-crashlytics-buildtools:2.5.2'
//implementation 'com.android.tools:desugar_jdk_libs:1.1.5'//enables date and time handling in APIs lower than 26
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5" //Der Eintrag funktioniert zum builden, der obere loest die programmierungsfehler, schlägt aber beim builden fehl...
implementation 'com.google.firebase:firebase-crashlytics-buildtools:2.9.9'
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.0.3"

implementation 'org.apache.commons:commons-csv:1.5'

implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.2.21'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.22'
implementation 'com.opencsv:opencsv:4.0'

implementation 'com.squareup.okhttp3:okhttp:3.12.1'
implementation 'com.squareup.okhttp3:okhttp:3.14.9'

testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
14 changes: 6 additions & 8 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="de.koenidv.sph">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
Expand All @@ -17,13 +16,10 @@
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:name=".SphPlanner"
android:allowBackup="false"
tools:replace="android:allowBackup"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:fullBackupContent="@xml/backup_rules"
android:theme="@style/Theme.SPH">
<provider
android:name="androidx.core.content.FileProvider"
Expand All @@ -39,12 +35,14 @@
android:name=".ui.OnboardingActivity"
android:theme="@style/Theme.SPH.NoActionBar"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize" />
android:windowSoftInputMode="adjustResize"
tools:ignore="LockedOrientationActivity" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan">
android:exported="true"
android:windowSoftInputMode="adjustPan"
tools:ignore="LockedOrientationActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

Expand Down
7 changes: 3 additions & 4 deletions app/src/main/java/de/koenidv/sph/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,14 @@ class MainActivity : AppCompatActivity() {
NetworkManager.FAILED_UNKNOWN, NetworkManager.FAILED_CANCELLED ->
errorSnackbar.setText(R.string.error_unknown).show()
NetworkManager.FAILED_INVALID_CREDENTIALS -> errorSnackbar.setText(R.string.error_credentials).show() //Crash456
NetworkManager.FAILED_DEMO -> errorSnackbar.setText(R.string.error_demo).show() //Crash456
else -> if (success != NetworkManager.SUCCESS) errorSnackbar.setText(R.string.error).show()
}
// If this is due to a server error, display a link to sph's status page
if (success == NetworkManager.FAILED_MAINTENANCE
|| success == NetworkManager.FAILED_SERVER_ERROR
|| success == NetworkManager.FAILED_UNKNOWN) {
|| success == NetworkManager.FAILED_UNKNOWN
|| success == NetworkManager.FAILED_DEMO) {
errorSnackbar.setAction(R.string.sph_status) {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.url_status))))
}
Expand Down Expand Up @@ -418,9 +420,6 @@ class MainActivity : AppCompatActivity() {
// Reset token timer
getSharedPreferences("sharedPrefs", MODE_PRIVATE).edit()
.putLong("updated_posts", 0).apply()
} else if (item.itemId == R.id.donateItem) {
// Forward to donation w/ paypal
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.support_data))))
}
return super.onOptionsItemSelected(item)
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/de/koenidv/sph/adapters/ChatAdapter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ class ChatAdapter(val messages: MutableList<Message>, private val conversationIn
.replace("%count", info.second.toString())


// Get an identicon using Kwelo's API
// Get an identicon using florians's API
Glide.with(identicon.context)
.load("https://api.kwelo.com/v1/media/identicon/${info.first}?format=webm")
.load("https://with.koeni.dev/identicon/${info.first}")
.circleCrop()
.into(identicon)

Expand Down
Loading

0 comments on commit efc98d2

Please sign in to comment.