简体   繁体   中英

Regarding Push Notification In Worklight?

  1. Push Notification had been executed and worked perfectly in my application. (I made use of worklight push notification module IBM LINK )
  2. There was a scenario which i experienced during the notification received in the application android device.
  3. The push notification is received perfectly in all the situtaion except when i am in the Login Screen(When i am in the login screen of the application the push notification is not received in my application).

Question :

  1. Why push notification is not received in the application ?
  2. What is the client side (Device side) architecture/execution flow , by which i can understand when is the PushNotification Receiver (Broad Cast Receiver) in device is ready to receive the notification and when it can't receive notifications ?

This is the expected behavior.

You've implemented event source-based pus notifications. In this type of push notifications you must first login in order to receive notification. This is why while you're at the login screen, you will not receive the notification.

If you are using either Worklight 6.2 or MobileFirst Platform 6.3, you can use tag or broadcast-based notifications which do not require a login.

You can read more about these at the IBM MobileFirst Platform developer center.

Here is a rundown of possible scenarios:

  1. Application is closed - notification arrives to device - by opening the application / tapping the notification in the notification bar, you will get a login screen. After you login you will actually see the payload (in the way you choose to, that's purely applicative). You will not see the actual payload, because you don't want user B for example to see the payload of user A.

  2. Application is opened - you are logged in, but the app is in the background - notification arrives to the device - by tapping the notification or bringing the application to the foreground, because you are already logged in, you'll see the payload

  3. Application is opened - you are NOT logged in - notification arrives to the device - you will not be able to see the payload, because you are not logged in.

  4. Application is opened - you are logged in, and the app is in the foreground - notification arrives to the device - you will immediately see the payload (per your applicative code)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM