Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
With Xamarin Studio 4.0.9 and Xamarin.Android 4.7.9.
Using a fresh "Android ICS Application" template, with Target API set to 17 and Minimum API set to 15.
Android.Media.AudioManager is missing the API-17 method 'getPropery()' method.
Also missing are the API-17 'AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE' and 'AudioManager.PROPERTY_OUTPUT_FRAMES_PER_BUFFER' properties, among others.
These are needed to query the low-latency audio parameters for API-17 and beyond, according to the NDK docs.
Is it missing? It's there for me in 4.7.8-4, which is minimally different from 4.7.9:
> $ monop -r:/Library/Frameworks/Xamarin.Android.framework/Versions/4.7.8-4/lib/mandroid/platforms/android-17/Mono.Android.dll Android.Media.AudioManager | grep Property
> public virtual string GetProperty (string key);
> public const string PropertyOutputFramesPerBuffer = "android.media.property.OUTPUT_FRAMES_PER_BUFFER";
> public const string PropertyOutputSampleRate = "android.media.property.OUTPUT_SAMPLE_RATE";
Don't forget that Xamarin.Android ".NET-ifies" the API, so casing and naming won't be identical to Java.
Yeah, I'm pretty careful with the naming thing; I switch regularly between C++, C#, and Java, and if it wasn't for Studio's autocomplete I'd probably be stark raving insane by now. :-)
Verified that the properties and methods ARE in 4.7.9-1.
Also found my problem.
I had Settings > Build > General > Target Framework set to 4.0.3 (15).
This was mismatched with the Android manifest under Settings > Build > Android Application, which was set to Target API of 17 and Minimum API of 15.
Yes, I understand that one of them is for the Xamarin.Android binding, the other is for APK manifest generation. But that's still confusing (to me, at least)... :-)
Sorry for wasting your time!