check Low Latency Support - Android android.content.pm

Android examples for android.content.pm:PackageManager

Description

check Low Latency Support

Demo Code

import android.content.Context;
import android.content.pm.PackageManager;
import android.media.AudioManager;
import android.os.Build;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class Main{

    private static boolean checkLowLatencySupport(Context context) {
        if (context == null) {
            return false;
        }// ww  w .  j av  a2 s  .  co  m

        PackageManager pm = context.getPackageManager();
        return pm
                .hasSystemFeature(PackageManager.FEATURE_AUDIO_LOW_LATENCY);
    }

}

Related Tutorials