Juce MIDI example apps not showing properly

I’ve been looking at the Juce tutorials for MIDI handling on Android.
The problem is a lot of them just don’t show any content on older phones (ex Nexus 5).

Here’s what I did:

  • Projucer → Open example → Audio → MidiDemo
  • Projucer set minimum sdk version: 23
  • Installed Android studio with NDK (side-by-side)
  • set the project Android exporter settings, Extra module’s build.gradle content to ndkVersion "23.0.7599858"
  • Build and run on device

This is what I see:

I cannot figure out why the actual app is not showing up, no errors, no warnings.
I tried to set breakpoints in the cpp files to see if it reaches the Juce code, but could not get any hits.

Any tips on what I should try?

Thanks.

Quick update:
The problem seems to come from the fact that I set the minimum sdk version to 23.
If I leave it empty defaulting to 16 the application content is presented properly.

As far as I know for Android Midi to work properly you should set it to 23, so I’m not sure how to proceed at this point. I will test more and report back, if you have any tips, please share, thanks.

Are you running this on an actual device or in the emulator? I’ve seen this in the emulator and it seems to be a known issue that can be fixed by changing the “Emulated Performance->Graphics” setting to “Software” in the AVD manager settings (Android Emulator Stuck With Black Screen - Stack Overflow).

I can’t reproduce it on all emulator devices though and am unable to reproduce on an actual Pixel 3a.

1 Like

@ed95 Thanks for looking into this.
This is happening on a real device (LG Nexus 5, Android 6.0). Admittedly old, however a good device to test our apps on to make sure we support a wide range of devices.

The only difference I found was setting the minimum API sdk version to 23 or leaving it blank.
With 23 the app is blank, with the default it’s working correctly.

Leaving it blank solved the problem for now. The only issue I see is people on API version less than 23 downloading our paid app from the Play Store. Hopefully I can find a way to prevent that.

Leaving it blank will use the default which is SDK 16.

Unfortunately I don’t have a device running an older version of Android to test on. Do you have a device running a slightly newer version of Android that you can test with? I wonder if its that specific SDK version that is problematic and whether setting the minimum SDK to something like 24 would work instead.