GetcontentResolver (); equivalent

175 views Asked by At

I'm trying to use a Java code in Xamarin with C#. I was doing well until I got to that part:

Inside this method, create a ContentResolver instance, retrieve the URI for external music files, and create a Cursor instance using the ContentResolver instance to query the music files:

ContentResolver musicResolver = getContentResolver();
Uri musicUri = android.provider.MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
Cursor musicCursor = musicResolver.query(musicUri, null, null, null, null);

Can anyone help me to adapt this part?

0

There are 0 answers