public static void uploadNotes(Context context,String host,String hash) throws IOException, JSONException, AuthenticatorException {
  NoteDataSource dataSource=NoteDataSource.getInstance(context);
  List<Note> notSyncedNotes=dataSource.getNotes(DatabaseContract.NoteEntry.NOTE_STATUS.not_synced);
  for (  Note note : notSyncedNotes) {
    Note newNote=createNote(host,hash,note);
    if (newNote != null) {
      dataSource.deleteNote(note);
      dataSource.insertNote(newNote);
    }
 else {
      Log.d(LOG_TAG,"Creating note failed");
    }
  }
}

public static void uploadNotes ( Context context , String host , String hash ) throws IOException , JSONException , AuthenticatorException { NoteDataSource dataSource = NoteDataSource . getInstance ( context ) ; List < Note > notSyncedNotes = dataSource . getNotes ( DatabaseContract . NoteEntry . NOTE_STATUS . not_synced ) ; for ( Note note : notSyncedNotes ) { Note newNote = createNote ( host , hash , note ) ; if ( newNote != null ) { dataSource . deleteNote ( note ) ; dataSource . insertNote ( newNote ) ; } else { Log . d ( LOG_TAG , "Creating note failed" ) ; } } }
uploads all new local notes
