diff options
author | Phil Burk <philburk@google.com> | 2015-07-29 14:00:09 -0700 |
---|---|---|
committer | Phil Burk <philburk@google.com> | 2015-07-29 14:00:09 -0700 |
commit | 44d535aaf2a06115de5255f2787c4f7a4db949ce (patch) | |
tree | 8f899842c42d5648d4f337fd5fe6e9b12e5811ec /media | |
parent | b83b5fa641847ee1d533253ba5e1a3e13913b9d9 (diff) | |
download | frameworks_base-44d535aaf2a06115de5255f2787c4f7a4db949ce.zip frameworks_base-44d535aaf2a06115de5255f2787c4f7a4db949ce.tar.gz frameworks_base-44d535aaf2a06115de5255f2787c4f7a4db949ce.tar.bz2 |
MIDI package doc: add hasSystemFeature() call
Bug: 22800792
Change-Id: Ib4b3e16e8167191505c31522bbccd521a9807528
Signed-off-by: Phil Burk <philburk@google.com>
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/midi/package.html | 12 |
1 files changed, 12 insertions, 0 deletions
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"/> </pre> +<h2 id=check_feature>Check for Feature Support</h2> + +<p>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. +</p> + +<pre class=prettyprint> +if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_MIDI)) { + // do MIDI stuff +} +</pre> + <h2 id=the_midimanager>The MidiManager</h2> |