public class Push extends Object
Modifier and Type | Field and Description |
---|---|
static String |
GOOGLE_PUSH_KEY
Key for the hashtable argument when pushing to the google play store
|
Constructor and Description |
---|
Push() |
Modifier and Type | Method and Description |
---|---|
static String |
getDeviceKey()
Returns the push device key if the device was previously successfully registered for push
otherwise returns null
|
static boolean |
sendPushMessage(String body,
String deviceKey,
boolean production,
String googleAuthKey,
String iosCertificateURL,
String iosCertificatePassword)
Sends a push message and returns true if server delivery succeeded, notice that the
push message isn't guaranteed to reach all devices.
|
static boolean |
sendPushMessage(String body,
String deviceKey,
boolean production,
String googleAuthKey,
String iosCertificateURL,
String iosCertificatePassword,
String bbUrl,
String bbApp,
String bbPass,
String bbPort)
Sends a push message and returns true if server delivery succeeded, notice that the
push message isn't guaranteed to reach all devices.
|
static void |
sendPushMessageAsync(String body,
String deviceKey,
boolean production,
String googleAuthKey,
String iosCertificateURL,
String iosCertificatePassword)
Sends a push message and returns true if server delivery succeeded, notice that the
push message isn't guaranteed to reach all devices.
|
static void |
sendPushMessageAsync(String body,
String deviceKey,
boolean production,
String googleAuthKey,
String iosCertificateURL,
String iosCertificatePassword,
String bbUrl,
String bbApp,
String bbPass,
String bbPort)
Sends a push message and returns true if server delivery succeeded, notice that the
push message isn't guaranteed to reach all devices.
|
public static final String GOOGLE_PUSH_KEY
public static boolean sendPushMessage(String body, String deviceKey, boolean production, String googleAuthKey, String iosCertificateURL, String iosCertificatePassword)
body
- the body of the messagedeviceKey
- an optional parameter (can be null) when sending to a specific deviceproduction
- whether pushing to production or test/sandbox environmentgoogleAuthKey
- authorization key from the google play storeiosCertificateURL
- a URL where you host the iOS certificate for this applications push capabilities.iosCertificatePassword
- the password for the push certificatepublic static boolean sendPushMessage(String body, String deviceKey, boolean production, String googleAuthKey, String iosCertificateURL, String iosCertificatePassword, String bbUrl, String bbApp, String bbPass, String bbPort)
body
- the body of the messagedeviceKey
- an optional parameter (can be null) when sending to a specific deviceproduction
- whether pushing to production or test/sandbox environmentgoogleAuthKey
- authorization key from the google play storeiosCertificateURL
- a URL where you host the iOS certificate for this applications push capabilities.iosCertificatePassword
- the password for the push certificatebbUrl
- the URL to which the push should be submitted when sending a blackberry push for evaluation use https://pushapi.eval.blackberry.com
for production you will need to apply at https://cp310.pushapi.na.blackberry.combbApp
- the application id to authenticate on push for RIM devicesbbPass
- the application password credentials authenticate on push for RIM devicesbbPort
- the port of the blackberry pushpublic static void sendPushMessageAsync(String body, String deviceKey, boolean production, String googleAuthKey, String iosCertificateURL, String iosCertificatePassword)
body
- the body of the messagedeviceKey
- an optional parameter (can be null) when sending to a specific deviceproduction
- whether pushing to production or test/sandbox environmentgoogleAuthKey
- authorization key from the google play storeiosCertificateURL
- a URL where you host the iOS certificate for this applications push capabilities.iosCertificatePassword
- the password for the push certificatepublic static void sendPushMessageAsync(String body, String deviceKey, boolean production, String googleAuthKey, String iosCertificateURL, String iosCertificatePassword, String bbUrl, String bbApp, String bbPass, String bbPort)
body
- the body of the messagedeviceKey
- an optional parameter (can be null) when sending to a specific deviceproduction
- whether pushing to production or test/sandbox environmentgoogleAuthKey
- authorization key from the google play storeiosCertificateURL
- a URL where you host the iOS certificate for this applications push capabilities.iosCertificatePassword
- the password for the push certificatebbUrl
- the URL to which the push should be submitted when sending a blackberry push for evaluation use https://pushapi.eval.blackberry.com
for production you will need to apply at https://cp310.pushapi.na.blackberry.combbApp
- the application id to authenticate on push for RIM devicesbbPass
- the application password credentials authenticate on push for RIM devicesbbPort
- the port of the blackberry pushpublic static String getDeviceKey()