No description, website, or topics provided.
Java
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
jars
samples/CallrSampleApp
src/main/java/com/callr
.gitignore
LICENSE
README.md

README.md

sdk-android

SDK in Java (Android) for CALLR API

Dependencies

The CALLR API is in JSON which needs to be parsed. This SDK is based on google-gson to parse json, and apache commons codec to encode base64. So it need to be added as well as our SDK in you project (see jars folder).

See https://code.google.com/p/google-gson/ for more information on google-gson. and https://commons.apache.org/proper/commons-codec/ for the apache commons codec.

The jars folder contains the jar of the CALLR Java SDK.

Basic Example (Send SMS)

See full example in samples - This can be imported into Android Studio as a gradle based project.

// Set your credentials
Api tc = new Api("login", "password");

Hashtable<String, Object> param = new Hashtable<String, Object>();
param.put("flash_message", false);

try {
	JsonElement result = tc.call("sms.send", "SMS", "+33123456789", "Hello, world", param);
	System.out.println(result.getAsString());
} catch (ThecallrException e) {
	System.out.println(e.getMessage());
	System.out.println(e.data);
}