Modules.Cloud.PushSchedules
> Modules.Cloud.PushSchedules

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.

Examples

Create a scheduled push notification

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)));
    }
});

Remove a scheduled push notification

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)));
    }
});

Query scheduled push notifications

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)));
    }
});
  • 3.2.0
  • 3.2.0
  • 3.2.0
Defined By

Properties

apiName : Stringreadonly

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.

  • 3.2.0
  • 3.2.0
  • 3.2.0
Indicates if the proxy will bubble an event to its parent. ...

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

  • 3.0.0
  • 3.0.0
  • 3.0.0

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.

  • 3.6.0
Defined By

Methods

Applies the properties to the proxy. ...

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.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • props : Dictionary

    A dictionary of properties to apply.

Returns

  • void
Modules.Cloud.PushSchedules
( parameters, callback )
Schedules a push notification. ...

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

Returns

  • void
Gets the value of the apiName property. ...

Gets the value of the apiName property.

  • 3.2.0
  • 3.2.0
  • 3.2.0

Returns

  • String
Gets the value of the bubbleParent property. ...

Gets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Returns

  • Boolean
Gets the value of the lifecycleContainer property. ...

Gets the value of the lifecycleContainer property.

  • 3.6.0

Returns

Modules.Cloud.PushSchedules
( parameters, callback )
Queries the list of scheduled push notifications. ...

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

Returns

  • void
Modules.Cloud.PushSchedules
( parameters, callback )
Deletes a scheduled push notification. ...

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

Returns

  • void
Sets the value of the bubbleParent property. ...

Sets the value of the bubbleParent property.

  • 3.0.0
  • 3.0.0
  • 3.0.0

Parameters

  • bubbleParent : Boolean

    New value for the property.

Returns

  • void
Sets the value of the lifecycleContainer property. ...

Sets the value of the lifecycleContainer property.

  • 3.6.0

Parameters

Returns

  • void