Compare commits

...

164 Commits

Author SHA1 Message Date
Jannik 28520bee74
changelog: minor text fixes
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details
2020-09-04 11:08:50 +02:00
Jannik 0c6a486dd9 Merge pull request 'version 0.6.0' (#46) from develop into master
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
Reviewed-on: #46
2020-08-25 19:24:49 +02:00
Jannik ec15c79b63
update fastlane screenshot
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
2020-08-25 12:05:22 +02:00
Jannik 4592d1984f
release version 0.6.0
continuous-integration/drone/push Build is passing Details
2020-08-25 11:55:55 +02:00
Jannik aae74cf9db „README.md“ ändern
continuous-integration/drone/push Build is passing Details
2020-08-25 11:06:38 +02:00
Jannik e19b0db39d
add missing licenses to license dialog
continuous-integration/drone/push Build is passing Details
2020-08-25 10:52:59 +02:00
Jannik 23fd52b0c5
fab: use plus as icon
continuous-integration/drone/push Build is passing Details
2020-08-24 20:22:46 +02:00
Jannik 62a62049c3
code clean up
continuous-integration/drone/push Build is passing Details
2020-08-23 14:27:41 +02:00
Jannik 849698779b
add icon as svg
continuous-integration/drone/push Build is passing Details
* recreate all launcher icons
2020-08-23 14:06:28 +02:00
Jannik a42a92a3c5
update constraintlayout
continuous-integration/drone/push Build is passing Details
* constraintlayout 2.0.0.rc1 -> 2.0.0
2020-08-22 20:35:44 +02:00
Jannik be30e2f968
enable optimisations and minifying for release builds
continuous-integration/drone/push Build is passing Details
* closes #19
* update gradle wrapper to version 6.6
2020-08-22 20:20:23 +02:00
Jannik c629b2aec2
fix login button
continuous-integration/drone/push Build is passing Details
* fix login button action in Onboarding
* add release changelog
* update description
* use new version code scheme
2020-08-21 19:03:28 +02:00
Jannik 99ba87c3f6
init fragment in onViewCreated()
continuous-integration/drone/push Build is passing Details
* closes #42
* show a info text if no mensa menus where found
* the refresh spinner respects the selecte theme now
2020-08-17 22:30:12 +02:00
Jannik 953b4825a9
check qispos status and show message if unavailable
continuous-integration/drone/push Build is passing Details
2020-08-16 21:30:18 +02:00
Jannik 2807843d25
fix grades divider shown when sub-subject was added
continuous-integration/drone/push Build is passing Details
2020-08-15 18:15:36 +02:00
Jannik 638c321798
grades ui polishing & sorting fix
continuous-integration/drone/push Build is passing Details
2020-08-15 18:13:29 +02:00
Jannik 42d938b0bc
fix background in fragment_grades
continuous-integration/drone/push Build is passing Details
* disable swipe in fragment_grades
2020-08-14 21:57:09 +02:00
Jannik 9d7504bbaf
add grades ui
continuous-integration/drone/push Build is passing Details
2020-08-14 21:41:43 +02:00
Jannik 8ecfe8f120
QISPOSParser [Part 2]
continuous-integration/drone/push Build is passing Details
* parse grades and store them in a HashMap per semester
2020-08-14 15:08:42 +02:00
Jannik ff0c4ad1a7
QISPOSParser [Part 1]
continuous-integration/drone/push Build is passing Details
* get the grades url from qispos
2020-08-13 21:01:21 +02:00
Jannik ea0caea91e
save email and password to encrypted preference
continuous-integration/drone/push Build is passing Details
2020-08-12 11:00:22 +02:00
Jannik 1f660bdd37
add login dialog
continuous-integration/drone/push Build is passing Details
* first step towards a working his online integration
* rework AddSubjectDialog
* activate fragment_on_login
2020-08-11 17:09:46 +02:00
Jannik be43d87b1a
fix more lint warnings
continuous-integration/drone/push Build is passing Details
2020-08-10 15:11:36 +02:00
Jannik dd5c7b3fb8
fix some lint warnings
continuous-integration/drone/push Build is passing Details
* remove unused resources
2020-08-10 14:51:40 +02:00
Jannik fb3dab6dc3
save additional subjects and load them on start
continuous-integration/drone/push Build is passing Details
* the app now saves all aditional subjects and lessons and loads them on start
* udpate gradle 6.4.0 -> 6.5.1
* update coroutines 1.3.7 -> 1.3.8
* update several androidx libraries
2020-08-10 14:31:17 +02:00
Jannik bcfdb83d14
rework CacheController and TCoRAPIController
continuous-integration/drone/push Build is passing Details
* all cache file stuff is now handled in the CacheController
* TCoRAPIController only handles API and Gson stuff
2020-08-07 12:14:50 +02:00
Jannik 8c55366ec0
update libs
continuous-integration/drone/push Build is passing Details
* gradle plugin 4.0.0 -> 4.0.1
2020-07-15 16:02:58 +02:00
Jannik 6f68fbb73c „README.md“ ändern
continuous-integration/drone/push Build is passing Details
2020-06-25 17:30:56 +02:00
Jannik 297dd77e79
use gradle wrapper for drone
continuous-integration/drone/push Build is passing Details
2020-06-25 17:25:58 +02:00
Jannik 6a70f26807
update .drone.yml
continuous-integration/drone/push Build is failing Details
2020-06-25 17:22:06 +02:00
Jannik f6b00a8d81
additional Subject are now added to the timetable 2020-06-12 00:51:50 +02:00
Jannik 69ce9fef5a
code clean up 2020-06-11 21:51:46 +02:00
Jannik 2d753851c0
more "Additional Lessons" work
* add TimetableController, this class will handle all timetable work (main + additional Subjects)
2020-06-11 21:41:05 +02:00
Jannik 6c0624c793
make the app more tolerant about wrong API Data 2020-06-11 18:39:19 +02:00
Jannik 7779296345
change default accent color, code clean up 2020-06-07 23:41:49 +02:00
Jannik 3e2ef0521e
change primary color to reflect mosad.xyz design guidelines
* minor style fix: nav_header_main set background to black and text color to white
2020-06-07 23:30:41 +02:00
Jannik bdfeb46faf
add "Manage Lessons" Dialog to Settings, minor style fixes
* initially select the current theme in the select theme dialog
* set the correct accent color for all dialogs (needs to be done manually for every dialog)
2020-06-07 14:59:04 +02:00
Jannik 18ca435764
update TCoRAPIController to API version 1.2.0 2020-06-06 20:56:45 +02:00
Jannik 948f330ebe
TimeTableFragment clean up 2020-06-05 20:56:37 +02:00
Jannik 72e9efb9e7
fix warings in TCoRAPIController 2020-06-05 19:17:49 +02:00
Jannik bea1b47396
complete & move AddLessonDialog to separate class 2020-06-05 16:12:53 +02:00
Jannik 34a68ff75d
add courses to addLesson Dialog, read lessonSubjects from tcor 2020-05-29 16:56:15 +02:00
Jannik 1ba3f1fa87
update gradle tool to 4.0.0 2020-05-28 23:27:16 +02:00
Jannik 48544aef2f
add a complete version of the addLesson Dialog 2020-05-15 18:58:57 +02:00
Jannik bc09e33147
update gradle, constraintlayout & coroutines
* gradle 6.2.1 -> 6.4
* constraintlayout 2.0.0-beta4 -> 2.0.0-beta6
* coroutines 1.3.5 -> 1.3.6
2020-05-14 18:27:26 +02:00
Jannik 6ec9b9f5e2
update commons-lang and coroutines
* commons-lang 3.9 -> 3.10
* coroutines 1.3.3 -> 1.3.5
2020-05-01 12:48:53 +02:00
Jannik a19173b499
update kotlin
* kotlin 1.3.70 -> 1.3.71
* gradle-plugin 3.6.1 -> 3.6.2
2020-04-02 17:15:34 +02:00
Jannik 85dc3181fd
fix compatibility with tcor version 1.2.2 and higher
* update kotlin 1.3.61 -> 1.3.70
2020-03-03 20:13:47 +01:00
Jannik e46c234b6c
fix OnboardingActivity is not closed on start of MainActivity 2020-02-27 12:13:46 +01:00
Jannik faa07966da
fix crash on first start, if tcor is not reachable 2020-02-27 12:09:24 +01:00
Jannik ccc0f0f2bc
Onboarding [Part 2]
* call the onboarding activity on first start
* reworked selectCourse(() to work outside of the SettingsFragment
* closes #36
2020-02-25 15:25:45 +01:00
Jannik e15bf95b85
update to gradle 6.2.1 and gradle android plugin 3.6.0 2020-02-25 11:12:22 +01:00
Jannik 01677c04ef
Onboarding [Part 1]
this Commit adds a Onboarding Activity, it is currently not usefull or fully working, see #36
2020-02-23 20:09:27 +01:00
Jannik 6e9c63d3d4 Merge branch 'develop' of Seil0/ProjectLaogai into master [Hotfix] 2020-02-18 15:24:08 +01:00
Jannik c343735b57
fix crash on first startup 2020-02-18 15:18:36 +01:00
Jannik 9c5274dc06 Merge branch 'develop' of Seil0/ProjectLaogai into master
release version 0.5.1
2020-02-05 14:15:04 +01:00
Jannik b186a2e96e
release version 0.5.1 2020-02-05 14:10:45 +01:00
Jannik 2cb4b72369
anko code removed, coroutines are now used for asynchronous functions
* constraintlayout 2.0.0-beta3 -> 2.0.0-beta4
* material-components-android 1.0.0 -> 1.1.0
* this is the first release candidate for version 0.5.1
2020-02-04 19:58:07 +01:00
Jannik 2d497d1a96
update gradle wrapper to version 6.0.1 2020-01-15 15:28:07 +01:00
Jannik 9d2de3fcb3
don't use deprecated Gson methods 2020-01-15 15:08:05 +01:00
Jannik bed3f5d978
added Timetable and Moodle shortcut, cleaned up activity init 2020-01-15 15:00:05 +01:00
Jannik 8f5a4dd1b3
reworked preference saving 2019-12-13 14:54:51 +01:00
Jannik 9907d083e9
added a Mensa shortcut
* added a Mensa shortcut, to directly display the Mensa-Screen
* kotlin 1.3.60 -> 1.3.61
2019-11-28 16:38:25 +01:00
Jannik d4860b2a32
updated some libs
* kotlin 1.3.50 -> 1.3.60
* androidx.constraintlayout 2.0.0-beta2 -> 2.0.0-beta3
2019-11-14 23:11:49 +01:00
Jannik 5ec2b53bce
added "Get it on Google Play" badge 2019-10-24 22:22:17 +02:00
Jannik 701a351e6e
update .drone.yml
continuous-integration/drone/push Build encountered an error Details
2019-10-17 19:21:15 +02:00
Jannik 5cad924b26
removed anko dependency from PreferenceController
continuous-integration/drone/push Build encountered an error Details
2019-10-17 19:19:47 +02:00
Jannik 605bf6248d release 0.5.0
Merge branch 'develop' of Seil0/ProjectLaogai into master
2019-09-30 21:28:54 +02:00
Jannik d5adc4df51
release 0.5.0 2019-09-30 21:25:38 +02:00
Jannik c23454f081
removed versionNameSuffix, f-droid does not like that 2019-09-28 15:01:19 +02:00
Jannik b240beacc9
turns out there is a current week too
* don't debug timetable cod on Sundays, since there are no lessons on Sunday
2019-09-25 22:46:58 +02:00
Jannik aa69d2242f
fixed course name not being updated on change
* minor GUI improvements
2019-09-23 22:44:03 +02:00
Jannik 6e6c9f71a0
reworked the way the timetable date is calculated
* cleaned up some timetable gui code
* close #33
2019-09-22 20:51:36 +02:00
Jannik 889c673c5d Update 'README.md' 2019-09-08 20:35:06 +02:00
Jannik 522f31e077
added new screenshots 2019-09-08 20:30:03 +02:00
Jannik b9ca18044c
drone use gradle test instead of assembleRelease
continuous-integration/drone/push Build is failing Details
continuous-integration/drone/pr Build is failing Details
2019-09-07 21:10:51 +02:00
Jannik bd49e482e2
updated some libs
continuous-integration/drone/push Build is failing Details
continuous-integration/drone/pr Build is failing Details
* appcompat 1.0.2 -> 1.1.0
* material-dialogs 3.1.0 -> 3.1.1
2019-09-07 21:06:41 +02:00
Jannik 2f5b2a6579
added drone ci
* updated gradle wrapper to gradle 5.6.2
2019-09-07 21:01:17 +02:00
Jannik 4ce37b3dcf
updated desfire legal notes 2019-08-30 14:17:07 +02:00
Jannik 7550fcfd22 Update 'README.md' 2019-08-30 14:12:17 +02:00
Jannik a23f7c9212
update to release 0.5.0 2019-08-30 14:09:59 +02:00
Jannik 75168c6688
some more logging and version 0.4.99 (RC1) 2019-08-25 22:45:23 +02:00
Jannik be916a74ab
the license dialog will now follow the theme too 2019-08-25 22:19:36 +02:00
Jannik 3e909ab68f
color the selected element in the NavigationView too 2019-08-23 20:25:20 +02:00
Jannik 5f2b3aa496
clean up the layout & polished Mensa credit dialog
* don't crash if the nfc tag has been removed between triggering intent and connecting to the tag
* closes #21
2019-08-23 19:19:35 +02:00
Jannik 6cc1671a52
don't crash on devices without nfc 2019-08-21 20:43:08 +02:00
Jannik b4ed1ca927
migrated all farebot code to kotlin 2019-08-19 12:42:56 +02:00
Jannik e74c307566
cleand up the nfc part, added foreground-dispatch
* cleaned up the strings.xml files
* fixed license dialog
2019-08-18 22:09:33 +02:00
Jannik 733b675ffa
first working implementation of the mensa card reader
* based on farebot's desfire protocol implementation
* see #21
2019-08-17 18:59:28 +02:00
Jannik 3a0a31f781
first bits of the nfc reader 2019-08-17 01:51:15 +02:00
Jannik f52151fbf1
the no lesson card now has the correct text color
* updated material-dialogs to version 3.1.0
2019-07-18 00:32:31 +02:00
Jannik e8cae7e807
update to gradle 5.5.1, update gradle plugin to 3.4.2 2019-07-18 00:15:57 +02:00
Jannik c6ac19bfae
fixed the Sunday-fix 2019-07-01 20:31:06 +02:00
Jannik a7abd48726
moved all cache checking code tho the CacheController
* added new sunday bug fix for the timetable, same as for the mensa
2019-06-26 15:00:43 +02:00
Jannik 9a22d9b737
use a ScrollView for the settings fragment 2019-06-26 14:11:32 +02:00
Jannik 2cc2ecf952
theme the dialogs and navView too, added a License dialog 2019-06-25 17:10:57 +02:00
Jannik ea70aedbd0
added the fastlane changelog for version 14 2019-06-25 13:09:17 +02:00
Jannik 98b3adbf3b
update to kotlin 1.3.40, added theme choose option
* added missing dividers in settings
* added a black theme
* closes #15
2019-06-25 12:07:18 +02:00
Jannik a055f59cc8
added a dark theme, see #15
* the app now needs sdkversion 23 now an min
2019-06-24 22:41:45 +02:00
Jannik 01db6bb451
don't use the faBtn in MensaFragment, use it in TimetableFragment 2019-06-08 23:14:55 +02:00
Jannik 4838c9406c
fastlane description spelling fixes 2019-06-06 23:36:55 +02:00
Jannik 23195f94e0
don't us deprecated tcor api requests 2019-06-03 12:05:33 +02:00
Jannik 5e766ec126
hide the mensa card value button 2019-06-03 10:59:32 +02:00
Jannik 9c1f95ca25
some lib updates & new sunday-bug fix 2019-06-02 19:09:36 +02:00
Jannik e99127a63a Update 'README.md' 2019-05-03 22:54:43 +02:00
Jannik f7fa96b1ae
use gradle 5.4.1
* fixes build issues if instant run is enabled
2019-05-03 22:45:53 +02:00
Jannik ac37bce145 Merge branch 'develop' of Seil0/ProjectLaogai into master 2019-05-02 14:43:20 +02:00
Jannik 6fd82254e0
updated description for f-droid 2019-05-02 14:42:28 +02:00
Jannik 0dd8ba9475
release 0.4.1 2019-05-01 01:04:09 +02:00
Jannik 770e9a255d Update 'README.md' 2019-05-01 00:46:47 +02:00
Jannik 4589badbfc
updated versionName to 0.4.1
* updated material-dialogs 2.6.0 -> 2.8.1
2019-05-01 00:36:33 +02:00
Jannik 74f75bfbde update to kotlin 1.3.31, gradle 5.1.1 & gradle plugin 3.4.0 2019-04-25 18:27:57 +01:00
Jannik a00c651bfd disable layout change animation 2019-04-08 18:39:43 +02:00
Jannik 77757ad9ca fixed mensa screen crash if day has no meals 2019-04-08 14:04:26 +02:00
Jannik fe111ac56b added refresh to timetable screen 2019-04-06 14:13:01 +02:00
Jannik 4971d0b1b8 added fastlane metadata 2019-04-05 15:05:29 +02:00
Jannik 2bd86ff6bb added fastlane metadata 2019-04-05 15:03:53 +02:00
Jannik dbaf496a79 minor clean up and refactoring 2019-04-03 20:37:17 +02:00
Jannik 77326a8ed6 added ability to refresh the mensa menus
* some minor clean ups
2019-04-03 19:21:51 +02:00
Jannik 9fc897e194 fixed initial accent color 2019-04-02 13:23:37 +02:00
Jannik f9ac219ec6 Merge remote-tracking branch 'origin/master' into develop 2019-04-02 13:22:32 +02:00
Jannik a87e57c80e removed versionNameSuffix 2019-04-01 18:03:26 +02:00
Jannik ff1d353cae removed versionNameSuffix 2019-04-01 18:03:03 +02:00
Jannik 6e5cf29eaa removed maven repo 2019-04-01 17:55:37 +02:00
Jannik ee388bf5a5 removed maven repo 2019-04-01 17:55:14 +02:00
Jannik 8aaf8e3647 release 0.4.0
* use Locale.getDefault() for the timetable screen
2019-04-01 10:14:00 +02:00
Jannik d645d75bbf fixed showing wrong meal of tomorrow on Wednesday 2019-03-27 19:29:54 +01:00
Jannik f97491addd added mensa sunday workaround
* update mensa blocking un sundays between 1500 and 2359
* updated material-dialogs 2.2.0 -> 2.6.0
2019-03-27 13:29:36 +01:00
Jannik e08790aaa4 show the next day with a lecture on Sundays too 2019-03-24 17:23:10 +01:00
Jannik 750a808fbe the homescreen now shows the next day with a lecture
* fixed getTomorrowWeekIndex() since it would return 7 which is out of the arrays bounds
* minor clean up
2019-03-23 21:07:33 +01:00
Jannik e51a80b78d home screen redesign 2019-03-22 21:59:32 +01:00
Jannik a4eaea2918 timetable and mensa gui redesign
* the timetable and mensa screen are now the same design as the settings, much cleaner and ready for themes
2019-03-20 21:33:55 +01:00
Jannik cd3136715f spelling 2019-03-20 17:55:30 +01:00
Jannik 15f1386b6e some minor gui fixes
* why was minifyEnabled = false ??????????
2019-03-19 19:51:58 +01:00
Jannik 3bace6c155 Update 'README.md' 2019-03-19 19:18:34 +01:00
Jannik 61716f8eb4 Update 'README.md' 2019-03-19 19:13:47 +01:00
Jannik a1410f7b80 sort of worked around the Sunday problem 2019-03-18 19:09:03 +01:00
Jannik 953185425b fixed menu formatting 2019-03-17 20:52:34 +01:00
Jannik a6d14044c2 added initial course selection
* some minor gui fixes
2019-03-17 18:38:31 +01:00
Jannik f3b7ff066d added the tcor api
* drastically improved loading times, closes #14
2019-03-17 18:12:36 +01:00
Jannik 040eb26dcf update app version to 0.3.90 2019-03-14 22:57:41 +01:00
Jannik 1a5d2b6561 fix homescreen 2019-03-14 08:04:09 +01:00
Jannik 92b60d660c updated gradle build tool to 3.3.2 2019-03-14 08:03:39 +01:00
Jannik a4eceeddc9 added 2nd week menus & option to disable buffet in the mensa tab
* the GUI now shows a second week for Mensa menus
* you can disable the buffet in the Mensa tab now
2019-03-10 13:37:13 +01:00
Jannik 3e3a80442e next weeks menu & accent color
* the MensaParser can now get the next weeks menus
* it's now possible to select a accent color
2019-03-09 22:15:53 +01:00
Jannik 5a1a07cd42 minor gui updates 2019-03-03 20:46:51 +01:00
Jannik dbfdaffe99 the app can now display multiple lessons per time slot
* display multiple lessons per slot if needed
* material dialogs 2.0.0 -> 2.0.3
2019-03-01 18:59:17 +01:00
Jannik 58eb217ab7 added a new timetable parser implementation
* added supports for multiple lessons per slot
* added support for lessons which take 2 slots
2019-02-28 14:52:40 +01:00
Jannik 24f920c05f Added PreferenceController
* all preferences and global variables are now inside the PreferenceController, this makes it much easier to extend the apps functionality
* CourseTTLink is now Course with courseLink and courseName as values
2019-02-17 15:05:03 +01:00
Jannik 6301308d76 Update 'README.md' 2019-02-16 17:38:24 +01:00
Jannik 8e205fa889 updated the gradle plugin to 3.3.1 2019-02-14 16:27:29 +01:00
Jannik e9bdcee443 some clean up
* removed unnecessary MainActivity dependencies
2019-02-14 16:25:23 +01:00
Jannik b214cfccb2 „README.md“ ändern 2019-02-13 21:16:17 +01:00
Jannik 404ddd58b8 „README.md“ ändern 2019-02-13 21:14:34 +01:00
Jannik 137ff7df0c „README.md“ ändern 2019-02-13 21:10:38 +01:00
Jannik b4071d7456 updated some libs
* material-dialogs 2.0.0-rc5 -> 2.0.0
2019-02-09 21:58:35 +01:00
Jannik 5e6e6cfde6 updated gradle plugin to 3.3.0 2019-01-15 18:55:06 +01:00
Jannik ffeb09a37f fixed a possible issue with the mensa parser 2019-01-04 23:58:54 +01:00
Jannik 75a457312d major bug fixes & version 0.3.2
* fixed a issue that prevented the app from showing the second weeks schedule, until now the app showed always the current week as next week
* minor color chooser improvements
* minor code clean up
2019-01-03 13:46:09 +01:00
Jannik 87bf614d28 added color saving
** WARNING this contains issues, many issues **
2019-01-03 01:45:28 +01:00
Jannik e69354af96 clean up 2018-12-18 11:49:46 +01:00
Jannik ec74a8e4f8 basic color selection 2018-12-14 15:02:19 +01:00
Jannik b49d16b1a1 updated some libs, meal tomorrow shows correct string if there's no meal 2018-12-02 00:05:23 +01:00
Jannik 70059b4b0c added moodle webview 2018-11-30 13:54:39 +01:00
130 changed files with 5876 additions and 1320 deletions

9
.drone.yml Normal file
View File

@ -0,0 +1,9 @@
kind: pipeline
name: default
steps:
- name: assembleRelease
image: nextcloudci/android10:android-56
commands:
- ./gradlew assembleRelease

View File

@ -1,12 +1,27 @@
# ProjectLaogai "hso App"
Some info about the app ...
[![Build Status](https://drone.mosad.xyz/api/badges/Seil0/ProjectLaogai/status.svg)](https://drone.mosad.xyz/Seil0/ProjectLaogai)
![fdroid version](https://img.shields.io/f-droid/v/org.mosad.seil0.projectlaogai.svg?style=flat-square)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg?style=flat-square)](https://www.gnu.org/licenses/gpl-3.0)
# Project Laogai
Project Laogai is an app to access the timetable, grades (qispos) and the canteen menu of Hochschule Offenburg. Laogai uses the TCoR-API fot timetables and the canteen menu, wich makes acessing them super fast. To get the grades from Qispos, Laogai will ask for your login data, wich are stored encrypted on your device.
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" height="75">](https://f-droid.org/packages/org.mosad.seil0.projectlaogai/)
[<img src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" height="75">](https://play.google.com/store/apps/details?id=org.mosad.seil0.projectlaogai)
## Features
* look up what you can eat in the mensa
* check your timetable
* probably many many bugs
* have your grades displayed directly in the app
* show the timetable of your course
* take a look at the canteen menu for the current and next week
* check the current balance of your mensa card
* open moodle directly in the app
Please report bugs and issues to support@mosad.xyz
## Screenshots
[<img src="https://www.mosad.xyz/images/Project_Laogai/ProjectLaogai_HomeScreen.png" width=180>](https://www.mosad.xyz/images/Project_Laogai/ProjectLaogai_HomeScreen.png)
[<img src="https://www.mosad.xyz/images/Project_Laogai/ProjectLaogai_Mensa.png" width=180>](https://www.mosad.xyz/images/Project_Laogai/ProjectLaogai_Mensa.png)
[<img src="https://www.mosad.xyz/images/Project_Laogai/ProjectLaogai_Timetable.png" width=180>](https://www.mosad.xyz/images/Project_Laogai/ProjectLaogai_Timetable.png)
[<img src="https://www.mosad.xyz/images/Project_Laogai/ProjectLaogai_Settings.png" width=180>](https://www.mosad.xyz/images/Project_Laogai/ProjectLaogai_Settings.png)
[<img src="https://www.mosad.xyz/images/Project_Laogai/ProjectLaogai_Mensa_dark.png" width=180>](https://www.mosad.xyz/images/Project_Laogai/ProjectLaogai_Mensa_dark.png)
ProjectLaogai © 2018 mosad www.mosad.xyz, Project by [@Seil0](https://git.mosad.xyz/Seil0)
ProjectLaogai © 2019-2020 [@Seil0](https://git.mosad.xyz/Seil0), a [mosad.xyz](http://www.mosad.xyz) Project

View File

@ -1,43 +1,75 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
signingConfigs {
}
compileSdkVersion 28
compileSdkVersion 29
defaultConfig {
applicationId "org.mosad.seil0.projectlaogai"
minSdkVersion 21
targetSdkVersion 28
versionCode 9
versionName "0.3.1"
minSdkVersion 23
targetSdkVersion 29
versionCode 6000 // 0006000
versionName "0.6.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
resValue "string", "build_time", buildTime()
setProperty("archivesBaseName", "projectlaogai-$versionName")
}
buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
res.srcDirs =
[
'src/main/res/layouts/activities',
'src/main/res/layouts/dialogs',
'src/main/res/layouts/fragments',
'src/main/res/layouts',
'src/main/res'
]
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.8'
implementation 'androidx.core:core:1.3.1'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
implementation 'org.jsoup:jsoup:1.11.3'
implementation 'org.jetbrains.anko:anko-commons:0.10.8'
implementation 'com.afollestad.material-dialogs:core:2.0.0-rc1'
implementation 'com.afollestad.material-dialogs:color:2.0.0-rc1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
implementation 'androidx.security:security-crypto:1.1.0-alpha02'
implementation 'com.google.android.material:material:1.2.0'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'com.afollestad:aesthetic:1.0.0-beta05'
implementation 'com.afollestad.material-dialogs:core:3.3.0'
implementation 'com.afollestad.material-dialogs:color:3.3.0'
implementation 'com.afollestad.material-dialogs:bottomsheets:3.3.0'
implementation 'de.psdev.licensesdialog:licensesdialog:2.1.0'
implementation 'org.apache.commons:commons-lang3:3.11'
implementation 'org.jsoup:jsoup:1.13.1'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test:core:1.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
}
static def buildTime() {
return new Date().format("yyyy-MM-dd", TimeZone.getTimeZone("UTC"))
}

View File

@ -15,7 +15,16 @@
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
-dontobfuscate
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
-keep class org.mosad.seil0.projectlaogai.util.** { <fields>; }
#Gson
-keepattributes Signature
-dontwarn sun.misc.**
#misc
-dontwarn java.lang.instrument.ClassFileTransformer

View File

@ -1,7 +1,7 @@
package org.mosad.seil0.projectlaogai
import androidx.test.InstrumentationRegistry
import androidx.test.runner.AndroidJUnit4
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import org.junit.Test
import org.junit.runner.RunWith
@ -18,7 +18,7 @@ class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getTargetContext()
val appContext = InstrumentationRegistry.getInstrumentation().context
assertEquals("org.mosad.seil0.projectlaogai", appContext.packageName)
}
}

View File

@ -2,31 +2,55 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.mosad.seil0.projectlaogai">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.NFC" />
<application
android:allowBackup="true"
android:fullBackupContent="@xml/backup_descriptor"
android:icon="@mipmap/ic_laogai_icon"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_laogai_icon"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:theme="@style/AppTheme.Light">
<activity
android:name=".SplashActivity"
android:label="@string/app_name"
android:theme="@style/SplashTheme"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<meta-data android:name="android.app.shortcuts"
android:resource="@xml/shortcuts" />
</activity>
<activity
android:name=".OnboardingActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.Light"
android:screenOrientation="portrait"
android:launchMode="singleTop">
</activity>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar"
android:screenOrientation="portrait">
android:theme="@style/AppTheme.Light"
android:screenOrientation="portrait"
android:launchMode="singleTop">
<!-- nfc stuff -->
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED"/>
</intent-filter>
<meta-data android:name="android.nfc.action.TECH_DISCOVERED"
android:resource="@xml/nfc_tech_filter" />
</activity>
</application>

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

View File

@ -0,0 +1,227 @@
/**
* Utils.kt
*
* Copyright (C) 2011 Eric Butler
* Copyright (C) 2019 <seil0@mosad.xyz>
*
* Authors:
* Eric Butler <eric@codebutler.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
package com.codebutler.farebot
import android.app.Activity
import android.app.AlertDialog
import android.util.Log
import android.view.WindowManager
import com.codebutler.farebot.card.desfire.DesfireException
import com.codebutler.farebot.card.desfire.DesfireFileSettings
import com.codebutler.farebot.card.desfire.DesfireProtocol
import org.w3c.dom.Node
import java.io.StringWriter
import javax.xml.transform.OutputKeys
import javax.xml.transform.TransformerFactory
import javax.xml.transform.dom.DOMSource
import javax.xml.transform.stream.StreamResult
import kotlin.experimental.and
class Utils {
companion object {
private val TAG = Utils::class.java.name
@Suppress("unused")
fun showError(activity: Activity, ex: Exception) {
Log.e(activity.javaClass.name, ex.message, ex)
AlertDialog.Builder(activity)
.setMessage(getErrorMessage(ex))
.show()
}
@Suppress("unused")
fun showErrorAndFinish(activity: Activity, ex: Exception) {
try {
Log.e(activity.javaClass.name, getErrorMessage(ex))
ex.printStackTrace()
AlertDialog.Builder(activity)
.setMessage(getErrorMessage(ex))
.setCancelable(false)
.setPositiveButton(android.R.string.ok) { _, _ -> activity.finish() }
.show()
} catch (unused: WindowManager.BadTokenException) {
/* Ignore... happens if the activity was destroyed */
}
}
@Throws(Exception::class)
fun getHexString(b: ByteArray): String {
var result = ""
for (i in b.indices) {
result += ((b[i] and 0xff.toByte()) + 0x100).toString(16).substring(1)
}
return result
}
@Suppress("unused")
fun getHexString(b: ByteArray, defaultResult: String): String {
return try {
getHexString(b)
} catch (ex: Exception) {
defaultResult
}
}
@Suppress("unused")
fun hexStringToByteArray(s: String): ByteArray {
if (s.length % 2 != 0) {
throw IllegalArgumentException("Bad input string: $s")
}
val len = s.length
val data = ByteArray(len / 2)
var i = 0
while (i < len) {
data[i / 2] = ((Character.digit(s[i], 16) shl 4) + Character.digit(s[i + 1], 16)).toByte()
i += 2
}
return data
}
@JvmOverloads
fun byteArrayToInt(b: ByteArray, offset: Int = 0, length: Int = b.size): Int {
return byteArrayToLong(b, offset, length).toInt()
}
fun byteArrayToLong(b: ByteArray, offset: Int, length: Int): Long {
if (b.size < length)
throw IllegalArgumentException("length must be less than or equal to b.length")
var value: Long = 0
for (i in 0 until length) {
val shift = (length - 1 - i) * 8
value += ((b[i + offset].toInt() and 0x000000FF).toLong() shl shift)
}
return value
}
@Suppress("unused")
fun byteArraySlice(b: ByteArray, offset: Int, length: Int): ByteArray {
val ret = ByteArray(length)
for (i in 0 until length)
ret[i] = b[offset + i]
return ret
}
@Suppress("unused")
@Throws(Exception::class)
fun xmlNodeToString(node: Node): String {
// The amount of code required to do simple things in Java is incredible.
val source = DOMSource(node)
val stringWriter = StringWriter()
val result = StreamResult(stringWriter)
val factory = TransformerFactory.newInstance()
val transformer = factory.newTransformer()
transformer.setOutputProperty(OutputKeys.INDENT, "yes")
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2")
transformer.uriResolver = null
transformer.transform(source, result)
return stringWriter.buffer.toString()
}
fun getErrorMessage(ex: Throwable): String {
var errorMessage: String? = ex.localizedMessage
if (errorMessage == null)
errorMessage = ex.message
if (errorMessage == null)
errorMessage = ex.toString()
if (ex.cause != null) {
var causeMessage: String? = ex.cause!!.localizedMessage
if (causeMessage == null)
causeMessage = ex.cause!!.message
if (causeMessage == null)
causeMessage = ex.cause.toString()
errorMessage += ": $causeMessage"
}
return errorMessage
}
@Suppress("unused")
fun <T> findInList(list: List<T>, matcher: Matcher<T>): T? {
for (item in list) {
if (matcher.matches(item)) {
return item
}
}
return null
}
interface Matcher<T> {
fun matches(t: T): Boolean
}
fun selectAppFile(tag: DesfireProtocol, appID: Int, fileID: Int): DesfireFileSettings? {
try {
tag.selectApp(appID)
} catch (e: DesfireException) {
Log.w(TAG, "App not found")
return null
}
return try {
tag.getFileSettings(fileID)
} catch (e: DesfireException) {
Log.w(TAG, "File not found")
null
}
}
fun arrayContains(arr: IntArray, item: Int): Boolean {
for (i in arr)
if (i == item)
return true
return false
}
@Suppress("unused")
fun containsAppFile(tag: DesfireProtocol, appID: Int, fileID: Int): Boolean {
try {
tag.selectApp(appID)
} catch (e: DesfireException) {
Log.w(TAG, "App not found")
Log.w(TAG, e)
return false
}
return try {
arrayContains(tag.fileList, fileID)
} catch (e: DesfireException) {
Log.w(TAG, "File not found")
Log.w(TAG, e)
false
}
}
}
}

View File

@ -0,0 +1,9 @@
package com.codebutler.farebot.card.desfire
/**
* Created by Jakob Wenzel on 16.11.13.
*/
class DesfireException : Exception {
constructor(message: String) : super(message)
constructor(cause: Throwable) : super(cause)
}

View File

@ -0,0 +1,104 @@
/**
* DesfireFile.kt
*
* Copyright (C) 2011 Eric Butler
* Copyright (C) 2019 <seil0@mosad.xyz>
*
* Authors:
* Eric Butler <eric@codebutler.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
package com.codebutler.farebot.card.desfire
import android.os.Parcel
import android.os.Parcelable
import com.codebutler.farebot.card.desfire.DesfireFileSettings.RecordDesfireFileSettings
import org.apache.commons.lang3.ArrayUtils
open class DesfireFile private constructor(val id: Int, private val fileSettings: DesfireFileSettings?, val data: ByteArray) :
Parcelable {
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeInt(id)
if (this is InvalidDesfireFile) {
parcel.writeInt(1)
parcel.writeString(this.errorMessage)
} else {
parcel.writeInt(0)
parcel.writeParcelable(fileSettings, 0)
parcel.writeInt(data.size)
parcel.writeByteArray(data)
}
}
override fun describeContents(): Int {
return 0
}
class RecordDesfireFile(fileId: Int, fileSettings: DesfireFileSettings, fileData: ByteArray) :
DesfireFile(fileId, fileSettings, fileData) {
private val records: Array<DesfireRecord?>
init {
val settings = fileSettings as RecordDesfireFileSettings
val records = arrayOfNulls<DesfireRecord>(settings.curRecords)
for (i in 0 until settings.curRecords) {
val offset = settings.recordSize * i
records[i] = DesfireRecord(ArrayUtils.subarray(data, offset, offset + settings.recordSize))
}
this.records = records
}
}
class InvalidDesfireFile(fileId: Int, val errorMessage: String?) : DesfireFile(fileId, null, ByteArray(0))
companion object {
fun create(fileId: Int, fileSettings: DesfireFileSettings, fileData: ByteArray): DesfireFile {
return (fileSettings as? RecordDesfireFileSettings)?.let { RecordDesfireFile(fileId, it, fileData) }
?: DesfireFile(fileId, fileSettings, fileData)
}
@Suppress("unused")
@JvmField
val CREATOR: Parcelable.Creator<DesfireFile> = object : Parcelable.Creator<DesfireFile> {
override fun createFromParcel(source: Parcel): DesfireFile {
val fileId = source.readInt()
val isError = source.readInt() == 1
return if (!isError) {
val fileSettings =
source.readParcelable<Parcelable>(DesfireFileSettings::class.java.classLoader) as DesfireFileSettings
val dataLength = source.readInt()
val fileData = ByteArray(dataLength)
source.readByteArray(fileData)
create(fileId, fileSettings, fileData)
} else {
InvalidDesfireFile(fileId, source.readString())
}
}
override fun newArray(size: Int): Array<DesfireFile?> {
return arrayOfNulls(size)
}
}
}
}

View File

@ -0,0 +1,248 @@
/**
* DesfireFileSettings.kt
*
* Copyright (C) 2011 Eric Butler
* Copyright (C) 2019 <seil0@mosad.xyz>
*
* Authors:
* Eric Butler <eric@codebutler.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
package com.codebutler.farebot.card.desfire
import android.os.Parcel
import android.os.Parcelable
import com.codebutler.farebot.Utils
import org.apache.commons.lang3.ArrayUtils
import java.io.ByteArrayInputStream
abstract class DesfireFileSettings : Parcelable {
private val fileType: Byte
private val commSetting: Byte
private val accessRights: ByteArray
@Suppress("unused")
val fileTypeName: String
get() {
return when (fileType) {
STANDARD_DATA_FILE -> "Standard"
BACKUP_DATA_FILE -> "Backup"
VALUE_FILE -> "Value"
LINEAR_RECORD_FILE -> "Linear Record"
CYCLIC_RECORD_FILE -> "Cyclic Record"
else -> "Unknown"
}
}
private constructor(stream: ByteArrayInputStream) {
fileType = stream.read().toByte()
commSetting = stream.read().toByte()
accessRights = ByteArray(2)
stream.read(accessRights, 0, accessRights.size)
}
private constructor(fileType: Byte, commSetting: Byte, accessRights: ByteArray) {
this.fileType = fileType
this.commSetting = commSetting
this.accessRights = accessRights
}
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeByte(fileType)
parcel.writeByte(commSetting)
parcel.writeInt(accessRights.size)
parcel.writeByteArray(accessRights)
}
override fun describeContents(): Int {
return 0
}
class StandardDesfireFileSettings : DesfireFileSettings {
private val fileSize: Int
internal constructor(stream: ByteArrayInputStream) : super(stream) {
val buf = ByteArray(3)
stream.read(buf, 0, buf.size)
ArrayUtils.reverse(buf)
fileSize = Utils.byteArrayToInt(buf)
}
internal constructor(
fileType: Byte,
commSetting: Byte,
accessRights: ByteArray,
fileSize: Int
) : super(fileType, commSetting, accessRights) {
this.fileSize = fileSize
}
override fun writeToParcel(parcel: Parcel, flags: Int) {
super.writeToParcel(parcel, flags)
parcel.writeInt(fileSize)
}
}
class RecordDesfireFileSettings : DesfireFileSettings {
private val maxRecords: Int
val recordSize: Int
val curRecords: Int
constructor(stream: ByteArrayInputStream) : super(stream) {
var buf = ByteArray(3)
stream.read(buf, 0, buf.size)
ArrayUtils.reverse(buf)
recordSize = Utils.byteArrayToInt(buf)
buf = ByteArray(3)
stream.read(buf, 0, buf.size)
ArrayUtils.reverse(buf)
maxRecords = Utils.byteArrayToInt(buf)
buf = ByteArray(3)
stream.read(buf, 0, buf.size)
ArrayUtils.reverse(buf)
curRecords = Utils.byteArrayToInt(buf)
}
internal constructor(
fileType: Byte,
commSetting: Byte,
accessRights: ByteArray,
recordSize: Int,
maxRecords: Int,
curRecords: Int
) : super(fileType, commSetting, accessRights) {
this.recordSize = recordSize
this.maxRecords = maxRecords
this.curRecords = curRecords
}
override fun writeToParcel(parcel: Parcel, flags: Int) {
super.writeToParcel(parcel, flags)
parcel.writeInt(recordSize)
parcel.writeInt(maxRecords)
parcel.writeInt(curRecords)
}
}
class ValueDesfireFileSettings(stream: ByteArrayInputStream) : DesfireFileSettings(stream) {
private val lowerLimit: Int
private val upperLimit: Int
val value: Int
private val limitedCreditEnabled: Byte
init {
var buf = ByteArray(4)
stream.read(buf, 0, buf.size)
ArrayUtils.reverse(buf)
lowerLimit = Utils.byteArrayToInt(buf)
buf = ByteArray(4)
stream.read(buf, 0, buf.size)
ArrayUtils.reverse(buf)
upperLimit = Utils.byteArrayToInt(buf)
buf = ByteArray(4)
stream.read(buf, 0, buf.size)
ArrayUtils.reverse(buf)
value = Utils.byteArrayToInt(buf)
buf = ByteArray(1)
stream.read(buf, 0, buf.size)
limitedCreditEnabled = buf[0]
//http://www.skyetek.com/docs/m2/desfire.pdf
//http://neteril.org/files/M075031_desfire.pdf
}
override fun writeToParcel(parcel: Parcel, flags: Int) {
super.writeToParcel(parcel, flags)
parcel.writeInt(lowerLimit)
parcel.writeInt(upperLimit)
parcel.writeInt(value)
parcel.writeByte(limitedCreditEnabled)
}
}
class UnsupportedDesfireFileSettings(fileType: Byte) :
DesfireFileSettings(fileType, java.lang.Byte.MIN_VALUE, ByteArray(0))
companion object {
/* DesfireFile Types */
internal const val STANDARD_DATA_FILE = 0x00.toByte()
internal const val BACKUP_DATA_FILE = 0x01.toByte()
internal const val VALUE_FILE = 0x02.toByte()
internal const val LINEAR_RECORD_FILE = 0x03.toByte()
internal const val CYCLIC_RECORD_FILE = 0x04.toByte()
@Throws(DesfireException::class)
fun create(data: ByteArray): DesfireFileSettings {
val fileType = data[0]
val stream = ByteArrayInputStream(data)
return if (fileType == STANDARD_DATA_FILE || fileType == BACKUP_DATA_FILE)
StandardDesfireFileSettings(stream)
else if (fileType == LINEAR_RECORD_FILE || fileType == CYCLIC_RECORD_FILE)
RecordDesfireFileSettings(stream)
else if (fileType == VALUE_FILE)
ValueDesfireFileSettings(stream)