Code example for DrmManagerClient

Methods: canHandlegetOriginalMimeType

     * @return The original mime type of the file if DRM protected else the 
     *         currentMime 
    public static String getOriginalMimeType(Context context, String path, String containingMime) {
        String result = containingMime;
        DrmManagerClient drmClient = new DrmManagerClient(context);
        try { 
            if (drmClient.canHandle(path, null)) {
                result = drmClient.getOriginalMimeType(path);
        } catch (IllegalArgumentException ex) {
                    "Can't get original mime type since path is null or empty string."); 
        } catch (IllegalStateException ex) {
            Log.w(TAG, "DrmManagerClient didn't initialize properly.");
        return result;
Stop searching for code, let great code find you!  Add Codota to your java IDE