skip to Main Content

Firebase – How to handle screen navigation in Flutter when clicking on a Push Notification?

I have made this file push_notifications.dart import 'dart:io'; import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:flutter/material.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; const AndroidNotificationChannel androidSettings = AndroidNotificationChannel( 'high_importance_channel', // id 'High Importance Notifications', // title// description importance: Importance.high, playSound: true); var iOSSettings = const IOSInitializationSettings( defaultPresentAlert:…

VIEW QUESTION

React Native : Navigate to a screen "nested inside BottomTabNavigator" from firebase push notificaiton click

This is a part of my BottomNavigator code in App.js. const Bottom = createBottomTabNavigator(); return ( <Bottom.Navigator tabBarOptions={...}> <Bottom.Screen name="ScreenA" component={ScreenA} options={...} /> <Bottom.Screen name="ScreenB" component={ScreenB} options={...} /> <Bottom.Screen name="ScreenC" component={ScreenC} options={...} /> <Bottom.Screen name="Chat" component={Chat} options={({navigation}) => ({ tabBarLabel:…

VIEW QUESTION

Firebase – FCM Push Notifications are only displayed when app is in background

I am using the following code to receive and display push notifications: override fun onMessageReceived(remoteMessage: RemoteMessage) { if (remoteMessage.getNotification() != null) { var title : String = remoteMessage.notification!!.title!! var message : String = remoteMessage.notification!!.body!! val intent = Intent(this, LoginCommonActivity::class.java) intent.addflags(intent.FLAG_ACTIVITY_CLEAR_TOP)…

VIEW QUESTION
Back To Top
Search