Debugging a OperationApplicationException insert failed
For debugging I would start with something like this
{ ......... int i = 0; for (ContentProviderOperation op : ops) { applySingle(WorkoutProvider.AUTHORITY, op); Log.e(getTag(), Integer.toString(i)); i++; } }protected synchronized void applySingle(String authority, ContentProviderOperation op) { ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>(); ops.add(op); try { App.getInstance().getContentResolver().applyBatch(authority, ops); } catch (RemoteException e) { Log.e(getTag(), "Error updating workout id to server's", e); e.printStackTrace(); } catch (OperationApplicationException e) { Log.e(getTag(), "Error updating workout id to server's", e); e.printStackTrace(); }}
Then I would recommend debugging before that for loop and taking a look at what operation failed.