Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit c32eb4a

Browse files
55nknownJohn Smith
55nknown
authored and
John Smith
committed
task updates
1 parent ba6bd76 commit c32eb4a

File tree

11 files changed

+185
-110
lines changed

11 files changed

+185
-110
lines changed

filcnaplo/android/app/build.gradle

+11
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ android {
5353
multiDexEnabled true
5454
}
5555

56+
compileOptions {
57+
// Flag to enable support for the new language APIs
58+
coreLibraryDesugaringEnabled true
59+
// Sets Java compatibility to Java 8
60+
sourceCompatibility JavaVersion.VERSION_1_8
61+
targetCompatibility JavaVersion.VERSION_1_8
62+
}
63+
5664
signingConfigs {
5765
release {
5866
keyAlias keystoreProperties['keyAlias']
@@ -85,4 +93,7 @@ dependencies {
8593
implementation 'joda-time:joda-time:2.9.4'
8694
androidTestImplementation 'androidx.test:runner:1.1.1'
8795
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
96+
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'
97+
implementation 'androidx.window:window:1.0.0'
98+
implementation 'androidx.window:window-java:1.0.0'
8899
}

filcnaplo/android/app/src/main/AndroidManifest.xml

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="hu.filc.naplo">
2-
<application android:label="Filc Napló" android:icon="@mipmap/ic_launcher" android:requestLegacyExternalStorage="true">
3-
<activity android:exported="true" android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
4-
<meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" />
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools" package="hu.filc.naplo">
3+
<application android:label="Filc Napló" tools:replace="android:label" android:icon="@mipmap/ic_launcher"
4+
android:requestLegacyExternalStorage="true">
5+
<activity android:exported="true" android:name=".MainActivity"
6+
android:launchMode="singleTop" android:theme="@style/LaunchTheme"
7+
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
8+
android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize"
9+
android:showWhenLocked="true"
10+
android:turnScreenOn="true">
11+
<meta-data android:name="io.flutter.embedding.android.NormalTheme"
12+
android:resource="@style/NormalTheme" />
513
<intent-filter>
614
<action android:name="android.intent.action.MAIN" />
715
<category android:name="android.intent.category.LAUNCHER" />

filcnaplo/android/build.gradle

+11-11
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ buildscript {
1313
}
1414

1515
dependencies {
16-
classpath 'com.android.tools.build:gradle:4.1.0'
16+
classpath 'com.android.tools.build:gradle:4.2.2'
1717
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1818
}
1919
}
2020

21-
// allprojects {
22-
// repositories {
23-
// google()
24-
// jcenter()
25-
// maven {
26-
// // [required] background_fetch
27-
// url "${project(':background_fetch').projectDir}/libs"
28-
// }
29-
// }
30-
// }
21+
allprojects {
22+
repositories {
23+
google()
24+
jcenter()
25+
maven {
26+
// [required] background_fetch
27+
url "${project(':background_fetch').projectDir}/libs"
28+
}
29+
}
30+
}
3131

3232
subprojects {
3333
afterEvaluate {project ->

filcnaplo/ios/Podfile.lock

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
PODS:
22
- app_group_directory (1.0.0):
33
- Flutter
4+
- background_fetch (1.1.5):
5+
- Flutter
46
- connectivity_plus (0.0.1):
57
- Flutter
68
- ReachabilitySwift
@@ -46,6 +48,8 @@ PODS:
4648
- Mantle
4749
- SDWebImage
4850
- SDWebImageWebPCoder
51+
- flutter_local_notifications (0.0.1):
52+
- Flutter
4953
- flutter_native_image (0.0.1):
5054
- Flutter
5155
- FMDB (2.7.5):
@@ -101,12 +105,14 @@ PODS:
101105

102106
DEPENDENCIES:
103107
- app_group_directory (from `.symlinks/plugins/app_group_directory/ios`)
108+
- background_fetch (from `.symlinks/plugins/background_fetch/ios`)
104109
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
105110
- DKImagePickerController/PhotoGallery (from `https://github.com/zhangao0086/DKImagePickerController.git`)
106111
- file_picker (from `.symlinks/plugins/file_picker/ios`)
107112
- Flutter (from `Flutter`)
108113
- flutter_custom_tabs (from `.symlinks/plugins/flutter_custom_tabs/ios`)
109114
- flutter_image_compress (from `.symlinks/plugins/flutter_image_compress/ios`)
115+
- flutter_local_notifications (from `.symlinks/plugins/flutter_local_notifications/ios`)
110116
- flutter_native_image (from `.symlinks/plugins/flutter_native_image/ios`)
111117
- home_widget (from `.symlinks/plugins/home_widget/ios`)
112118
- image_crop (from `.symlinks/plugins/image_crop/ios`)
@@ -136,6 +142,8 @@ SPEC REPOS:
136142
EXTERNAL SOURCES:
137143
app_group_directory:
138144
:path: ".symlinks/plugins/app_group_directory/ios"
145+
background_fetch:
146+
:path: ".symlinks/plugins/background_fetch/ios"
139147
connectivity_plus:
140148
:path: ".symlinks/plugins/connectivity_plus/ios"
141149
DKImagePickerController:
@@ -148,6 +156,8 @@ EXTERNAL SOURCES:
148156
:path: ".symlinks/plugins/flutter_custom_tabs/ios"
149157
flutter_image_compress:
150158
:path: ".symlinks/plugins/flutter_image_compress/ios"
159+
flutter_local_notifications:
160+
:path: ".symlinks/plugins/flutter_local_notifications/ios"
151161
flutter_native_image:
152162
:path: ".symlinks/plugins/flutter_native_image/ios"
153163
home_widget:
@@ -184,13 +194,15 @@ CHECKOUT OPTIONS:
184194

185195
SPEC CHECKSUMS:
186196
app_group_directory: 7bf9f8f9819ead554de29da7c25fb7a680d6a9a0
197+
background_fetch: 9a9963128952bfdd197e21786983c7c7a30e1478
187198
connectivity_plus: 413a8857dd5d9f1c399a39130850d02fe0feaf7e
188199
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
189200
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
190201
file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95
191202
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
192203
flutter_custom_tabs: 7a10a08686955cb748e5d26e0ae586d30689bf89
193204
flutter_image_compress: 5a5e9aee05b6553048b8df1c3bc456d0afaac433
205+
flutter_local_notifications: 0c0b1ae97e741e1521e4c1629a459d04b9aec743
194206
flutter_native_image: 9c0b7451838484458e5b0fae007b86a4c2d4bdfe
195207
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
196208
home_widget: 2829415127ee92e876f816cbbe44c0b6601b8a37
@@ -215,4 +227,4 @@ SPEC CHECKSUMS:
215227

216228
PODFILE CHECKSUM: 862f939bb7e5390bdb8b2534eb81a9457ea9fbdc
217229

218-
COCOAPODS: 1.11.3
230+
COCOAPODS: 1.12.0

filcnaplo/ios/Runner/Info.plist

+63-54
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,71 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
4-
<dict>
5-
<key>CFBundleDevelopmentRegion</key>
6-
<string>$(DEVELOPMENT_LANGUAGE)</string>
7-
<key>CFBundleExecutable</key>
8-
<string>$(EXECUTABLE_NAME)</string>
9-
<key>CFBundleIdentifier</key>
10-
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11-
<key>CFBundleInfoDictionaryVersion</key>
12-
<string>6.0</string>
13-
<key>CFBundleName</key>
14-
<string>Filc Napló</string>
15-
<key>CFBundlePackageType</key>
16-
<string>APPL</string>
17-
<key>CFBundleShortVersionString</key>
18-
<string>$(FLUTTER_BUILD_NAME)</string>
19-
<key>CFBundleSignature</key>
20-
<string>????</string>
21-
<key>CFBundleVersion</key>
22-
<string>$(FLUTTER_BUILD_NUMBER)</string>
23-
<key>LSRequiresIPhoneOS</key>
24-
<true/>
25-
<key>NSSupportsLiveActivities</key>
26-
<true/>
27-
<key>UILaunchStoryboardName</key>
28-
<string>LaunchScreen</string>
29-
<key>UIMainStoryboardFile</key>
30-
<string>Main</string>
31-
<key>UISupportedInterfaceOrientations</key>
32-
<array>
33-
<string>UIInterfaceOrientationPortrait</string>
34-
<string>UIInterfaceOrientationLandscapeLeft</string>
35-
<string>UIInterfaceOrientationLandscapeRight</string>
36-
</array>
37-
<key>UISupportedInterfaceOrientations~ipad</key>
38-
<array>
39-
<string>UIInterfaceOrientationPortrait</string>
40-
<string>UIInterfaceOrientationPortraitUpsideDown</string>
41-
<string>UIInterfaceOrientationLandscapeLeft</string>
42-
<string>UIInterfaceOrientationLandscapeRight</string>
43-
</array>
44-
<key>UIViewControllerBasedStatusBarAppearance</key>
45-
<false/>
46-
<key>UIStatusBarHidden</key>
47-
<false/>
48-
<key>LSApplicationQueriesSchemes</key>
49-
<array>
50-
<string>https</string>
51-
<string>http</string>
52-
</array>
53-
<key>NSPhotoLibraryUsageDescription</key>
54-
<string>The app requires the photo library to set a custom profile picture.</string>
55-
<key>ITSAppUsesNonExemptEncryption</key>
56-
<false/>
57-
<key>CADisableMinimumFrameDurationOnPhone</key>
4+
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
7+
<key>CFBundleDevelopmentRegion</key>
8+
<string>$(DEVELOPMENT_LANGUAGE)</string>
9+
<key>CFBundleExecutable</key>
10+
<string>$(EXECUTABLE_NAME)</string>
11+
<key>CFBundleIdentifier</key>
12+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
13+
<key>CFBundleInfoDictionaryVersion</key>
14+
<string>6.0</string>
15+
<key>CFBundleName</key>
16+
<string>Filc Napló</string>
17+
<key>CFBundlePackageType</key>
18+
<string>APPL</string>
19+
<key>CFBundleShortVersionString</key>
20+
<string>$(FLUTTER_BUILD_NAME)</string>
21+
<key>CFBundleSignature</key>
22+
<string>????</string>
23+
<key>CFBundleVersion</key>
24+
<string>$(FLUTTER_BUILD_NUMBER)</string>
25+
<key>ITSAppUsesNonExemptEncryption</key>
26+
<false/>
27+
<key>LSApplicationQueriesSchemes</key>
28+
<array>
29+
<string>https</string>
30+
<string>http</string>
31+
</array>
32+
<key>LSRequiresIPhoneOS</key>
33+
<true/>
34+
<key>NSPhotoLibraryUsageDescription</key>
35+
<string>The app requires the photo library to set a custom profile picture.</string>
36+
<key>NSSupportsLiveActivities</key>
5837
<true/>
5938
<key>UIApplicationSupportsIndirectInputEvents</key>
6039
<true/>
40+
<key>UIBackgroundModes</key>
41+
<array>
42+
<string>fetch</string>
43+
<string>processing</string>
44+
</array>
45+
<key>UILaunchStoryboardName</key>
46+
<string>LaunchScreen</string>
47+
<key>UIMainStoryboardFile</key>
48+
<string>Main</string>
49+
<key>UIStatusBarHidden</key>
50+
<false/>
51+
<key>UISupportedInterfaceOrientations</key>
52+
<array>
53+
<string>UIInterfaceOrientationPortrait</string>
54+
<string>UIInterfaceOrientationLandscapeLeft</string>
55+
<string>UIInterfaceOrientationLandscapeRight</string>
56+
</array>
57+
<key>UISupportedInterfaceOrientations~ipad</key>
58+
<array>
59+
<string>UIInterfaceOrientationPortrait</string>
60+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
61+
<string>UIInterfaceOrientationLandscapeLeft</string>
62+
<string>UIInterfaceOrientationLandscapeRight</string>
63+
</array>
64+
<key>BGTaskSchedulerPermittedIdentifiers</key>
65+
<array>
66+
<string>com.transistorsoft.fetch</string>
67+
</array>
68+
<key>UIViewControllerBasedStatusBarAppearance</key>
69+
<false/>
6170
</dict>
6271
</plist>

filcnaplo/ios/livecard/livecard.swift

+54-35
Original file line numberDiff line numberDiff line change
@@ -18,48 +18,67 @@ struct LiveActivitiesAppAttributes: ActivityAttributes, Identifiable {
1818
var id = UUID()
1919
}
2020

21-
@available(iOSApplicationExtension 16.1, *)
22-
struct LiveCardWidget: Widget {
23-
var body: some WidgetConfiguration {
24-
/// Live Activity Notification
25-
ActivityConfiguration(for: LiveActivitiesAppAttributes.self) { context in
26-
let lesson = LessonData()
21+
struct LockScreenLiveActivityView: View {
22+
let context: ActivityViewContext<LiveActivitiesAppAttributes>
2723

28-
HStack(alignment: .center) {
29-
Image(systemName: lesson!.icon)
30-
.resizable()
31-
.aspectRatio(contentMode: .fit)
32-
.frame(width: CGFloat(30), height: CGFloat(30))
33-
.padding(.leading, CGFloat(8))
24+
let lesson = LessonData()
3425

35-
VStack(alignment: .leading) {
26+
var body: some View {
27+
HStack(alignment: .center) {
28+
Image(systemName: lesson!.icon)
29+
.resizable()
30+
.aspectRatio(contentMode: .fit)
31+
.frame(width: CGFloat(30), height: CGFloat(30))
32+
.padding(.leading, CGFloat(24))
33+
34+
VStack(alignment: .leading) {
35+
HStack(alignment: .center) {
3636
Text(lesson!.index + lesson!.title)
3737
.font(.title3)
3838
.bold()
39-
39+
40+
Text(lesson!.subtitle)
41+
.font(.subheadline)
42+
.padding(.trailing, 12)
43+
}
44+
45+
if (lesson!.description != "") {
4046
Text(lesson!.description)
4147
.font(.subheadline)
48+
}
4249

43-
Spacer()
50+
HStack {
51+
Image(systemName: "arrow.right")
52+
.resizable()
53+
.aspectRatio(contentMode: .fit)
54+
.frame(width: CGFloat(8), height: CGFloat(8))
55+
Text(lesson!.nextSubject)
56+
.font(.caption)
57+
Text(lesson!.nextRoom)
58+
.font(.caption2)
59+
}
60+
}.padding(15)
4461

45-
HStack {
46-
Image(systemName: "arrow.right")
47-
.resizable()
48-
.aspectRatio(contentMode: .fit)
49-
.frame(width: CGFloat(12), height: CGFloat(12))
50-
Text(lesson!.nextSubject)
51-
.font(.caption)
52-
Text(lesson!.nextRoom)
53-
.font(.caption2)
54-
}
55-
}.padding(15)
56-
57-
Spacer()
62+
Spacer()
63+
64+
Text(timerInterval: lesson!.date, countsDown: true)
65+
.multilineTextAlignment(.center)
66+
.frame(width: 85)
67+
.font(.title)
68+
.monospacedDigit()
69+
.padding(.trailing, CGFloat(24))
70+
}
71+
.activitySystemActionForegroundColor(.teal)
72+
.activityBackgroundTint(.teal)
73+
}
74+
}
5875

59-
Text(lesson!.subtitle)
60-
.font(.subheadline)
61-
.padding(.trailing, 12)
62-
}.padding(12)
76+
@available(iOSApplicationExtension 16.1, *)
77+
struct LiveCardWidget: Widget {
78+
var body: some WidgetConfiguration {
79+
/// Live Activity Notification
80+
ActivityConfiguration(for: LiveActivitiesAppAttributes.self) { context in
81+
LockScreenLiveActivityView(context: context)
6382
/// Dynamic Island
6483
} dynamicIsland: { context in
6584
let lesson = LessonData()
@@ -109,9 +128,9 @@ struct LiveCardWidget: Widget {
109128
.font(.caption2)
110129
} compactTrailing: {
111130
Text(timerInterval: lesson!.date, countsDown: true)
112-
.multilineTextAlignment(.center)
113-
.frame(width: 40)
114-
.font(.caption2)
131+
.multilineTextAlignment(.center)
132+
.frame(width: 40)
133+
.font(.caption2)
115134

116135
/// Collapsed
117136
} minimal: {

0 commit comments

Comments
 (0)