Skip to content

Commit

Permalink
Merge pull request #25 from ZoeMeow1027/draft - 2.0-draft17 (1404)
Browse files Browse the repository at this point in the history
What's new
- News notification settings: Change your preferences about news notifications.
- Changed UI for Subject Fee (not final yet).

Changes and fixes
- Fixed [#24](#24).
- Add a option to get current student year from Internet.
- To access that, please go to `Settings` -> `Experiment Settings` -> `Current School Year`.
- Some settings won't load after update. You might need to reconfig them in settings. I'm sorry about that.
- Login screen will let you relogin if previous attempt was failed.
- You can clear previous login to attempt with another account.
- Now you can turn off notifications about news global and news subject.
- In news subject notifications, you can choose about "All", "Match your filter" and "Off".
- News filter settings will now only shown when enabled (this mean it will hidden at default).
- Update Vietnamese strings for most screens, but not done yet.
- Optimized codes and updated dependencies to latest.
- Updated dependencies to latest to fix issues about Account feature.
  • Loading branch information
ZoeMeow1027 authored May 29, 2024
2 parents 4ef00cd + 892d2e9 commit 1778efd
Show file tree
Hide file tree
Showing 129 changed files with 6,040 additions and 3,753 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
.cxx
local.properties
*.log
.idea/deploymentTargetDropDown.xml
.idea/deploymentTargetSelector.xml
10 changes: 0 additions & 10 deletions .idea/deploymentTargetDropDown.xml

This file was deleted.

125 changes: 125 additions & 0 deletions .idea/icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@
## Known issues:
- `Your current wallpaper` option in app background settings will be disabled on Android 14. You can check why in `Issue` tab in repository.

## 2.0-draft17 (1404)
- What's new
- News notification settings: Change your preferences about news notifications.
- Changed UI for Subject Fee (not final yet).

- Changes and fixes
- Fixed [#24](https://github.com/ZoeMeow1027/DutSchedule/issues/24).
- Add a option to get current student year from Internet.
- To access that, please go to `Settings` -> `Experiment Settings` -> `Current School Year`.
- Some settings won't load after update. You might need to reconfig them in settings. I'm sorry about that.
- Login screen will let you relogin if previous attempt was failed.
- You can clear previous login to attempt with another account.
- Now you can turn off notifications about news global and news subject.
- In news subject notifications, you can choose about "All", "Match your filter" and "Off".
- News filter settings will now only shown when enabled (this mean it will hidden at default).
- Update Vietnamese strings for most screens, but not done yet.
- Optimized codes and updated dependencies to latest.
- Updated dependencies to latest to fix issues about Account feature.

## 2.0-draft16 (1063)
- AccountActivity:
- Add option to refresh login when previous is failed.
Expand Down
19 changes: 0 additions & 19 deletions CREDIT.md

This file was deleted.

52 changes: 28 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,24 @@
A unofficial Android app to provide better UI from [sv.dut.udn.vn](http://sv.dut.udn.vn).

# Version

- Release version: [![https://github.com/ZoeMeow1027/DutSchedule](https://img.shields.io/github/v/release/ZoeMeow1027/DutSchedule)](https://github.com/ZoeMeow1027/DutSchedule/releases)
- Pre-release version: [![https://github.com/ZoeMeow1027/DutSchedule/tree/draft](https://img.shields.io/github/v/tag/ZoeMeow1027/DutSchedule?label=pre-release%20tag)](https://github.com/ZoeMeow1027/DutSchedule/tree/draft)
- Badge provided by [https://shields.io/](https://shields.io/).
- If you want to view changelog, [click here](#where-can-i-found-app-changelog).

# Features & Screenshots?

- These screenshot will get you to app summary. Just navigate to [screenshot](SCREENSHOT.md) and open images to view details.

# Downloads

- Navigate to release (at right of this README) or click [here](https://github.com/ZoeMeow1027/DutSchedule/releases) to download app.

# Build app yourself

- Required Gradle: 8.5
- Older version of Gradle will be failed while building.
- If you open project with Android Studio, make sure your IDE support Gradle [Gradle](https://gradle.org/releases/) above, which can be fixed by upgrading your IDE. After that, just build and run app normally as you do with another Android project.
- If you want to build app without IDE, just type command as you build another gradle project (note that you need to [Gradle](https://gradle.org/releases/) installed first):

```
Build: gradlew build
For Powershell: ./gradlew build
```

# FAQ

### Where can I found app changelog?

If you want to:
- View major changes: [Click here](CHANGELOG.md).
- View entire source code changes, [click here](https://github.com/ZoeMeow1027/DutSchedule/commits).
- View entire source code changes: [Click here](https://github.com/ZoeMeow1027/DutSchedule/commits).
- You will need to change branch if you want to view changelog for stable/draft version.

### Why some news in application is different from sv.dut.udn.vn?
Expand All @@ -47,17 +33,35 @@ If you want to:

### I'm got issue with this app. Which place can I reproduce issue for you?

- You can report issue via [Issue tab](https://github.com/ZoeMeow1027/DutSchedule/issues) on this repository.

# Known issues

If you found a issue, you can report this via [issue tab](https://github.com/ZoeMeow1027/DutSchedule/issues) on this repository.
- Global news and subject news were shown not correctly.
- You just need to refresh news and this will clear old and get latest one automatically.
- Can't get current wallpaper as my app background wallpaper.
- On Android 14, Google is restricted for getting current wallpaper on Android 14 or later. This issue will be delayed very loong until a posible fix. You can [see why here](https://github.com/ZoeMeow1027/DutSchedule/issues/19).

# Credits, changelog and license?
- [Changelog](CHANGELOG.md)
- [Credit](CREDIT.md)
- License: [MIT](LICENSE)
# Developing
- Required Gradle: 8.7
- Older version of Gradle may be failed while building.
- Build with Android Studio:
- Make sure your IDE support [Gradle](https://gradle.org/releases/) above, which can be fixed by upgrading your IDE.
- After that, just build and run app normally as you do with another Android project.
- Build with command line (without IDE):
- Ensure you have installed [Gradle](https://gradle.org/releases/) and Java JDK 17 first.
- Type command as you build another gradle project.
```
Build: gradlew build
In Powershell: ./gradlew build
```

# Credits and license?
- License: [**MIT**](LICENSE)
- DISCLAIMER:
- This project - DutSchedule - is not affiliated with Da Nang University of Technology.
- DUT, Da Nang University of Technology, web materials and web contents are trademarks and copyrights of Da Nang University of Technology school.
- GitHub, GitHub mark and its icon are trademarks and copyrights of GitHub, Inc.
- Google, Android and its icon are trademarks and copyrights of Google LLC.
- Used third-party dependencies:
- [Google Accompanist](https://github.com/google/accompanist): Licensed under the [Apache License 2.0](https://github.com/google/accompanist/blob/main/LICENSE).
- [Google Gson](https://github.com/google/gson): Licensed under the [Apache License 2.0](https://github.com/google/gson/blob/main/LICENSE).
- [Jsoup](https://github.com/jhy/jsoup): Licensed under the [MIT license](https://github.com/jhy/jsoup/blob/master/LICENSE).
- [timeago](https://github.com/marlonlom/timeago): Licensed under the [Apache License 2.0](https://github.com/marlonlom/timeago/blob/master/LICENSE).
51 changes: 24 additions & 27 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ android {
applicationId "io.zoemeow.dutschedule"
minSdk 21
targetSdkVersion 34
versionCode 1064
versionName "2.0-draft16"
versionCode 1404
versionName "2.0-draft17"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down Expand Up @@ -43,37 +43,35 @@ android {
composeOptions {
kotlinCompilerExtensionVersion '1.4.3'
}

// https://stackoverflow.com/a/77068664
packaging {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
it.excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}

dependencies {
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
implementation 'androidx.activity:activity-compose:1.8.2'
implementation platform('androidx.compose:compose-bom:2023.10.01')
implementation "androidx.compose.ui:ui:1.6.1"
implementation "androidx.compose.ui:ui-tooling-preview:1.6.1"
implementation 'androidx.compose.material3:material3'
implementation platform('androidx.compose:compose-bom:2023.10.01')
implementation 'androidx.activity:activity-compose:1.9.0'
implementation platform('androidx.compose:compose-bom:2024.05.00')
implementation "androidx.compose.ui:ui:1.6.7"
implementation "androidx.compose.ui:ui-tooling-preview:1.6.7"
implementation platform('androidx.compose:compose-bom:2024.05.00')
implementation 'androidx.compose.ui:ui-graphics'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation platform('androidx.compose:compose-bom:2023.10.01')
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.6.1"
androidTestImplementation platform('androidx.compose:compose-bom:2023.10.01')
debugImplementation "androidx.compose.ui:ui-tooling:1.6.1"
debugImplementation "androidx.compose.ui:ui-test-manifest:1.6.1"
androidTestImplementation platform('androidx.compose:compose-bom:2024.05.00')
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.6.7"
androidTestImplementation platform('androidx.compose:compose-bom:2024.05.00')
debugImplementation "androidx.compose.ui:ui-tooling:1.6.7"
debugImplementation "androidx.compose.ui:ui-test-manifest:1.6.7"
implementation "androidx.appcompat:appcompat:1.6.1"
implementation "androidx.appcompat:appcompat-resources:1.6.1"


// implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.1.0'

// https://mvnrepository.com/artifact/androidx.navigation/navigation-compose
implementation 'androidx.navigation:navigation-compose:2.7.7'

Expand All @@ -83,18 +81,18 @@ dependencies {
runtimeOnly 'androidx.lifecycle:lifecycle-viewmodel-compose:2.7.0'

// https://mvnrepository.com/artifact/androidx.fragment/fragment-ktx
runtimeOnly 'androidx.fragment:fragment-ktx:1.7.0-alpha10'
runtimeOnly 'androidx.fragment:fragment-ktx:1.7.0'

// https://mvnrepository.com/artifact/androidx.compose.material3/material3
runtimeOnly 'androidx.compose.material3:material3:1.2.0'
implementation 'androidx.compose.material3:material3:1.2.1'

// AlarmManager for restart service after closed
// Required to avoid crash on Android 12 - API 31
implementation 'androidx.work:work-runtime:2.9.0'
implementation 'androidx.work:work-runtime-ktx:2.9.0'

// https://mvnrepository.com/artifact/androidx.compose.material/material-icons-extended
runtimeOnly 'androidx.compose.material:material-icons-extended:1.6.1'
// runtimeOnly 'androidx.compose.material:material-icons-extended:1.6.3'

// Google Dagger/Hilt
implementation 'com.google.dagger:hilt-android:2.49'
Expand All @@ -111,29 +109,28 @@ dependencies {
// https://mvnrepository.com/artifact/com.google.accompanist/accompanist-pager-indicators
runtimeOnly 'com.google.accompanist:accompanist-pager-indicators:0.33.2-alpha'

// Accompanist - Drawable Painter
// implementation 'com.google.accompanist:accompanist-drawablepainter:0.23.1'

// Jsoup HTML parser library - https://mvnrepository.com/artifact/org.jsoup/jsoup
implementation 'org.jsoup:jsoup:1.17.2'

// Google Gson - https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation 'com.google.code.gson:gson:2.10.1'

// Android Browser (use WebView in app) - https://mvnrepository.com/artifact/androidx.browser/browser
implementation 'androidx.browser:browser:1.8.0-beta02'
implementation 'androidx.browser:browser:1.8.0'

// https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.12'

implementation 'org.jetbrains.kotlinx:kotlinx-datetime:0.5.0'

implementation 'com.github.dutwrapper:dutwrapper-java:238ab7398f'
implementation 'com.github.dutwrapper:dutwrapper-java:484d2f6f4a'

implementation 'com.google.android.material:material:1.11.0'
implementation 'com.google.android.material:material:1.12.0'

// Display time ago in news subject
implementation 'com.github.marlonlom:timeago:4.0.3'

implementation 'androidx.core:core-splashscreen:1.2.0-alpha01'
}

// Allow references to generated code
Expand Down
Binary file modified app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions app/src/main/java/io/zoemeow/dutschedule/GlobalVariables.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.zoemeow.dutschedule

class GlobalVariables {
companion object {
const val REQUEST_EXPIRED_DURATION = 1000 * 60 * 5

const val LINK_FORGOT_PASSWORD = "https://www.facebook.com/ctsvdhbkdhdn/posts/pfbid02G5sza1p8x7tEJ7S1Cac6a66EW3exgxLNmR9L26RZ8sX8xjhbEnguoeAXms31i7oxl"
const val LINK_REPOSITORY = "https://github.com/ZoeMeow1027/DutSchedule"
const val LINK_REPOSITORY_RELEASE = "${LINK_REPOSITORY}/releases"
const val LINK_CHANGELOG = "https://github.com/ZoeMeow1027/DutSchedule/blob/stable/CHANGELOG.md"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ import io.zoemeow.dutschedule.ui.view.account.TrainingSubjectResult

@AndroidEntryPoint
class AccountActivity: BaseActivity() {
companion object {
const val INTENT_SUBJECTINFORMATION = "subject_information"
const val INTENT_SUBJECTFEE = "subject_fee"
const val INTENT_ACCOUNTINFORMATION = "acc_info"
const val INTENT_ACCOUNTTRAININGSTATUS = "acc_training_result"
const val INTENT_ACCOUNTSUBJECTRESULT = "acc_training_result_subjectresult"
}

@Composable
override fun OnPreloadOnce() {

Expand All @@ -27,37 +35,41 @@ class AccountActivity: BaseActivity() {
contentColor: Color
) {
when (intent.action) {
"subject_information" -> {
INTENT_SUBJECTINFORMATION -> {
SubjectInformation(
context = context,
snackBarHostState = snackBarHostState,
containerColor = containerColor,
contentColor = contentColor
)
}
"subject_fee" -> {
INTENT_SUBJECTFEE -> {
SubjectFee(
context = context,
snackBarHostState = snackBarHostState,
containerColor = containerColor,
contentColor = contentColor
)
}
"acc_info" -> {
INTENT_ACCOUNTINFORMATION -> {
AccountInformation(
context = context,
snackBarHostState = snackBarHostState,
containerColor = containerColor,
contentColor = contentColor
)
}
"acc_training_result" -> {
INTENT_ACCOUNTTRAININGSTATUS -> {
TrainingResult(
context = context,
snackBarHostState = snackBarHostState,
containerColor = containerColor,
contentColor = contentColor
)
}
"acc_training_result_subjectresult" -> {
INTENT_ACCOUNTSUBJECTRESULT -> {
TrainingSubjectResult(
context = context,
snackBarHostState = snackBarHostState,
containerColor = containerColor,
contentColor = contentColor
Expand Down
Loading

0 comments on commit 1778efd

Please sign in to comment.