Java tutorial
//package com.java2s; import android.media.MediaMetadataRetriever; import java.util.HashMap; public class Main { private static void saveMetadata(MediaMetadataRetriever metadataRetriever, HashMap<String, String> metadata, int metadataKey) { String value = metadataRetriever.extractMetadata(metadataKey); if (value != null) metadata.put(Integer.toString(metadataKey), value); } }