Back to project page Android-Media-Library.
The source code is released under:
Apache License
If you think the Android project Android-Media-Library listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package grevian.MediaLibrary; /*from www .j a v a2 s . c om*/ import java.util.HashMap; import org.xmlrpc.android.XMLRPCClient; import android.util.Log; public class UPCDataSource { @SuppressWarnings("unchecked") public static String getUPCText(String upc) { String text = ""; try { XMLRPCClient client = new XMLRPCClient("http://www.upcdatabase.com/rpc"); HashMap<String, String> results = (HashMap<String, String>)client.call("lookupUPC", upc); if ( results.size() > 0 && results.get("message").equalsIgnoreCase("Database entry found")) { text = results.get("description"); } } catch (Exception e) { Log.e("GrevianMedia", e.getMessage()); return ""; } return text; } }