Targeting Android 4.2 and below with Monogame 3.3

I recently updated my Monogame copy from 3.2 to 3.3 due to the black screen bug when resuming the game after pressing the home button.

However after the update I got another error > [] Missing method Android.Media.AudioManager::GetProperty(string) in assembly Mono.Android.dll

I’ve learned from reading the forum, I need to target API level 17 Android 4.2 and above. I would prefer if I could target Android 3.0, ideally Android 2.3 and above. So I was wondering if there’s a workaround for this… Thanks.

I had the exact same problem

You can still run on an older version of android if you are targeting a newer SDK.
I’m building with the 5.0 SDK but running on a 2.3 device.

Hi daveleaver, really? I don’t know that. So once I submitted to Google Play, would my game still be compatible with 2.3 devices and downloadable by those?

In the project settings, there are three Android level settings: Build, Target and Minimum. You can build with a higher API level and target a lower API level. You’ll see an API version guard around the use of the GetProperty() method. You just need to build with a high-enough API level that knows about GetProperty(), but running it on a lower version device will simply skip the call to GetProperty(). This article explains it all quite well.

1 Like