Thanks Friend. @284 line, i have startActivity(intent); When starting a new intent, i am getting the below error.
If my approach is wrong, can you please tell me how to start a new activity or intent when we click on an overlay in map. Basically i want to display more in-depth information when we clicked on overlay. Thanks & Regards Venkat On 8/16/09, Balwinder Kaur (T-Mobile USA) <[email protected]> wrote: > > Per your stack trace, you have a problem on line 284 of > MyLocations.java. > > Balwinder Kaur > Open Source Development Center > ·T· · ·Mobile· stick together > > The views, opinions and statements in this email are those of the > author solely in their individual capacity, and do not necessarily > represent those of T-Mobile USA, Inc. > > On Aug 15, 6:00 am, Venkat <[email protected]> wrote: >> Hi friends >> I am showing some locations in the map, when i click on the particulat >> overlay, i am planning to show a dialog box to show the details info >> of that particular overlay. >> The detailed info of overlay is there in my locations in >> Mylocations.java . >> So onTap, i am calling a method in Mylocations.java and starting a new >> intent which will show a new layout with all detailed info. >> >> I am getting below issue, can you please help me? >> >> public class Mylocations extends MapActivity { >> >> private static List<LocationInfo> locations; >> @Override >> public void onCreate(Bundle savedInstanceState) { >> ------------------ >> ------------------ >> itemizedOverlay = new HelloItemizedOverlay(this, drawable); >> ------------------ >> ------------------ >> >> } >> >> ---------------- >> ---------------- >> public void showDetailedInfo(Context mContext, int index){ >> Intent intent = new Intent(mContext, ShowDetailedtInfo.class); >> startActivity(intent);} >> >> ---------------- >> ---------------- >> >> } >> >> public class HelloItemizedOverlay extends ItemizedOverlay { >> >> public HelloItemizedOverlay(Context context, Drawable defaultMarker) >> { >> super(boundCenterBottom(defaultMarker)); >> mContext = context;} >> >> @Override >> protected boolean onTap(int index) { >> Mylocations mylocations = new Mylocations(); >> mylocations .showDetailedInfo(mContext,index); >> >> } >> } >> >> When starting new activity @ startActivity(intent);, i am getting the >> below error: >> >> 08-13 23:30:03.758: WARN/dalvikvm(1528): threadid=3: thread exiting >> with uncaught exception (group=0x4000fe70) >> 08-13 23:30:03.758: ERROR/AndroidRuntime(1528): Uncaught handler: >> thread main exiting due to uncaught exception >> 08-13 23:30:03.878: ERROR/AndroidRuntime(1528): >> java.lang.NullPointerException >> 08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at >> android.app.Activity.startActivityForResult(Activity.java:2656) >> 08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at >> android.app.Activity.startActivity(Activity.java:2700) >> 08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at >> com.example.Mylocations.showDetailedInfo(Mylocations.java:284) >> 08-13 23:30:03.878: ERROR/AndroidRuntime(1528): at >> com.example.HelloItemizedOverlay$1.onClick(HelloItemizedOverlay.java: >> 83) >> >> Can You please help me? >> >> Thanks & Regards >> Venkat > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

