title: Android application can't run on Galaxy S4 but can run at Galaxy Ace 2
body: <p>The android application that I develop doesn't work on <strong>galaxy s4</strong>.
  Everything is pretty normal when I run it. The <strong>MainActivity</strong>(First Page) is fine and working However when I press the button, which will switch to the activity that will retrieve data from web service and publish it on the phone, the application force closes!
  I tried the same application at my <strong>galaxy ace 2</strong> and everything is fine, after the button is pressed - it works normally and gives me the correct output. Any ideas what is wrong with my android application?</p>
  
  <p>Here is the code for my <strong>MainActivity(First page) button</strong>:</p>
  
  <pre><code>Button recommendButton = (Button) findViewById(R.id.button1);
  Button dateBtn = (Button) findViewById(R.id.button2);
  recommendButton.setOnClickListener(new View.OnClickListener() {
  @Override
  public void onClick(View view) {
  
  String packageName = AndroidXMLParsingActivity.class
  .getPackage().getName();
  String packageAndClassName = AndroidXMLParsingActivity.class
  .getName();
  Intent intent = new Intent().setClassName(packageName,
  packageAndClassName);
  startActivity(intent);
  }
  });
  </code></pre>
  
  <p>And here is the <strong>AndroidXMLParsingActivity</strong> class that will retrieve data from the web service:</p>
  
  <pre><code>public class AndroidXMLParsingActivity extends ListActivity {
  
  // All static variables
  
  
    static final String URL = "http://api.eventful.com/rest/events/search?app_key=42t54cX7RbrDFczc&amp;location=singapore";
  // XML node keys
  static final String KEY_EVENT = "event"; // parent node
  static final String KEY_TITLE = "title";
  static final String KEY_DESC = "description";
  static final String KEY_URL = "url";
  static final String KEY_START_TIME = "start_time";
  static final String KEY_VENUE_NAME = "venue_name";
  static final String KEY_COUNTRY_NAME = "country_name";
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);
  
  ArrayList&lt;HashMap&lt;String, String&gt;&gt; menuItems = new ArrayList&lt;HashMap&lt;String, String&gt;&gt;();
  
  XMLParser parser = new XMLParser();
  String xml = parser.getXmlFromUrl(URL); // getting XML
  Document doc = parser.getDomElement(xml); // getting DOM element
  
  NodeList nl = doc.getElementsByTagName(KEY_EVENT);
  // looping through all item nodes &lt;item&gt;
  for (int i = 0; i &lt; nl.getLength(); i++) {
  // creating new HashMap
  HashMap&lt;String, String&gt; map = new HashMap&lt;String, String&gt;();
  Element e = (Element) nl.item(i);
  // adding each child node to HashMap key =&gt; value
  map.put(KEY_TITLE, parser.getValue(e, KEY_TITLE));
  map.put(KEY_DESC, parser.getValue(e, KEY_DESC));
  map.put(KEY_URL, parser.getValue(e, KEY_URL));
  map.put(KEY_START_TIME, parser.getValue(e, KEY_START_TIME));
  map.put(KEY_VENUE_NAME, parser.getValue(e, KEY_VENUE_NAME));
  map.put(KEY_COUNTRY_NAME, parser.getValue(e, KEY_COUNTRY_NAME));
  
  // adding HashList to ArrayList
  menuItems.add(map);
  }
  
  // Adding menuItems to ListView
  ListAdapter adapter = new SimpleAdapter(this, menuItems,
  R.layout.list_item, new String[] { KEY_TITLE, KEY_DESC, KEY_COUNTRY_NAME,
  KEY_VENUE_NAME, KEY_START_TIME }, new int[] {
  R.id.title,R.id.description, R.id.countryName, R.id.venueName,
  R.id.startTime });
  
  setListAdapter(adapter);
  
  // selecting single ListView item
  ListView lv = getListView();
  
  lv.setOnItemClickListener(new OnItemClickListener() {
  
  @Override
  public void onItemClick(AdapterView&lt;?&gt; parent, View view,
  int position, long id) {
  // getting values from selected ListItem
  String title = ((TextView) view.findViewById(R.id.title))
  .getText().toString();
  String description = ((TextView) view
  .findViewById(R.id.description)).getText().toString();
  
  // Starting new intent
  Intent in = new Intent(getApplicationContext(),
  SingleMenuItemActivity.class);
  in.putExtra(KEY_TITLE, title);
  in.putExtra(KEY_DESC, description);
  
  startActivity(in);
  
  }
  });
  }
  }
  </code></pre>