Auto Respond API

Methods:
Permissions:
Broadcast Receiver Actions

API Versions

  • API 1: Supported in Auto Respond 2.2 and higher

Methods

public AutoRespondAPI(Context context) – Constructor

added in API 1
Creates an empty AutoRespondAPI Object.

public AutoRespondAPI(Context context, String apiKey) – Constructor

added in API 1
Creates an AutoRespondAPI Object and sets the API key to the value of “apiKey”. The API key will be encrypted before it is stored.

public static boolean autoRespondVersionSupportsAPI(Context context)

added in API 1
Returns true if Auto Respond is installed, and is at a version number that supports Auto Respond API.
Returns false if Auto Respond is not installed, or if the installed version of Auto Respond does not support the Auto Respond API.

public String getAppName()

added in API 1
Returns the name of the app that was registered with the API key associated with this AutoRespondAPI object.
Returns null if API key was never set.

public boolean isActive()

added in API 1
Returns true if the API key associated with this AutoRespondAPI object is active, otherwise returns false.The API key should always be active, unless it is deactivated for violating Terms of Use.

public boolean isValid()

added in API 1
Returns true if the API key associated with this AutoRespondAPI object is a valid API key.
Returns false if the API key associated with this AutoRespondAPI object has not been registered with Fifteen15 Studios.

public static void openPlayStoreLink(Context context)

added in API 1
Opens the Play Store to the Auto Respond page.

public void setApiKey(String apiKey)

added in API 1
Sets the API key of the AutoRespondAPI object. The API key will be encrypted before it is stored.

It is not necessary to call this method if you set the API key using the constructor.

public void setMessage(String message)

added in API 1
REQUIRES PERMISSION: com.fifteen15studios.autorespondapi.permission.CHANGE_MESSAGE

Sets Auto Respond message to be equal to the String value passed into this method.

public void toggleAutoRespond()

added in API 1
REQUIRES PERMISSION: com.fifteen15studios.autorespondapi.permission.TOGGLE

Toggles Auto Respond. If Auto Respond is currently on, it will be toggled off. If it is currently off, it will be toggled on.

public void toggleAutoRespond(boolean state)

added in API 1
REQUIRES PERMISSION: com.fifteen15studios.autorespondapi.permission.TOGGLE

Toggles Auto Respond to the state passed to this method.

If state=”true”, Auto Respond will be turned on. If Auto Respond is already on, no change will be made.
If state=”false”, Auto Respond will be turned off. If Auto Respond is already off, no change will be made.

Permissions

public static final String PERMISSION_CHANGE_MESSAGE

added in API 1
CONSTANT VALUE: com.fifteen15studios.autorespondapi.permission.CHANGE_MESSAGE

PROTECTION LEVEL: dangerous

Gives permission to change the Auto Respond message. This is a dangerous permissions, so you must request permission at run time.

public static final String PERMISSION_TOGGLE

added in API 1
CONSTANT VALUE: com.fifteen15studios.autorespondapi.permission.TOGGLE

PROTECTION LEVEL: dangerous

Gives permission to change the state of Auto Respond. This is a dangerous permissions, so you must request permission at run time.

Broadcast Receiver Actions

public static final String ACTION_AUTO_RESPOND_STATE_CHANGED

added in API 1
CONSTANT VALUE: com.fifteen15studios.autorespondapi.STATE_CHANGED

Used in a broadcast receiver to listen for Auto Respond toggle events.

public static final String ACTION_AUTO_RESPOND_MESSAGE_CHANGED

added in API 1
CONSTANT VALUE: com.fifteen15studios.autorespondapi.MESSAGE_CHANGED

Used in a broadcast receiver to listen for Auto Respond message changes.