C# 클래스 Sequencing.WeatherApp.Controllers.DaoLayer.DefaultPushNotificationService

Service which implements push notification logic
상속: IPushNotificationService
파일 보기 프로젝트 열기: SequencingDOTcom/Weather-My-Way-RTP-app 1 사용 예제들

공개 메소드들

메소드 설명
FetchUserDeviceTokens ( System.Int64 userId, DeviceType deviceType ) : List

Fetches user device tokens from database

IsTokenSubscribed ( string token ) : bool

Checks whether user devise is subscribed to get push notifications

IsUserSubscribed ( System.Int64 userId ) : bool

Checks whether user is subscribed to get push notifications

RefreshDeviceToken ( string oldId, string newId ) : void

Refreshes expired device token in DB

Send ( System.Int64 userId, DeviceType deviceType, string token, string message, ApplicationType appType ) : void

Sends push message to subscribed user device

Send ( System.Int64 userId, string message ) : void

Sends push message to all user devices

Subscribe ( string deviceToken, DeviceType deviceType, string accessToken, ApplicationType appType ) : void

Subscribe user to get push message

SubscribeDeviceToken ( string token, DeviceType deviceType, long userId, ApplicationType appType ) : void

Adds device token to database

Unsubscribe ( string token, long userId ) : void

Unsubscribe user from push message

비공개 메소드들

메소드 설명
GetPushMessageSender ( DeviceType deviceType, ApplicationType appType ) : PushMessageSender

Determines device type

메소드 상세

FetchUserDeviceTokens() 공개 메소드

Fetches user device tokens from database
public FetchUserDeviceTokens ( System.Int64 userId, DeviceType deviceType ) : List
userId System.Int64
deviceType DeviceType
리턴 List

IsTokenSubscribed() 공개 메소드

Checks whether user devise is subscribed to get push notifications
public IsTokenSubscribed ( string token ) : bool
token string
리턴 bool

IsUserSubscribed() 공개 메소드

Checks whether user is subscribed to get push notifications
public IsUserSubscribed ( System.Int64 userId ) : bool
userId System.Int64
리턴 bool

RefreshDeviceToken() 공개 메소드

Refreshes expired device token in DB
public RefreshDeviceToken ( string oldId, string newId ) : void
oldId string
newId string
리턴 void

Send() 공개 메소드

Sends push message to subscribed user device
public Send ( System.Int64 userId, DeviceType deviceType, string token, string message, ApplicationType appType ) : void
userId System.Int64
deviceType DeviceType
token string
message string
appType ApplicationType
리턴 void

Send() 공개 메소드

Sends push message to all user devices
public Send ( System.Int64 userId, string message ) : void
userId System.Int64
message string
리턴 void

Subscribe() 공개 메소드

Subscribe user to get push message
public Subscribe ( string deviceToken, DeviceType deviceType, string accessToken, ApplicationType appType ) : void
deviceToken string
deviceType DeviceType
accessToken string
appType ApplicationType
리턴 void

SubscribeDeviceToken() 공개 메소드

Adds device token to database
public SubscribeDeviceToken ( string token, DeviceType deviceType, long userId, ApplicationType appType ) : void
token string
deviceType DeviceType
userId long
appType ApplicationType
리턴 void

Unsubscribe() 공개 메소드

Unsubscribe user from push message
public Unsubscribe ( string token, long userId ) : void
token string
userId long
리턴 void