Skip to content

THECALLR/sdk-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
}