well , i'll edit the code and narrow it, I have a class FestivalEvents which shows a list of events and the click of each item in the list shows a view containing the complete details of the events. the events, details are read from a xml file and the detailed view is given with this method:
private void setUpDesc(int position) { SearchListView.setVisibility(View.GONE); mCheckView = true; final ParsedData parsedData = items.get(position); fv.setVisibility(View.VISIBLE); tv1.setText(parsedData.getArticleTitle()); tv2.setText(parsedData.getArticleDesc()); tv3.setText(parsedData.getLink()); date1.setText(parsedData.getDate()); Bundle lBundle = new Bundle(); lBundle.putString("url", parsedData.getImageLink()); Message msg = new Message(); msg.setData(lBundle); handler.dispatchMessage(msg); } the map activity has the same number of events as in the FestivalEvents class and there are balloons showing the events and the location of the event. I'm trying to send the indices of the balloons to the corresponding festival events. i.e. if I click on the balloon with index = 1, i need to open the first event in the list. So I'm sending the indices to the setUpDesc() method of FestivalEvents class to open the detailed view, but the app crashes with null pointer exception. I'm sending the balloon indices like this below: public void onBalloonTap(int index, Item item) { Intent i = new Intent(c,FestivalEvents.class); i.putExtra("index", index); event.setUpDesc(index); c.startActivity(i); } and i'm catching the indices in the FestivalEvents class. Am I doing anything wrong here? Please help me out. Thanks in advance -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en