Class iOSCallbackScheduler
Inheritance
System.Object
iOSCallbackScheduler
Assembly: SensusiOS.dll
Syntax
public abstract class iOSCallbackScheduler : CallbackScheduler
Constructors
iOSCallbackScheduler()
Declaration
protected iOSCallbackScheduler()
Fields
CALLBACK_NOTIFICATION_HORIZON_THRESHOLD
The callback notification horizon threshold. When using notifications to schedule the timing of
callbacks, we must decide when the delay of a callback execution necessitates a notification
rather than executing immediately. This is in part a practical question, in that executing a
callback immediately rather than using a notification can improve performance -- imagine the
app coming to the foreground and executing the callback right away versus deferring it to a
future notification. This is also an iOS API consideration, as the iOS system will not schedule
a notification if its fire date is in the past by the time it gets around to doing the scheduling.
Whatever the value, it needs to be less than the
DefaultPollingSleepDurationMS value.
Declaration
public static readonly TimeSpan CALLBACK_NOTIFICATION_HORIZON_THRESHOLD
Field Value
Type |
Description |
System.TimeSpan |
|
Properties
CallbackIds
Declaration
public abstract List<string> CallbackIds { get; }
Property Value
Type |
Description |
System.Collections.Generic.List<System.String> |
|
Methods
CancelSilentNotifications()
Cancels the silent notifications (e.g., those for health test) when the app is going into the background.
Declaration
public abstract void CancelSilentNotifications()
GetCallbackInfo(ScheduledCallback)
Declaration
public NSMutableDictionary GetCallbackInfo(ScheduledCallback callback)
Parameters
Returns
Type |
Description |
Foundation.NSMutableDictionary |
|
IsCallback(NSDictionary)
Declaration
public bool IsCallback(NSDictionary callbackInfo)
Parameters
Type |
Name |
Description |
Foundation.NSDictionary |
callbackInfo |
|
Returns
Type |
Description |
System.Boolean |
|
RaiseCallbackAsync(NSDictionary)
Declaration
public Task RaiseCallbackAsync(NSDictionary callbackInfo)
Parameters
Type |
Name |
Description |
Foundation.NSDictionary |
callbackInfo |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
RaiseCallbackAsync(ScheduledCallback, String)
Declaration
public override Task RaiseCallbackAsync(ScheduledCallback callback, string invocationId)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
ReissueSilentNotificationAsync(String)
Declaration
protected abstract Task ReissueSilentNotificationAsync(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
TryGetCallback(NSDictionary)
Declaration
public ScheduledCallback TryGetCallback(NSDictionary callbackInfo)
Parameters
Type |
Name |
Description |
Foundation.NSDictionary |
callbackInfo |
|
Returns
UpdateCallbacksOnActivationAsync()
Updates the callbacks when the app is activated. This services any callbacks that should have already been
serviced or will be serviced in the near future. This also reissues all silent notifications, which would
have been canceled when the app went into the background.
Declaration
public Task UpdateCallbacksOnActivationAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
Async task.
|