Provides methods for scheduling Arrow push notifications
The following APIs are only available for Appcelerator Platform customers. You must be an application admin to use these APIs.
The PushSchedules API lets you schedule push notifications to be delivered to your application users on a recurring or one-time basis.
You may create up to 100 scheduled push notifications for your application.
Datetime fields use the ISO 8601 format, for example, YYYY-MM-DDTHH:mm:ss+ZZZZ
.
For information on configuring and setting up push notifications, see the Push Notifications guide.
This example schedules a push notification to be sent only once within the five-day perid.
Cloud.PushSchedules.create({
schedule: {
name: 'push schedule',
start_time: '2015-09-05T10:11',
recurrence: {
interval: 'weekly',
end_time: '2015-09-10T10:11'
},
push_notification: {
payload: 'hello world',
channel: 'channelOne'
}
}
}, function(e) {
if (e.success) {
Ti.API.info('Success! \n id: ' + e.push_schedules[0].id);
} else {
Ti.API.error('Error: ' + ((e.error && e.message) || JSON.stringify(e)));
}
});
This example deletes the specified scheduled push notification.
Cloud.PushSchedules.remove({
ids: savedPushId
}, function(e){
if (e.success) {
Ti.API.info("Success!");
} else {
Ti.API.error('Error: ' + ((e.error && e.message) || JSON.stringify(e)));
}
});
This example retrieves all scheduled push notifications.
Cloud.PushSchedules.query({}, function(e) {
if (e.success) {
Ti.API.info("List of scheduled push notifications:");
e.push_schedules.forEach(function(push){
Ti.API.info("\t" + push.name);
});
} else {
Ti.API.error('Error: ' + ((e.error && e.message) || JSON.stringify(e)));
}
});
The name of the API that this proxy corresponds to.
The name of the API that this proxy corresponds to.
The value of this property is the fully qualified name of the API. For example, Button
returns Ti.UI.Button
.
Indicates if the proxy will bubble an event to its parent.
Some proxies (most commonly views) have a relationship to other proxies, often established by the add() method. For example, for a button added to a window, a click event on the button would bubble up to the window. Other common parents are table sections to their rows, table views to their sections, and scrollable views to their views. Set this property to false to disable the bubbling to the proxy's parent.
Default: true
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.
If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks will also be called on the proxy. Proxies that require the activity lifecycle will need this property set to the appropriate containing Window or TabGroup.
Applies the properties to the proxy.
Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that myproxy[key] = value.
A dictionary of properties to apply.
Schedules a push notification.
Requires user login and the current user must be an application admin.
See push_schedules/create.json for the request parameters supported by this method.
Parameters to send in the request.
Callback function to execute when the method completes.
Queries the list of scheduled push notifications.
Requires user login and the current user must be an application admin.
See push_schedules/qyery.json for the request parameter supported by this method.
Parameters to send in the request.
Callback function to execute when the method completes.
Deletes a scheduled push notification.
Requires user login and the current user must be an application admin.
See push_schedules/delete.json for the request parameters supported by this method.
Parameters to send in the request.
Callback function to execute when the method completes.
Sets the value of the bubbleParent property.
New value for the property.
Sets the value of the lifecycleContainer property.
New value for the property.