Skip to content

Commit

Permalink
Merge branch 'main' into feat-autoStart-and-batteryOptimization-permi…
Browse files Browse the repository at this point in the history
…ssion-denied
  • Loading branch information
yayacat authored Oct 1, 2024
2 parents 988b260 + e5afc04 commit 0109b1f
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 56 deletions.
16 changes: 8 additions & 8 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@
520D584A2C5504790019366D /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/Main.strings; sourceTree = "<group>"; };
520D584B2C5504790019366D /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
5228AD5A2C2EE45D007635F5 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
529BD5D12C48C28B00EFE088 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/Main.strings"; sourceTree = "<group>"; };
529BD5D22C48C28B00EFE088 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/LaunchScreen.strings"; sourceTree = "<group>"; };
529BD5D12C48C28B00EFE088 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/Main.strings; sourceTree = "<group>"; };
529BD5D22C48C28B00EFE088 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
529C27C92C93F7B900AAFAB6 /* zh */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh; path = zh.lproj/InfoPlist.strings; sourceTree = "<group>"; };
529C27CC2C93F7BC00AAFAB6 /* ko */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ko; path = ko.lproj/InfoPlist.strings; sourceTree = "<group>"; };
529C27CE2C947EE800AAFAB6 /* zh-Hant */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hant"; path = "zh-Hant.lproj/InfoPlist.strings"; sourceTree = "<group>"; };
529C27CF2C947EFB00AAFAB6 /* ja */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ja; path = ja.lproj/InfoPlist.strings; sourceTree = "<group>"; };
529C27DC2C97019E00AAFAB6 /* zh_TW */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = zh_TW; path = zh_TW.lproj/InfoPlist.strings; sourceTree = "<group>"; };
52E010A32C7C5DDC00C87792 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/Main.strings; sourceTree = "<group>"; };
52E010A42C7C5DDC00C87792 /* vi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = vi; path = vi.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
632125282C2EA17900A088F8 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -292,11 +292,11 @@
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = "zh-Hant";
developmentRegion = zh_TW;
hasScannedForEncodings = 0;
knownRegions = (
Base,
"zh-Hant",
zh_TW,
en,
ja,
ko,
Expand Down Expand Up @@ -495,8 +495,8 @@
children = (
529C27C92C93F7B900AAFAB6 /* zh */,
529C27CC2C93F7BC00AAFAB6 /* ko */,
529C27CE2C947EE800AAFAB6 /* zh-Hant */,
529C27CF2C947EFB00AAFAB6 /* ja */,
529C27DC2C97019E00AAFAB6 /* zh_TW */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
Expand All @@ -505,7 +505,7 @@
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
529BD5D12C48C28B00EFE088 /* zh-Hant */,
529BD5D12C48C28B00EFE088 /* zh_TW */,
520D58442C5504340019366D /* en */,
520D58462C55043C0019366D /* ja */,
520D58482C5504590019366D /* ko */,
Expand All @@ -519,7 +519,7 @@
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
529BD5D22C48C28B00EFE088 /* zh-Hant */,
529BD5D22C48C28B00EFE088 /* zh_TW */,
520D58452C5504340019366D /* en */,
520D58472C55043C0019366D /* ja */,
520D58492C5504590019366D /* ko */,
Expand Down
56 changes: 28 additions & 28 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,36 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>dev.flutter.background.refresh</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleDisplayName</key>
<string>DPIP</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleName</key>
<string>dpip</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>DPIP</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleLocalizations</key>
<array>
<string>zh_TW</string>
Expand All @@ -27,20 +41,12 @@
<string>ko</string>
<string>vi</string>
</array>
<key>CFBundleName</key>
<string>dpip</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>BGTaskSchedulerPermittedIdentifiers</key>
<array>
<string>dev.flutter.background.refresh</string>
</array>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>DPIP 將利用你的位置資訊,用以自動設定所在地並在地震發生時能較準確地預估所在地的最大震度。</string>
<key>NSLocationAlwaysUsageDescription</key>
Expand All @@ -51,18 +57,12 @@
<string>用於儲存地震報告圖片。</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>用於儲存地震報告圖片。</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
<string>location</string>
<string>remote-notification</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 11 additions & 17 deletions lib/app/page/map/tsunami/tsunami.dart
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
style: TextStyle(
fontSize: 28,
fontWeight: FontWeight.bold,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -400,7 +399,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
letterSpacing: 1,
color: context.colors.onSurface.withOpacity(0.8),
),
),
Expand All @@ -411,7 +409,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
: "${getTime()} 更新",
style: TextStyle(
fontSize: 14,
letterSpacing: 1,
color: context.colors.onSurfaceVariant,
),
),
Expand Down Expand Up @@ -478,7 +475,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
"${tsunami?.content}",
style: TextStyle(
fontSize: 18,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -494,7 +490,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -512,7 +507,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -530,7 +524,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
style: TextStyle(
fontSize: 22,
fontWeight: FontWeight.bold,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -544,16 +537,19 @@ class _TsunamiMapState extends State<TsunamiMap> {
context.i18n.occurrence_time,
style: TextStyle(
fontSize: 18,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
convertTimestamp(tsunami!.eq.time),
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -569,19 +565,22 @@ class _TsunamiMapState extends State<TsunamiMap> {
context.i18n.report_location,
style: TextStyle(
fontSize: 18,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
tsunami!.eq.loc,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -590,7 +589,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -611,7 +609,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
context.i18n.scale,
style: TextStyle(
fontSize: 18,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -620,7 +617,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -638,7 +634,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
context.i18n.depth,
style: TextStyle(
fontSize: 18,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand All @@ -647,7 +642,6 @@ class _TsunamiMapState extends State<TsunamiMap> {
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
letterSpacing: 2,
color: context.colors.onSurface,
),
),
Expand Down
9 changes: 6 additions & 3 deletions lib/core/notify.dart
Original file line number Diff line number Diff line change
Expand Up @@ -232,14 +232,17 @@ Future<void> notifyInit() async {
channelKey: "tsunami-important",
channelName: "海嘯資訊(重大)",
channelDescription: "海嘯警報發布時,沿海地區鄉鎮",
importance: NotificationImportance.High,
importance: NotificationImportance.Max,
defaultPrivacy: NotificationPrivacy.Public,
criticalAlerts: true,
playSound: true,
soundSource: 'resource://raw/tsunami',
defaultRingtoneType: DefaultRingtoneType.Alarm,
defaultColor: Colors.red,
ledColor: Colors.red,
enableVibration: true,
vibrationPattern: mediumVibrationPattern),
vibrationPattern: highVibrationPattern,
locked: true),
NotificationChannel(
channelGroupKey: 'group_tsunami',
channelKey: "tsunami-general",
Expand All @@ -248,7 +251,7 @@ Future<void> notifyInit() async {
importance: NotificationImportance.Default,
defaultPrivacy: NotificationPrivacy.Public,
playSound: true,
soundSource: 'resource://raw/warn',
soundSource: 'resource://raw/normal',
defaultColor: Colors.red,
ledColor: Colors.red,
enableVibration: true,
Expand Down

0 comments on commit 0109b1f

Please sign in to comment.