Calendar event intent - startActivityForResult

2019-01-26 17:24发布

问题:

I want to create an event into the calendar from my app. I can start a new event activity with:

Intent intent = new Intent(Intent.ACTION_EDIT).setData(uri);
intent.setType("vnd.android.cursor.item/event");
startActivityForResult(intent, REQUEST_ID);

Is it possible to get the ID of the created event? OnActivityResult resultCode is always 0 - whether I create the event or not. The data is always null. Is there some way to do it?