I have my own save() method in my ContentProvider MyContentProvider class that I want to call through ContentResolver. The goal is to pass the POJO as a Bundle to MyContentProvider .
I use the call method, as indicated here , and defined here .
I have no mistakes. This method is simply not available.
(abbreviated), a custom ContentProvider with a custom method is as follows:
public class MyContentProvider extends ContentProvider { public void save() { Log.d("Test method", "called"); } }
I call it this way:
ContentResolver contentResolver = context.getContentResolver(); Bundle bundle = new Bundle(); bundle.putSerializable("pojo", getPojo()); contentResolver.call(Contracts.CONTENT_URI, "save", null, bundle);
Why has the save method never been called, and if I get to this point, how do I access the called Uri and Bundle in the save() method? I could not find any link for this anywhere on SO or the Internet.
Thank you for your responses!
Openhouse
source share