Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ** Task implements IDB interface
- Task taskA = new Task("new Task", DateHandler.DEFAULT_CALENDAR);
- BackendLessHandler.db().add(taskA, taskA.getClass());
- public <T extends IDB> boolean add(T object, Class<T> type) {
- Backendless.Data.of(type).save(object, new AsyncCallback<T>() {
- @Override
- public void handleResponse(T response) {
- Debug.log(TAG, "object of type \"" + response.getClass() + "\" created");
- }
- @Override
- public void handleFault(BackendlessFault fault) {
- Debug.log(TAG, "fault: " + fault.getCode());
- }
- });
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment