2

Searching here and on the internet, I found several examples of how to capture the updated calendar. However I did not find anything how to capture the id ("_id" Events table).

Has anyone done something similar.

I'm trying this:

public class CalendarReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        Log.d("calendar", "updated " + intent.toUri(Intent.URI_INTENT_SCHEME));
    }
}

And my Manifest:

<receiver android:name=".CalendarReceiver">
    <intent-filter>
        <action android:name="android.intent.action.PROVIDER_CHANGED"/>
        <data android:scheme="content"/>
        <data android:host="com.android.calendar"/>
    </intent-filter>
</receiver>

The Log is invoked when an event on the calendar is updated, just that I need the _id of the edited event.

I believe that the intent can see this but do not know how to capture.

Kara
  • 6,115
  • 16
  • 50
  • 57

0 Answers0