val gso = GoogleSignInOptions .Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(getString(R.string.default_web_client_id)) .requestEmail() .build() R.string.default_web_client_id 를 설정하지 않았다고 계속 에러가 떠는데, 어떡해 해야 하는지 알고 싶습니다. 그리고 GoogleSignIn이 현제는 deprecate 되었는데, 참고할 만한 자료가 있는지 알고 싶습니다.
안녕하세요 강의 잘 듣고 있습니다. 현재 강의를 듣고 FCM을 구현하던 중 백그라운드 상태에서 push 알림을 핸들링 하고자하는데 어려움이 있어 질문 남겨요. messaging().setBackgroundMessageHandler(async remoteMessage => { const channelId = Platform.OS === 'ios' ? remoteMessage.category : remoteMessage.notification?.android?.channelId; console.log('FCM Channel ID:', channelId); if (channelId === 'example-sample') { // 해당 채널 ID가 'example-sample'인 경우 Push 알림 노출하지 않고 종료합니다. return; } }); 목표 ( 채널을 통한 알림 수신 거부 처리 ) 1. 앱서버에서 메시지 전송시 channel id값을 담아 발송. 2. 앱이 background or quick 일때 특정 channel id시에는 push 알림 비 노출 해당 메소드를 정상적으로 타긴 하지만 이미 디바이스에서는 알림이 오고 있습니다. 백그라운드 또는 종료 상태일경우 FCM 메시지를 컨트롤 할 수 없는 것일까요?
핸드폰 상단바에서 알림 표시만 되고 알림 팝업은 되지 않습니다. localNotification을 활용해서 팝업시켜 봤지만 그렇게 될 경우 onNotification과 함께 중복된 알람 2개가 동시에 옵니다.그리고 상단바를 열어서 localNotification으로 온 알람을 press하게 되면 데이터가 빈 오브젝트로 넘어와서 Screen Navigate를 하지 못합니다. (onNotification로 발생하는 알림에서만 데이터를 활용할 수 있는 상황입니다) 결론은 onNotification로 온 알림이 팝업되어서 press를 하면 해당 화면을 이동시키는게 최종 목적이고 현재 포그라운드에서 알림 팝업이 안되는 이슈를 해결하고 싶습니다..계속 찾아봐도 답을 못 찾겠어서 질문 남깁니다! // AndroidManifest.xml <meta-data android:name="com.dieam.reactnativepushnotification.notification_foreground" android:value="true"/> <!-- Change the resource name to your App's accent color - or any other color you want --> <meta-data android:name="com.dieam.reactnativepushnotification.notification_color" android:resource="@color/white"/> <!-- or @android:color/{name} to use a standard color --> <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationActions" /> <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationPublisher" /> <receiver android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationBootEventReceiver" android:exported="true"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.intent.action.QUICKBOOT_POWERON" /> <action android:name="com.htc.intent.action.QUICKBOOT_POWERON"/> </intent-filter> </receiver> <service android:name="com.dieam.reactnativepushnotification.modules.RNPushNotificationListenerService" android:exported="false" > <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service> // App.tsx PushNotification.configure({ onNotification: function (notification: any) { PushNotification.localNotification({ message: notification.message, title: notification.title, channelId: 'channel_general', }) } }) PushNotification.createChannel( { channelId: 'channel_general', channelName: '앱', }, (created: boolean) => console.log(`createChannel returned '${created}'`), );
안녕하세요 FCM 강의를 막 시작하여 build.gradle(app) 파일에 messaging 관련 dependency까지 추가 한 후, 여러번 메시지 날리기를 시도하였으나 에뮬레이터 및 실제 기기에 설치한 빌드에서도 전혀 응답이 없네요~ 아직 앱 내 메세지 전송 강의를 시작하기 전인데 해당 문제부터 해결해야 될 것 같아 질문 남깁니다.
안녕하세요! 강의를 다 듣고, 푸시 알림도 구현하고 싶어서 구글링하면서 구현하고 있는데 막히는 부분이 있어 질문 드립니다. 테스트 메세징으로는 푸시 알림이 잘 오는데, firebase functions에 deploy 한 코드를 작동? 트리거 시켰을 때는 로그에만 뜨고, 애뮬레이터에는 푸시 알림이 안오는데 어디에 문제가 있는지 잘 모르겟습니다 ㅠㅠ - firebase functions log 캡쳐 화면 - index.js 코드
푸시 라이브러리 관련해서 ServerKey 발급 받는 곳이 변경 되었습니다. 기존 구글 개발자 콘솔 -> Creditional -> API 키 발급에서 Firebase -> 프로젝트 설정 -> 클라우드 메세지 탭에 가면 서버키 란이 있습니다. 해당 키를 사용하시면 됩니다. 관련 자료 : https://stackoverflow.com/questions/39678088/gcm-401-unauthorized-where-to-get-the-right-server-key