client/android/ZUMOAPPNAME/app/src/main/java/com/example/zumoappname/ToDoActivity.java
/**
     * Initialize local storage
     * @return
     * @throws MobileServiceLocalStoreException
     * @throws ExecutionException
     * @throws InterruptedException
     */
Initialize local storage
@return
@throws MobileServiceLocalStoreException
@throws ExecutionException
@throws InterruptedException
Initialize local storage @return @throws MobileServiceLocalStoreException @throws ExecutionException @throws InterruptedException
private AsyncTask<Void, Void, Void> initLocalStore() throws MobileServiceLocalStoreException, ExecutionException, InterruptedException {
        AsyncTask<Void, Void, Void> task = new AsyncTask<Void, Void, Void>() {
            @Override
            protected Void doInBackground(Void... params) {
                try {
                    MobileServiceSyncContext syncContext = mClient.getSyncContext();
                    if (syncContext.isInitialized())
                        return null;
                    SQLiteLocalStore localStore = new SQLiteLocalStore(mClient.getContext(), "OfflineStore", null, 1);
                    Map<String, ColumnDataType> tableDefinition = new HashMap<String, ColumnDataType>();
                    tableDefinition.put("id", ColumnDataType.String);
                    tableDefinition.put("text", ColumnDataType.String);
                    tableDefinition.put("complete", ColumnDataType.Boolean);
                    localStore.defineTable("ToDoItem", tableDefinition);
                    SimpleSyncHandler handler = new SimpleSyncHandler();
                    syncContext.initialize(localStore, handler).get();
                } catch (final Exception e) {
                    createAndShowDialogFromTask(e, "Error");
                }
                return null;
            }
        };
        return runAsyncTask(task);
    }
private AsyncTask < Void , Void , Void > initLocalStore ( ) throws MobileServiceLocalStoreException , ExecutionException , InterruptedException { AsyncTask < Void , Void , Void > task = new AsyncTask < Void , Void , Void > ( ) { @ Override protected Void doInBackground ( Void ... params ) { try { MobileServiceSyncContext syncContext = mClient . getSyncContext ( ) ; if ( syncContext . isInitialized ( ) ) return null ; SQLiteLocalStore localStore = new SQLiteLocalStore ( mClient . getContext ( ) , "OfflineStore" , null , 1 ) ; Map < String , ColumnDataType > tableDefinition = new HashMap < String , ColumnDataType > ( ) ; tableDefinition . put ( "id" , ColumnDataType . String ) ; tableDefinition . put ( "text" , ColumnDataType . String ) ; tableDefinition . put ( "complete" , ColumnDataType . Boolean ) ; localStore . defineTable ( "ToDoItem" , tableDefinition ) ; SimpleSyncHandler handler = new SimpleSyncHandler ( ) ; syncContext . initialize ( localStore , handler ) . get ( ) ; } catch ( final Exception e ) { createAndShowDialogFromTask ( e , "Error" ) ; } return null ; } } ; return runAsyncTask ( task ) ; }
Initialize local storage
 @return
 @throws MobileServiceLocalStoreException
 @throws ExecutionException
 @throws InterruptedException
Initialize local storage @return @throws MobileServiceLocalStoreException @throws ExecutionException @throws InterruptedException