Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Feature - Custom Notification Sound #72

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions client-app/android/app/src/main/res/raw/keep.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools"
tools:keep="@raw/noti"
/>
Binary file not shown.
4 changes: 4 additions & 0 deletions client-app/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
502CFD2439A0334DD5F77BC6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3AF3C7126897ED1E90EB0AA9 /* Pods_Runner.framework */; };
5E77E6F62D067E4D00D68A60 /* noti.wav in Resources */ = {isa = PBXBuildFile; fileRef = 5E77E6F52D067E4D00D68A60 /* noti.wav */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
961716843285C5D9828E9EE9 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 42E5E379F6D9C7E8C4146EAB /* Pods_RunnerTests.framework */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
Expand Down Expand Up @@ -50,6 +51,7 @@
3AF3C7126897ED1E90EB0AA9 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
42E5E379F6D9C7E8C4146EAB /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
5E77E6F52D067E4D00D68A60 /* noti.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = noti.wav; sourceTree = "<group>"; };
5EF2F6A82D0330E9000963A8 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -121,6 +123,7 @@
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
5E77E6F52D067E4D00D68A60 /* noti.wav */,
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
Expand Down Expand Up @@ -265,6 +268,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5E77E6F62D067E4D00D68A60 /* noti.wav in Resources */,
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
Expand Down
Binary file added client-app/ios/noti.wav
Binary file not shown.
2 changes: 1 addition & 1 deletion client-app/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: wooahan
description: "Senior Care Service – We're Still Going Strong"

version: 1.0.3+2
version: 1.0.3+3

environment:
sdk: '>=3.4.3 <4.0.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ public static class PublicPost {
"/auth/reissue/password",
"/auth/validations/email",
"/auth/validations/authentication-code",
"/auth/sign-up"
"/auth/sign-up",

// Notification
"/v1/users/**"
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,27 @@ Message convertToMap(User user, ETime time) {
.setBody(content)
.build()
)
.setAndroidConfig(
AndroidConfig.builder()
.setNotification(
AndroidNotification.builder()
.setPriority(AndroidNotification.Priority.HIGH)
.setChannelId("wooahan_remote_channel_id")
.setSound("noti.wav")
.build()
)
.build()
)
.setApnsConfig(
ApnsConfig.builder()
.setAps(
Aps.builder()
.setSound("default")
.setSound("noti.wav")
.build()
)
.setFcmOptions(
ApnsFcmOptions.builder()
.setAnalyticsLabel("wooahan")
.build()
)
.build()
Expand Down