спасибо, я получил его на работу!Вот код на тот случай, если у кого-то возникнет такая же проблема:
package en.android.itleaked.com;
import java.net.URL;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Toast;
public class getReleases extends Activity {
public ListView lv1;
private static final int ACTIVITY_CREATE = 0;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
getFeed();
}
public void getFeed() {
try {
URL url = new URL("http://www.it-leaked.com/app/main.php");
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(new InputSource(url.openStream()));
doc.getDocumentElement().normalize();
NodeList nodeList = doc.getElementsByTagName("item");
String lv_arr[] = new String[nodeList.getLength()];
final String lv_arr_id[] = new String[nodeList.getLength()];
for (int i = 0; i < nodeList.getLength(); i++) {
Node node = nodeList.item(i);
Element fstElmnt = (Element) node;
NodeList nameList = fstElmnt.getElementsByTagName("title");
Element nameElement = (Element) nameList.item(0);
nameList = nameElement.getChildNodes();
lv_arr[i] = ((Node) nameList.item(0)).getNodeValue();
NodeList idList = fstElmnt.getElementsByTagName("id");
Element idElement = (Element) idList.item(0);
idList = idElement.getChildNodes();
lv_arr_id[i] = ((Node) idList.item(0)).getNodeValue();
}
lv1=(ListView)findViewById(R.id.ListView01);
lv1.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, lv_arr));
lv1.setTextFilterEnabled(true);
lv1.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> a, View v, int position, long id) {
Intent i = new Intent(getReleases.this, showReleases.class);
i.putExtra("id", lv_arr_id[position]);
startActivityForResult(i, ACTIVITY_CREATE);
}
});
}
catch (Exception e) {
Toast.makeText(this, "Error: " + e, Toast.LENGTH_LONG).show();
}
}
}
А вот и конец приема:
package en.android.itleaked.com;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;
public class showReleases extends Activity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.releasedetails);
Bundle extras = getIntent().getExtras();
if (extras != null) {
String releaseid = extras.getString("id");
Toast.makeText(this, releaseid, Toast.LENGTH_LONG).show();
}
}
}