client/android/ZUMOAPPNAME/app/src/main/java/com/example/zumoappname/ToDoActivity.java
/**
     * Add a new item
     *
     * @param view
     *            The view that originated the call
     */
Add a new item
@param view
The view that originated the call
Add a new item @param view The view that originated the call
public void addItem(View view) {
        if (mClient == null) {
            return;
        }
        final ToDoItem item = new ToDoItem();
        item.setText(mTextNewToDo.getText().toString());
        item.setComplete(false);
        AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>(){
            @Override
            protected Void doInBackground(Void... params) {
                try {
                    final ToDoItem entity = addItemInTable(item);
                    runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                            if(!entity.isComplete()){
                                mAdapter.add(entity);
                            }
                        }
                    });
                } catch (final Exception e) {
                    createAndShowDialogFromTask(e, "Error");
                }
                return null;
            }
        };
        runAsyncTask(task);
        mTextNewToDo.setText("");
    }
public void addItem ( View view ) { if ( mClient == null ) { return ; } final ToDoItem item = new ToDoItem ( ) ; item . setText ( mTextNewToDo . getText ( ) . toString ( ) ) ; item . setComplete ( false ) ; AsyncTask < Void , Void , Void > task = new AsyncTask < Void , Void , Void > ( ) { @ Override protected Void doInBackground ( Void ... params ) { try { final ToDoItem entity = addItemInTable ( item ) ; runOnUiThread ( new Runnable ( ) { @ Override public void run ( ) { if ( ! entity . isComplete ( ) ) { mAdapter . add ( entity ) ; } } } ) ; } catch ( final Exception e ) { createAndShowDialogFromTask ( e , "Error" ) ; } return null ; } } ; runAsyncTask ( task ) ; mTextNewToDo . setText ( "" ) ; }
Add a new item
 @param view
            The view that originated the call
Add a new item @param view The view that originated the call
// Create a new item // Insert the new item