Skip to content

Latest commit

 

History

History
187 lines (135 loc) · 6.01 KB

PushNotificationsAndroid.md

File metadata and controls

187 lines (135 loc) · 6.01 KB

class PushNotificationsAndroid

Provides specific features for Android platform.

Base class methods

public string PushToken
public string HWID
public void RegisterForPushNotifications()
public void UnregisterForPushNotifications()
public void SetIntTag(string tagName, int tagValue)
public void SetStringTag(string tagName, string tagValue)
public void SetListTag(string tagName, List tagValues)
public void StartTrackingGeoPushes()
public void StopTrackingGeoPushes()
public void ClearNotificationCenter()
public void SetBadgeNumber(int number)
public void AddBadgeNumber(int deltaBadge)
public void SetBadgeNumber(int number)
public void SetUserId(string userId)
public void PostEvent(string eventId, IDictionary<string, object> attributes)
public void SendPurchase(string productId, double price, string currency)

Methods

public String[] GetPushHistory()
public void ClearPushHistory()
public void StartTrackingBeaconPushes()
public void StopTrackingBeaconPushes()
public void ClearLocalNotifications()
public int ScheduleLocalNotification(string message, int seconds)
public void ClearLocalNotification(int id)
public void SetMultiNotificationMode()
public void SetSimpleNotificationMode()
public void SetSoundNotificationType(int soundNotificationType)
public void SetVibrateNotificationType(int vibrateNotificationType)
public void SetLightScreenOnNotification(bool lightsOn)
public void SetEnableLED(bool ledOn)
public string GetLaunchNotification()
public void ClearLaunchNotification()

GetPushHistory

Gets push history for the device (since the last clearPushHistory call).

public String[] GetPushHistory()

ClearPushHistory

Clears push history for the device.

public void ClearPushHistory()

StartTrackingBeaconPushes

Starts tracking iBeacon Push notifications

public void StartTrackingBeaconPushes()

StopTrackingBeaconPushes

Stops tracking iBeacon Push notifications

public void StopTrackingBeaconPushes()

ClearLocalNotifications

Clears all scheduled local notifications.

public void ClearLocalNotifications()

ScheduleLocalNotification

Schedules local notification.

public int ScheduleLocalNotification(string message, int seconds)
public int ScheduleLocalNotification(string message, int seconds, string userdata)
  • message - notification title
  • seconds - timeout in seconds to display the message
  • userdata - optional

ClearLocalNotification

Clears specific local notification

public void ClearLocalNotification(int id)
  • id - notification id returned from scheduleLocalNotification function

SetMultiNotificationMode

Allows multiple notifications in the tray.

public void SetMultiNotificationMode()

SetSimpleNotificationMode

Allows single notifications in the tray.

public void SetSimpleNotificationMode()

SetSoundNotificationType

Sets default sound notification type. Could be overriden from Pushwoosh Control Panel.

  • 0 - default mode
  • 1 - no sound
  • 2 - always
public void SetSoundNotificationType(int soundNotificationType)

SetVibrateNotificationType

Sets default vibration notification type. Could be overriden from Pushwoosh Control Panel.

  • 0 - default mode
  • 1 - no vibration
  • 2 - always
public void SetVibrateNotificationType(int vibrateNotificationType)

SetLightScreenOnNotification

Should the screen lit up itself when push notification arrives. Could be overriden from Pushwoosh Control Panel.

public void SetLightScreenOnNotification(bool lightsOn)

SetEnableLED

Enables LED blinking. Could be overriden from Pushwoosh Control Panel.

public void SetEnableLED(bool ledOn)

GetLaunchNotification

Returns launch notification if the app was started in response to push notification or null otherwise.

public string GetLaunchNotification()

ClearLaunchNotification

Resets launch notifiation, GetLaunchNotification() will return null after this call.

public void ClearLaunchNotification()