I have a custom content provider in my Android app that works reasonably well. I expect other apps to also access my content provider. I would like some clean way to communicate exceptions and errors, but as far as I can tell the Android content provider framework doesn't provide any way to propagate exceptions across processes.
How should I indicate an exception state to my caller? Do I have to somehow encode it into my returned data and rely on clients to check for it? Is there any alternative? If encoding into the ordinary return data is it, what's the best way? (I can see a number of alternatives for the Cursor
returned by a query
call, but what about the Uri
returned by insert
, or the int
returned by update
or delete
?)