Docs Menu
Docs Home
/ /
Atlas Device SDKs
/ /

Call a Function - Java SDK

On this page

  • Call a Function by Name

The examples in this section demonstrate calling a simple function named sum that takes two arguments, adds them, and returns the result:

// sum: adds two numbers
exports = function(a, b) {
return a + b;
};

To execute a function from the SDK, use the getFunctions() method of the your App to retrieve a Functions manager. Pass the name and parameters of the function you would like to call to callFunction() or callFunctionAsync():

← Connect to an App Services App