Bug 6283 - ContentUri AppendId missing
Summary: ContentUri AppendId missing
Status: RESOLVED FEATURE
Alias: None
Product: Android
Classification: Xamarin
Component: BCL Class Libraries ()
Version: 4.2.x
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-07-25 13:39 UTC by Neal
Modified: 2012-08-07 05:57 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FEATURE

Description Neal 2012-07-25 13:39:40 UTC
Hello,

I'm adding calendar integration and notice there is no method to append the event ID per the bottom of this page:

http://developer.android.com/reference/android/provider/CalendarContract.Events.html

which takes you to:

http://developer.android.com/reference/android/content/ContentUris.html#withAppendedId(android.net.Uri, long)
Comment 1 Atsushi Eno 2012-07-27 06:13:39 UTC
ContentUris.AppendId() exists. If that's not what you expected, please reopen and give us more details.
http://androidapi.xamarin.com/?link=M%3aAndroid.Content.ContentUris.AppendId%28Android.Net.Uri%2bBuilder%2cSystem.Int64%29
Comment 2 Neal 2012-07-27 08:41:12 UTC
I have a declaration for a URI such as:

var Android.Net.Uri uriEvents = CalendarContract.Events.ContentUri;

How should I append the EventId to this Uri using the AppendId() method?

Presently I'm using:

var eventUri = Android.Net.Uri.WithAppendedPath(uriEvents, aptID);
Comment 3 Atsushi Eno 2012-08-07 05:57:14 UTC
I believe you could write your code simply as:

var eventUri = Android.Content.ContentUris.WithAppendedId (Android.Provider.CalendarContract.Events.ContentUri, aptID);