skip to Main Content

Firebase – Convert milliseconds to Firestore date

In Flutter I convert dates to milliseconds like this: static DateTime createDateTimeNow() { return DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, 0, 0, 0, 0, 0); } // This create a number value like 1660341600000 final Number millisecondsNow = Helpers.createDateTimeNow().toUtc().millisecondsSinceEpoch; // I can also…

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