use of com.wm.remusic.json.MusicDetailInfo in project remusic by aa112901.
the class Down method getInfo.
public static MusicDetailInfo getInfo(final String id) {
MusicDetailInfo info = null;
try {
JsonObject jsonObject = HttpUtil.getResposeJsonObject(BMA.Song.songBaseInfo(id).trim()).get("result").getAsJsonObject().get("items").getAsJsonArray().get(0).getAsJsonObject();
info = MainApplication.gsonInstance().fromJson(jsonObject, MusicDetailInfo.class);
} catch (Exception e) {
e.printStackTrace();
}
return info;
}
use of com.wm.remusic.json.MusicDetailInfo in project remusic by aa112901.
the class MusicDetailInfoGet method run.
@Override
public void run() {
try {
MusicDetailInfo info = null;
JsonObject jsonObject = HttpUtil.getResposeJsonObject(BMA.Song.songBaseInfo(id).trim()).get("result").getAsJsonObject().get("items").getAsJsonArray().get(0).getAsJsonObject();
info = MainApplication.gsonInstance().fromJson(jsonObject, MusicDetailInfo.class);
synchronized (this) {
Log.e("arraylist", "size" + arrayList.size());
arrayList.put(p, info);
}
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations