REPEAT: Push Notifications question


#1

Can someone who knows the answer please respond to my question?

To ask the question again with different wording: I can successfully send push notifications to iOS and Android devices. In both cases, if the application is not running, notifications are delivered to the notification centre (iOS) or notification tray (Android). If I now open the application by tapping the application icon, any previously delivered notifications are NOT forwarded to the application. This is contrary to what the documentation says and contrary to a comment by @Uldris in another thread on this topic.

So, is it the expected behaviour that previously delivered notifications will be forwarded to the application (and I’m doing something wrong) or is the documentation incorrect?

Regards,
ac


#2

This is working for me but I’m using the latest version of Fuse: https://github.com/fuse-open/fuselibs


#3

@aeq Many thanks for your reply. I ran into problems getting Fuse Studio 1.9 working with some the underlying project libraries (qr reader, popups) but fuse-open is different, I guess.

As it works for you, it is worth me putting the effort in to get to the latest version.

Regards,
ac


#4

@aeq - I’ve upgraded to Fuse Studio 1.9. I have not compiled local libraries - installing 1.9 also installs the libraries which I assume are the latest.

The behaviour did not change so I wiped the entire machine of every trace of fuse and installed from scratch just to be sure…

The behaviour is still the same - notifications are not forwarded to the application unless 1) the application is running or 2) you tap the notification popup which then opens up the application.

In the case that I am describing, I do not get notifications forwarded to the application. Can someone on the fuse team tell me if this is expected behaviour or not. Here again is the scenario (this is for iOS but the same applies to Android):

  1. Application is not running
  2. A notification is sent
  3. A notification popup shows on the device
  4. The user does nothing; notification popup goes away
  5. Later, the user taps the application icon to open up the application
  6. The previously received notification is NOT delivered to the application
  7. The previously received notification IS removed from the notification centre

@aeq - let me ask again about your set up - in the above scenario, at step 5, does your application get the previously received notification(s) delivered to the application?


#5

@acoad oh I see what you mean, no, at step 5 the notification and its payload is sitting in the users notification tray. Only if they then tap the notification, then the payload is received by the app as soon as it opens or if it was previously open.

What I do is once my user opens the app, I do a check for notifications and update the amount in my internal notifications icon and if they check the internal notifications list, I clear all notifications in the tray as well as the app icon badge.


#6

@aeq - Many thanks for your response.

One last question: “What I do is once my user opens the app, I do a check for notifications and update the amount…” Do you dip into native code to do this or is there a way to do it in fuse?


#7

@acoad No native, just an api call to my server-side, like this:

https://fuse-open.github.io/examples/http-json/index.html


#8

@aeq - that won’t work. I need the messages already in the Notification centre and, once pulled into the app, I need to delete them from Notification centre.


#9

what’s a notification centre? The list of notifications? Just prefetch it then


#10

Maybe its better if you show us a design and interaction flow


#11

https://en.wikipedia.org/wiki/Notification_Center

(also explained very briefly in the first post of this thread)


#12

Oh haha, just needed to confirm that we’re on the same page.

The user just needs to tap on the notification in the notification centre, which will then trigger the received event that you can listen for, then when you receive it, just call clearAllNotifications(): https://fuse-open.github.io/docs/fuse/pushnotifications/push.html


#13

@aeq - not quite. The workflow is this:

  • Application is not running
  • iOS device receives a push notification
  • iOS places a badge on the application icon
  • User sees the badge and taps the application icon to open the application expecting to see what it was that caused the badge
  • Alas, the push notification is not in the application so the user experience is broken

It looks pretty clear to me now that there is no way of pulling in already delivered push notifications through Fuse - I need to write some native code to do that. I know how to do that for iOS; for Android, I have no clue but I’m going to have to figure it out