Example #1
0
  public static List<String> search(String key, String device_id) {
    List<String> _return = new ArrayList<String>();
    String url = Common.API10.replace("{0}", key) + "&device=" + device_id;
    Log.i("AAAA", url);
    String strXml = XMLfunctions.getXML(url);

    if (strXml != null) {
      Document document = XMLfunctions.XMLfromString(strXml);
      if (document != null) {
        _return.add(getValue(document, "status"));
        _return.add(getValue(document, "image"));
      }
    }
    return _return;
  }
Example #2
0
 public static String getValue(Element item, String str) {
   try {
     NodeList n = item.getElementsByTagName(str);
     return XMLfunctions.getElementValue(n.item(0));
   } catch (Exception e) {
     return null;
   }
 }