From 44d535aaf2a06115de5255f2787c4f7a4db949ce Mon Sep 17 00:00:00 2001 From: Phil Burk Date: Wed, 29 Jul 2015 14:00:09 -0700 Subject: MIDI package doc: add hasSystemFeature() call Bug: 22800792 Change-Id: Ib4b3e16e8167191505c31522bbccd521a9807528 Signed-off-by: Phil Burk --- media/java/android/media/midi/package.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'media') diff --git a/media/java/android/media/midi/package.html b/media/java/android/media/midi/package.html index 673c4ba..a675391 100644 --- a/media/java/android/media/midi/package.html +++ b/media/java/android/media/midi/package.html @@ -75,6 +75,18 @@ Then the app will not appear in the Play Store for old devices that do not suppo <uses-feature android:name="android.software.midi" android:required="true"/> +

Check for Feature Support

+ +

An app can also check at run-time whether the MIDI feature is supported on a platform. +This is particularly useful during development when you install apps directly on a device. +

+ +
+if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_MIDI)) {
+    // do MIDI stuff
+}
+
+

The MidiManager

-- cgit v1.1