Skip to content

Add content-available to PushNotificationPayload #234

@GoogleCodeExporter

Description

@GoogleCodeExporter
Hi,

Our company has been using your library for several years already (thanks for 
that), but now we admitted that it lacks functionality of simply adding 
content-available option to apsDictionary inside PushNotificationPayload (to be 
able to send silent push notifications). 

This seems to be the method I need: 
public void addContentAvailable(int contantAvailable) throws JSONException {
    logger.debug("Adding ContentAvailable [" + contantAvailable + "]");
    this.apsDictionary.put("content-available", new Integer(1));
}
(taken from https://code.google.com/p/javapns/issues/detail?id=75 )

I saw you added this functionality specially for Newsstand, but what about 
other apps?

And yes, I found other similar issues:
https://code.google.com/p/javapns/issues/detail?id=199
https://code.google.com/p/javapns/issues/detail?id=206
...but Push.contentAvailable(...) isn't the proper option: it sends ONLY 
content-available property, while I need to send ALSO content-available 
property, along with alert, badge and sound. Besides that, this method sends 
notifications immediately, and I need to do some actions 

Hope for your understanding.

Regards, 
Sergey

Original issue reported on code.google.com by [email protected] on 11 Mar 2015 at 3:46

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions