Sphere Cookbook === ### Target Device - Android API 26 - iOS 14.0 ### Firebase Cloud Message Integration  - [Flutter + FCM](https://hackmd.io/iKXgqusUTLy57yMBDcAxQg) - NestJS <-> FCM integration server - [NestJS + typeorm + MySQL](https://hackmd.io/GuIXz6uXS0mb_lRtqtvDYg) - [NestJS + Keycloak](https://hackmd.io/38zHABqBTNqt3ub7Tdd2cA) - [NestJS + FCM](https://hackmd.io/x_QjCyO5T_OANoNh6-ro8w) ### Rich text editors - <details> <summary>Open Sources</summary> <li>Zefyr https://pub.dev/packages/zefyr</li> <img src="https://hackmd.io/_uploads/r1Kdbz3Hu.png" width="250px"/> <li>HTML editor https://pub.dev/packages/html_editor</li> <img src="https://hackmd.io/_uploads/ryHiEG3rd.png" width="250px"/> <li>Quill https://pub.dev/packages/flutter_quill</li> <img src="https://hackmd.io/_uploads/BJCVfzhH_.png" width="250px"/> </details> - Open source로 구현하려 했으나 우리의 입맛에 맞게 커스터마이징 하기가 까다로웠으며 불필요한 기능이 너무 많아 간단히 직접 구현하기로 하였음 - [간단히 구현한 Rich Text Editor](https://hackmd.io/1rHcex_NQcG7xnz39SGjOg) ### 게시판 아키텍처  ### Flutter local message - Firebase에서 받은 push message를 받는 방식은 두가지로 구분되어있는데 위에서 언급한 방식대로 진행한다면 application이 background로 내려갔을 때만 push notification이 오는 것을 확인할 수 있을것이다. application이 foreground에서 유저가 사용 중 일때 push notification을 주고자 한다면 다음 방법을 이용한다. - flutter_local_notifications 라이브러리를 추가한다 ``` flutter pub add flutter_local_notifications ``` - [Android] AndroidManifest.xml 파일 - 디바이스 잠김 상태에서도 알람 표시 ``` <activity ... android:showWhenLocked="true" android:turnScreenOn="true" > ``` - 재부팅 시 알람 유지 ``` <receiver android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED"/> <action android:name="android.intent.action.MY_PACKAGE_REPLACED"/> <action android:name="android.intent.action.QUICKBOOT_POWERON" /> <action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/> </intent-filter> </receiver> ``` - 필요한 권한 - 앱이 잠김 해제 ``` <uses-permission android:name="android.permission.WAKE_LOCK" /> ``` - 디바이스 리부팅 시그널 ``` <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/> ``` - Vibrate 권한 ``` <uses-permission android:name="android.permission.VIBRATE" /> ``` - notification을 탭한 후 앱을 전체화면으로 실행 ``` <uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" /> ``` - [iOS] AppDelegate 파일 iOS는 기본적으로 앱이 foreground일 때 알림이 안오도록 되어있음 따라서 10버전 이상일 겨우 동작하도록 수정 ``` - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { [GeneratedPluginRegistrant registerWithRegistry:self]; if (@available(iOS 10.0, *)) { [UNUserNotificationCenter currentNotificationCenter].delegate = (id<UNUserNotificationCenterDelegate>) self; } ... ``` ### Native Splash (작성 예정) ### Secure Storage
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up