Hi All,
I’m trying to call a photon function from my Android Application, but it is not working somehow.
Here’s the code,
try {
List<String> ledCommands = new ArrayList<String>();
ledCommands.add("on");
resultCode = mDevice.callFunction("ledToggle", ledCommands);
} catch (ParticleDevice.FunctionDoesNotExistException e) {
e.printStackTrace();
}
Toaster.s(NoticeActivity.this, "Result of calling ledToggle: " + resultCode);
Note: mDevice is particle device which I have retrieved from getDevices(deviceID)
Can anyone help me with this?
Regards