diff --git a/sdk/jme3-android/src/com/jme3/gde/android/ListReader.java b/sdk/jme3-android/src/com/jme3/gde/android/ListReader.java index 8fa84dcbb..c61983a1e 100644 --- a/sdk/jme3-android/src/com/jme3/gde/android/ListReader.java +++ b/sdk/jme3-android/src/com/jme3/gde/android/ListReader.java @@ -47,18 +47,30 @@ public class ListReader implements Runnable { while ((line = in.readLine()) != null) { line = line.trim(); if (line.length() > 0) { - if (line.startsWith("id:")) { - target = new AndroidTarget(); - int idstart = line.indexOf(":") + 1; - int idend = line.indexOf("or"); - int start = line.indexOf("\"") + 1; - int end = line.lastIndexOf("\""); - target.setId(Integer.parseInt(line.substring(idstart, idend).trim())); - target.setName(line.substring(start, end)); - list.add(target); - } - if (line.startsWith("Name:") && target != null) { - target.setTitle(line.split(":")[1].trim()); + try { + + if (line.startsWith("id:")) { + target = new AndroidTarget(); + int idstart = line.indexOf(":") + 1; + int idend = line.indexOf("or"); + int start = line.indexOf("\"") + 1; + int end = line.lastIndexOf("\""); + target.setId(Integer.parseInt(line.substring(idstart, idend).trim())); + target.setName(line.substring(start, end)); + list.add(target); + } else if (line.startsWith("Name:") && target != null) { + target.setTitle(line.split(":")[1].trim()); + } else if (line.startsWith("Type:") && target != null) { + target.setPlatform(line.split(":")[1].trim()); + } else if (line.startsWith("API level:") && target != null) { + target.setApiLevel(Integer.parseInt(line.split(":")[1].trim())); + } else if (line.startsWith("Revision:") && target != null) { + target.setRevision(Integer.parseInt(line.split(":")[1].trim())); + } else if (line.startsWith("Skins:") && target != null) { + target.setSkins(line.split(":")[1].trim()); + } + } catch (Exception e) { + Exceptions.printStackTrace(e); } if (progress != null) { progress.progress(line);