I was wondering if its possible to save master and detail records to a content provider using the android.content.ContentResolver.applyBatch() method in the same operation
Each result produced from an item in the operations array is identified by its index in the array. Subsequent operations may reference those results via the withValueBackReference() method.
.withValue(Detail.MASTER_ID, /* WHAT GOES HERE? */)
becomes
.withValueBackReference(Detail.MASTER_ID, 0)
A complete example of this usage can be found in sample ContactManager. The 0 is the index of the ContentProviderOperation from which the value is obtained.