HERE Android SDK Developer's Guide

Alert

The class Alert is a member of com.here.android.mpa.urbanmobility .

Class Summary

public final class Alert

extends java.lang.Object

Represents an alert/disruption information about particular Transport and Operator.

[For complete information, see the section Class Details]

Method Summary

Table 1. Methods in Alert
Methods

public boolean equals (Object o)

public Branding getBranding ()

Gets alert source branding info.

public String getId ()

Get unique Id for this alert.

public String getInfo ()

Get alert information text to display to the user.

public Provider getProvider ()

Get Provider of the alert data.

public Link getSource ()

Get a Link to the original source of this alert (Twitter feed, Agency API, RSS etc.).

public java.util.Collection <Transport> getTransports ()

Get Collection of Transport objects affected by this alert.

public Date getValidFrom ()

Get the Date from which this alert is valid.

public Date getValidTill ()

Get the Date till which this alert is valid.

public int hashCode ()

Class Details

Represents an alert/disruption information about particular Transport and Operator.

IMPORTANT: Urban Mobility is a Beta feature. The related classes are subject to change without notice.

Method Details

public boolean equals (Object o)

Parameters:

  • o

public Branding getBranding ()

Gets alert source branding info. Some alert sources (like Twitter) have branding requirement and clients must comply to these and show to the user.

Returns:

source Branding info, or null if not available.

public String getId ()

Get unique Id for this alert. Might help to identify if this alert was already processed on the client.

Returns:

alert id

public String getInfo ()

Get alert information text to display to the user. Information text is localized according to Locale.getDefault(). If given language is not supported English version is returned.

Returns:

alert information text

public Provider getProvider ()

Get Provider of the alert data.

Returns:

alert data provider

public Link getSource ()

Get a Link to the original source of this alert (Twitter feed, Agency API, RSS etc.).

Returns:

Link to the alert's source, or null if not available

public java.util.Collection <Transport> getTransports ()

Get Collection of Transport objects affected by this alert.

Returns:

collection of transports

public Date getValidFrom ()

Get the Date from which this alert is valid.

Returns:

valid from date, or null if not available

public Date getValidTill ()

Get the Date till which this alert is valid.

Returns:

valid till date, or null if not available

public int hashCode ()