简体   繁体   中英

Worklight: Received push notification not removed

I am working on an iOS and Android project, and using Worklight unified push notifications.

The push is now received, but I have the following behaviour:

  • in Android, every time I login, I receive an old push notification.
  • in iOS, After I open a push, it is not removed from the iOS notification bar. the badge also still there.

I have a doubt that this is related to onPoll option, in the event source, but when I add the following to my eventSource declaration:

 poll : { 
     interval : 3, 
     onPoll : gotNotificationFromBackEnd,
 },

I receive this error upon deployment:

Failed to deploy adapter from the database (archive:  '/var/folders/8p/qylwgy6j2wq4bktw4r5hxqvr0000gp/T/myAdapter5583128211713256219.adapter').

Any help, explanation?

  1. In order to control the Badge number that is displayed on top of the application icon in the Home screen, you can use the WL.Badge.setNumber API .

  2. For the adapter to properly deploy, put the function name in quotes.

  3. As for the not-disappearing notification entry in the Notification Center despite reading it, I view this as a defect and have opened a defect report. Thanks.

Edit: As of Worklight 5.0.6.1, the defect above (3) is fixed.


Note #1: I could reproduce (3) above only in iOS; In Android it works correctly.

Note #2: The sample application is missing the securityTest for the iPhone environment in application-descriptor.xml; for the login screen to appear upon application launch in iOS as well (as done in Android), correct this as I have suggested.

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