public class

UrbanAirshipPush

extends AbstractPush
java.lang.Object
   ↳ com.kinvey.android.push.AbstractPush
     ↳ com.kinvey.android.push.UrbanAirshipPush

Class Overview

Implementation of AbstractPush for Urban Airship.

This functionality can be accessed through the push() convenience method.

This API is used to enable push for a specific device, and to launch push when starting your Android application. The initialize method of this class *must* be called in the onCreate method of your Android Application class. Push becomes enabled when linking the user via the registerPush() method.

Sample Usage:

    PushOptions options = kinveyClient.push().getPushOptions(pushAppKey, pushAppSecret, true);
    kinveyClient.push().initialize(options, new KinveyClientCallback( {
        public void onFailure(Throwable t) { ... }
        public void onSuccess(Void v) { ... }
    });
 

Summary

[Expand]
Inherited Constants
From class com.kinvey.android.push.AbstractPush
[Expand]
Inherited Fields
From class com.kinvey.android.push.AbstractPush
Public Constructors
UrbanAirshipPush(Client client)
Public Methods
<T> void disablePush(KinveyClientCallback<T> callback)
Asynchronous wrapper to disable push for the application
void disablePush()
Disables push for the application
String getPushId()
UrbanAirshipPushOptions getPushOptions(String pushAppKey, String pushAppSecret, boolean inProduction)
<T> void initialize(PushOptions options, Application currentApp, KinveyClientCallback<T> callback)
Asynchronous wrapper to initialize push for a specific application.
UrbanAirshipPush initialize(PushOptions options, Application currentApp)
Method to initialize push for a specific application.
boolean isPushEnabled()
[Expand]
Inherited Methods
From class com.kinvey.android.push.AbstractPush
From class java.lang.Object

Public Constructors

public UrbanAirshipPush (Client client)

Public Methods

public void disablePush (KinveyClientCallback<T> callback)

Asynchronous wrapper to disable push for the application

Parameters
callback KinveyClientCallback

public void disablePush ()

Disables push for the application

public String getPushId ()

public UrbanAirshipPushOptions getPushOptions (String pushAppKey, String pushAppSecret, boolean inProduction)

public void initialize (PushOptions options, Application currentApp, KinveyClientCallback<T> callback)

Asynchronous wrapper to initialize push for a specific application.

This method creates an asynchronous request to initialize push for the first time, and to enable push on each application start. This method *must* be called in the Application instance's onCreate method. The method accepts an object of PushOptions which contain the PushAppKey and PushAppSecret obtained from the Kinvey Developer Console.

Sample Usage:

        PushOptions options = kinveyClient.push().getPushOptions(pushAppKey, pushAppSecret, true);
        kinveyClient.push().initialize(options, new KinveyClientCallback( {
            public void onFailure(Throwable t) { ... }
            public void onSuccess(Void v) { ... }
        });
 

Parameters
options Object of type PushOptions
currentApp Instance of the current Application

public UrbanAirshipPush initialize (PushOptions options, Application currentApp)

Method to initialize push for a specific application.

This method is used to initialize push for the first time, and to enable push on each application start. This method *must* be called in the Application instance's onCreate method. The method accepts an object of PushOptions which contain the PushAppKey and PushAppSecret obtained from the Kinvey Developer Console.

Parameters
options Object of type PushOptions
currentApp Instance of the current Application

public boolean isPushEnabled ()