I’m trying to assign a user role using CBL and I know that async calls spawning another thread are no longer supported in CBL.
Backendless.UserService.assignRole("test@test.com", "TestingSubscribers", new AsyncCallback<Void>() {
@Override
public void handleResponse(Void arg0) {
debug("TestAssignUserRoleTimer#assignRole: handleResponse succeed: " + arg0);
}
@Override
public void handleFault(BackendlessFault backendlessFault) {
error("TestAssignUserRoleTimer#assignRole error: "
+ backendlessFault.getMessage()
+ " (" + backendlessFault.getCode() + "): "
+ backendlessFault.getDetail()
);
}
});
so of course I get this error:
11/27/15 6:10 PM ERROR com.backendless.digitalcopel.timers.TestAssignUserRoleTimer TestAssignUserRoleTimer#assignRole error: You have no permission to thread manipulation (IllegalArgumentException): null
so I know the solution is to use Backendless.UserService.assignRole("test@test.com", “TestingSubscribers”);
but I want to know the result of the call, i.e. whether it succeeded or failed. How can I do this in CBL?