java.lang.Object | |
↳ | com.urbanairship.UAirship |
UAirship manages the shared state for all Urban Airship
services. UAirship.takeOff() should be called to initialize
the class on Application.onCreate()
.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | UAirship.OnReadyCallback | Callback interface used to notify app when UAirship is ready. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | AMAZON_PLATFORM | Amazon platform type. | |||||||||
int | ANDROID_PLATFORM | Android platform type. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ActionRegistry |
getActionRegistry()
The default Action Registry.
| ||||||||||
AirshipConfigOptions |
getAirshipConfigOptions()
Returns the current configuration options.
| ||||||||||
Analytics |
getAnalytics()
Returns the UAirship
Analytics instance. | ||||||||||
static int |
getAppIcon()
Returns the drawable ID for the current Application's icon.
| ||||||||||
static ApplicationInfo |
getAppInfo()
Returns the current Application's ApplicationInfo.
| ||||||||||
static String |
getAppName()
Returns the current Application's name.
| ||||||||||
static Context |
getApplicationContext()
Returns the current Application's context.
| ||||||||||
ApplicationMetrics |
getApplicationMetrics()
Returns the
ApplicationMetrics instance. | ||||||||||
InAppMessageManager |
getInAppMessageManager()
Returns the
InAppMessageManager instance. | ||||||||||
UALocationManager |
getLocationManager()
Returns the
UALocationManager instance. | ||||||||||
static PackageInfo |
getPackageInfo()
Returns the Application's
PackageInfo | ||||||||||
static PackageManager |
getPackageManager()
Returns the Application's package manager.
| ||||||||||
static String |
getPackageName()
Returns the Application's package name.
| ||||||||||
int |
getPlatformType()
Returns the platform type.
| ||||||||||
PushManager |
getPushManager()
Returns the
PushManager instance. | ||||||||||
RichPushManager |
getRichPushManager()
Returns the
RichPushManager instance. | ||||||||||
static String |
getUrbanAirshipPermission()
Returns the permission for sending Urban Airship push and registration broadcasts.
| ||||||||||
static String |
getVersion()
Returns the current Urban Airship version.
| ||||||||||
Whitelist |
getWhitelist()
The URL whiteList used to determine when to inject the Urban Airship Javascript Interface.
| ||||||||||
static boolean |
isFlying()
Tests if UAirship has been initialized and is ready for use.
| ||||||||||
static boolean |
isTakingOff()
Tests if UAirship is currently taking off.
| ||||||||||
static UAirship |
shared()
Returns the shared UAirship singleton instance.
| ||||||||||
static Cancelable |
shared(UAirship.OnReadyCallback callback)
Requests the airship instance asynchronously.
| ||||||||||
static Cancelable |
shared(UAirship.OnReadyCallback callback, Looper looper)
Requests the airship instance asynchronously.
| ||||||||||
static void |
takeOff(Application application)
Take off with options defined in airshipconfig.properties
| ||||||||||
static void |
takeOff(Application application, AirshipConfigOptions options, UAirship.OnReadyCallback readyCallback)
Take off with a callback to perform airship configuration after takeoff.
| ||||||||||
static void |
takeOff(Application application, AirshipConfigOptions options)
Take off with defined AirshipConfigOptions.
| ||||||||||
static void |
takeOff(Application application, UAirship.OnReadyCallback readyCallback)
Take off with airshipconfig.properties and a callback to perform airship configuration after
takeoff.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Amazon platform type. Only ADM transport will be allowed.
Android platform type. Only GCM transport will be allowed.
Returns the current configuration options.
Returns the drawable ID for the current Application's icon.
IllegalStateException | if takeOff has not been called. |
---|
Returns the current Application's ApplicationInfo. Wraps
PackageManager's getApplicationInfo()
method.
IllegalStateException | if takeOff has not been called. |
---|
Returns the current Application's name. Wraps
PackageManager's getApplicationLabel()
method.
IllegalStateException | if takeOff has not been called. |
---|
Returns the current Application's context.
IllegalStateException | if takeOff has not been called. |
---|
Returns the ApplicationMetrics
instance.
ApplicationMetrics
instance.
Returns the InAppMessageManager
instance.
InAppMessageManager
instance.
Returns the UALocationManager
instance.
UALocationManager
instance.
Returns the Application's PackageInfo
IllegalStateException | if takeOff has not been called. |
---|
Returns the Application's package manager.
IllegalStateException | if takeOff has not been called. |
---|
Returns the Application's package name.
IllegalStateException | if takeOff has not been called. |
---|
Returns the platform type. The platform type is determined only once by the first statement that applies:
AMAZON_PLATFORM
for Amazon or ANDROID_PLATFORM
for Android.
Returns the PushManager
instance.
PushManager
instance.
Returns the RichPushManager
instance.
RichPushManager
instance.
Returns the permission for sending Urban Airship push and registration broadcasts.
IllegalStateException | if takeOff has not been called. |
---|
Returns the current Urban Airship version.
The URL whiteList used to determine when to inject the Urban Airship Javascript Interface.
Tests if UAirship has been initialized and is ready for use.
true
if UAirship is ready for use; false
otherwise
Tests if UAirship is currently taking off.
true
if UAirship is taking off; false
otherwise
Returns the shared UAirship singleton instance. This method will block until airship is ready.
IllegalStateException | if takeoff is not called prior to this method. |
---|
Requests the airship instance asynchronously.
This method calls through toshared(com.urbanairship.UAirship.OnReadyCallback, android.os.Looper)
with a null looper.callback | An optional callback |
---|
Requests the airship instance asynchronously.
If airship is ready, the callback will not be called immediately, the callback is still dispatched to the specified looper. The blocking shared may unblock before any of the asynchronous callbacks are executed.callback | An optional callback |
---|---|
looper | A Looper object whose message queue will be used for the callback, or null to make callbacks on the calling thread or main thread if the current thread does not have a looper associated with it. |
Take off with options defined in airshipconfig.properties
application | The application (required) |
---|
Take off with a callback to perform airship configuration after takeoff. The ready callback will be executed before the UAirship instance is returned by any of the shared methods.
application | The application (required) |
---|---|
options | The launch options. If not null, the options passed in here
will override the options loaded from the .properties file. This parameter
is useful for specifying options at runtime. |
readyCallback | Optional ready callback. The callback will be triggered on a background thread
that performs takeOff .
|
Take off with defined AirshipConfigOptions.
application | The application (required) |
---|---|
options | The launch options. If not null, the options passed in here
will override the options loaded from the .properties file. This parameter
is useful for specifying options at runtime.
|
Take off with airshipconfig.properties and a callback to perform airship configuration after takeoff. The ready callback will be executed before the UAirship instance is returned by any of the shared methods.
application | The application (required) |
---|---|
readyCallback | Optional ready callback. The callback will be triggered on a background thread
that performs takeOff .
|