Package com.battlelancer.seriesguide.api
Class Action
- java.lang.Object
-
- com.battlelancer.seriesguide.api.Action
-
public class Action extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Action.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Action
fromBundle(Bundle bundle)
static Action
fromJson(JSONObject jsonObject)
Deserializes aJSONObject
into anAction
object.int
getEntityIdentifier()
Returns an identifier unique within the entity type.String
getTitle()
Returns the user-visible title for this action.Intent
getViewIntent()
Returns the activityIntent
that will be started when the user clicks on the button for this action.Bundle
toBundle()
JSONObject
toJson()
Serializes thisAction
object to aJSONObject
representation.
-
-
-
Method Detail
-
getTitle
public String getTitle()
Returns the user-visible title for this action.
-
getViewIntent
public Intent getViewIntent()
Returns the activityIntent
that will be started when the user clicks on the button for this action.
-
getEntityIdentifier
public int getEntityIdentifier()
Returns an identifier unique within the entity type. E.g. for episodes the TVDb id. Extensions may use it to determine if there was an action already built for this entity and consequently just re-send it.SeriesGuide will use the identifier to match a published action to its request, e.g. which episode the action belongs to.
-
toBundle
public Bundle toBundle()
-
toJson
public JSONObject toJson() throws JSONException
Serializes thisAction
object to aJSONObject
representation.- Throws:
JSONException
-
fromJson
public static Action fromJson(JSONObject jsonObject) throws JSONException
Deserializes aJSONObject
into anAction
object.- Throws:
JSONException
-
-